PEP8 cleanups, remove unused imports, add missing imports
This commit is contained in:
@@ -7,7 +7,7 @@ from django.db import transaction, DatabaseError
|
||||
|
||||
from .models import ClusterSetting
|
||||
|
||||
# Namespace
|
||||
|
||||
class SettingsNamespace(object):
|
||||
_registry = {}
|
||||
_settings = {}
|
||||
@@ -41,7 +41,6 @@ class SettingsNamespace(object):
|
||||
return self.__class__._settings[self.name].values()
|
||||
|
||||
|
||||
# Scopes
|
||||
class ScopeBase(object):
|
||||
def get_value(self):
|
||||
raise NotImplemented
|
||||
|
||||
@@ -6,6 +6,7 @@ from navigation import Link
|
||||
|
||||
from .icons import icon_settings
|
||||
|
||||
|
||||
def is_superuser(context):
|
||||
return context['request'].user.is_staff or context['request'].user.is_superuser
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ from app_registry.models import App
|
||||
|
||||
from .classes import SettingsNamespace
|
||||
from .links import is_superuser
|
||||
from .icons import icon_settings
|
||||
|
||||
|
||||
def setting_list(request, app_name=None, object_list=None, title=None, extra_context=None):
|
||||
|
||||
Reference in New Issue
Block a user