from __future__ import absolute_import, unicode_literals

import os, sys


DEBUG = True
SITE_ID = 1
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
PROJECT_DIRNAME = PROJECT_ROOT.split(os.sep)[-1]
STATIC_URL = "/static/"
STATIC_ROOT = os.path.join(PROJECT_ROOT, STATIC_URL.strip("/"))
MEDIA_URL = STATIC_URL + "media/"
MEDIA_ROOT = os.path.join(PROJECT_ROOT, *MEDIA_URL.strip("/").split("/"))
ADMIN_MEDIA_PREFIX = STATIC_URL + "admin/"
ROOT_URLCONF = "%s.urls" % PROJECT_DIRNAME
TEMPLATE_DIRS = (os.path.join(PROJECT_ROOT, "templates"),)
SECRET_KEY = "asdfa4wtW#$Gse4aGdfs"
ADMINS = ()
TEST_RUNNER = 'django.test.simple.DjangoTestSuiteRunner'

MANAGERS = ADMINS
if "test" not in sys.argv:
    LOGIN_URL = "/admin/"

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': 'dev.db',
    }
}

TEMPLATE_LOADERS = (
    'django.template.loaders.filesystem.Loader',
    'django.template.loaders.app_directories.Loader',
)

MIDDLEWARE_CLASSES = (
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
)

TEMPLATE_CONTEXT_PROCESSORS = (
    "django.contrib.auth.context_processors.auth",
    "django.contrib.messages.context_processors.messages",
    "django.core.context_processors.debug",
    "django.core.context_processors.i18n",
    "django.core.context_processors.static",
    "django.core.context_processors.media",
    "django.core.context_processors.request",
)

INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.staticfiles',
    'forms_builder.forms',
)

try:
    import south
except ImportError:
    pass
else:
    INSTALLED_APPS += ("south",)

FORMS_BUILDER_EXTRA_FIELDS = (
    (100, "django.forms.BooleanField", "My cool checkbox"),
)

try:
    from local_settings import *
except ImportError:
    pass

TEMPLATE_DEBUG = DEBUG

@@ -1862,24 +1862,76 @@
 .forms',%0A)%0A%0A
+from django import VERSION%0Aif VERSION %3C (1, 7):%0A    
 try:%0A    imp
@@ -1927,16 +1927,20 @@
 ry:%0A    
+  
+  
 import s
@@ -1944,16 +1944,20 @@
 t south%0A
+    
 except I
@@ -1976,19 +1976,31 @@
     
+   
+ 
 pass%0A
+    
 else:%0A
+    
     

Exclude south from example settings for Django 1.7