Removed unused variables and imports.

This commit is contained in:
Mariusz Felisiak 2017-05-25 14:02:52 +02:00
parent edbca6dd93
commit 3af72e167b
No known key found for this signature in database
GPG key ID: 2EF56372BA48CD1B
3 changed files with 3 additions and 4 deletions

View file

@ -104,10 +104,10 @@ class ConstanceForm(forms.Form):
version_hash = hashlib.md5()
for name, options in settings.CONFIG.items():
default, help_text = options[0], options[1]
default = options[0]
if len(options) == 3:
config_type = options[2]
if config_type not in settings.ADDITIONAL_FIELDS and not isinstance(options[0], config_type):
if config_type not in settings.ADDITIONAL_FIELDS and not isinstance(default, config_type):
raise ImproperlyConfigured(_("Default value type must be "
"equal to declared config "
"parameter type. Please fix "

View file

@ -13,7 +13,6 @@ https://docs.djangoproject.com/en/1.8/ref/settings/
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
from datetime import date
from decimal import Decimal
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

View file

@ -1,6 +1,6 @@
from django.contrib import admin
from django.conf.urls import url, include
from django.conf.urls import url
urlpatterns = [