Commit e561b9eb by Bach Dániel

fix flake8 errors part 2

parent a7b7a9ef
...@@ -31,13 +31,13 @@ def create_levels(app, created_models, verbosity, db=DEFAULT_DB_ALIAS, ...@@ -31,13 +31,13 @@ def create_levels(app, created_models, verbosity, db=DEFAULT_DB_ALIAS,
for klass in app_models: for klass in app_models:
# Force looking up the content types in the current database # Force looking up the content types in the current database
# before creating foreign keys to them. # before creating foreign keys to them.
ctype = ContentType.objects.db_manager(db).get_for_model(klass) ctype1 = ContentType.objects.db_manager(db).get_for_model(klass)
ctypes.add(ctype) ctypes.add(ctype1)
weight = 0 weight = 0
try: try:
for codename, name in klass.ACL_LEVELS: for codename, name in klass.ACL_LEVELS:
searched_levels.append((ctype, (codename, name))) searched_levels.append((ctype1, (codename, name)))
level_weights.append((ctype, codename, weight)) level_weights.append((ctype1, codename, weight))
weight += 1 weight += 1
except AttributeError: except AttributeError:
raise ImproperlyConfigured( raise ImproperlyConfigured(
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
# with CIRCLE. If not, see <http://www.gnu.org/licenses/>. # with CIRCLE. If not, see <http://www.gnu.org/licenses/>.
"""Development settings and globals.""" """Development settings and globals."""
# flake8: noqa
from base import * # noqa from base import * # noqa
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
# with CIRCLE. If not, see <http://www.gnu.org/licenses/>. # with CIRCLE. If not, see <http://www.gnu.org/licenses/>.
"""Production settings and globals.""" """Production settings and globals."""
# flake8: noqa
from os import environ from os import environ
......
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
from .base import * # noqa from .base import * # noqa
# flake8: noqa
########## IN-MEMORY TEST DATABASE ########## IN-MEMORY TEST DATABASE
DATABASES = { DATABASES = {
"default": { "default": {
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
import json import json
#from unittest import skip # from unittest import skip
from django.test import TestCase from django.test import TestCase
from django.test.client import Client from django.test.client import Client
from django.contrib.auth.models import User, Group from django.contrib.auth.models import User, Group
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment