PEP8 cleanups, unused imports and bumped version to 0.7.3
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
"""Configuration options for the document_indexing app"""
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from common.utils import proper_name
|
||||
from smart_settings.api import register_settings
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
"""Configuration options for the grouping app"""
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from smart_settings.api import register_settings
|
||||
|
||||
register_settings(
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from navigation.api import register_links
|
||||
from permissions.api import register_permission, set_namespace_title
|
||||
|
||||
PERMISSION_HISTORY_VIEW = {'namespace': 'history', 'name': u'history_view', 'label': _(u'Access the history app')}
|
||||
|
||||
@@ -4,8 +4,6 @@ import json
|
||||
from django.db.utils import DatabaseError
|
||||
#from django.utils import simplejson
|
||||
from django.core import serializers
|
||||
from django.utils.translation import ugettext
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.shortcuts import get_object_or_404
|
||||
from django.db import models
|
||||
|
||||
@@ -53,5 +51,4 @@ def create_history(history_type_dict, source_object=None, data=None):
|
||||
new_dict[key]['type'] = pickle.dumps(type(value))
|
||||
|
||||
new_history.dictionary = json.dumps(new_dict)
|
||||
print 'new_history', new_history
|
||||
new_history.save()
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
from django import forms
|
||||
|
||||
from common.forms import DetailForm
|
||||
|
||||
from history.models import History
|
||||
|
||||
@@ -34,8 +34,6 @@ class History(models.Model):
|
||||
history_type = models.ForeignKey(HistoryType, verbose_name=_(u'history type'))
|
||||
dictionary = models.TextField(verbose_name=_(u'dictionary'), blank=True)
|
||||
|
||||
#objects = HistoryManager()
|
||||
|
||||
def __unicode__(self):
|
||||
return u'%s - %s - %s' % (self.datetime, self.content_object, self.history_type)
|
||||
|
||||
|
||||
@@ -5,4 +5,3 @@ urlpatterns = patterns('history.views',
|
||||
url(r'^list/for_object/(?P<app_label>[\w\-]+)/(?P<module_name>[\w\-]+)/(?P<object_id>\d+)/$', 'history_for_object', (), 'history_for_object'),
|
||||
url(r'^(?P<object_id>\d+)/$', 'history_view', (), 'history_view'),
|
||||
)
|
||||
|
||||
|
||||
@@ -2,17 +2,13 @@ from django.shortcuts import render_to_response
|
||||
from django.template import RequestContext
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.shortcuts import get_object_or_404
|
||||
from django.contrib import messages
|
||||
from django.http import HttpResponseRedirect
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.utils.http import urlencode
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
from django.db.models.loading import get_model
|
||||
from django.http import Http404
|
||||
|
||||
from permissions.api import check_permissions
|
||||
|
||||
from history.models import History
|
||||
from history.api import history_types_dict
|
||||
from history.forms import HistoryDetailForm
|
||||
from history import PERMISSION_HISTORY_VIEW
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ sentry = {'text': _(u'sentry'), 'url': '/sentry', 'famfam': 'bug', 'condition':
|
||||
__version_info__ = {
|
||||
'major': 0,
|
||||
'minor': 7,
|
||||
'micro': 2,
|
||||
'micro': 3,
|
||||
'releaselevel': 'final',
|
||||
'serial': 0
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
import datetime
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
from smart_settings.api import register_settings
|
||||
|
||||
@@ -28,6 +28,7 @@ register_links(['role_members', 'role_list', 'role_view', 'role_create', 'role_e
|
||||
|
||||
permission_views = ['role_list', 'role_create', 'role_edit', 'role_members', 'role_permissions', 'role_delete']
|
||||
|
||||
|
||||
def user_post_save(sender, instance, **kwargs):
|
||||
if kwargs.get('created', False):
|
||||
for default_role in DEFAULT_ROLES:
|
||||
|
||||
Reference in New Issue
Block a user