diff options
Diffstat (limited to 'example_project')
| -rw-r--r-- | example_project/__init__.py | 3 | ||||
| -rw-r--r-- | example_project/local_settings.py.gitlab-ci | 4 | ||||
| -rw-r--r-- | example_project/local_settings.py.sample | 3 | ||||
| -rwxr-xr-x | example_project/manage.py | 17 | ||||
| -rw-r--r-- | example_project/settings.py | 18 | ||||
| -rw-r--r-- | example_project/urls.py | 2 | 
6 files changed, 19 insertions, 28 deletions
| diff --git a/example_project/__init__.py b/example_project/__init__.py index 0cfc3ae26..c6adb7559 100644 --- a/example_project/__init__.py +++ b/example_project/__init__.py @@ -1,5 +1,6 @@  # force the retranslation of generated strings and external module -from django.utils.translation import ugettext as _ +from django.utils.translation import ugettext_lazy as _ +  _(u"username")  _(u"email address")  _(u"warehouse") diff --git a/example_project/local_settings.py.gitlab-ci b/example_project/local_settings.py.gitlab-ci index 81196b4a0..913f10fea 100644 --- a/example_project/local_settings.py.gitlab-ci +++ b/example_project/local_settings.py.gitlab-ci @@ -4,7 +4,7 @@ DATABASES = {          'NAME': 'gis',          'USER': 'gis',          'PASSWORD': 'gis', -        'HOST': 'iggdrasil-postgis-1.5', +        'HOST': 'mdillon-postgis',          'PORT': '5432',      }  } @@ -13,3 +13,5 @@ LOGFILE = '/tmp/ishtar.log'  PROJECT_SLUG = "CI-instance"  USE_SPATIALITE_FOR_TESTS = False + +SECRET_KEY = "not-so-secret-key" diff --git a/example_project/local_settings.py.sample b/example_project/local_settings.py.sample index 5a7550d9a..f49963c84 100644 --- a/example_project/local_settings.py.sample +++ b/example_project/local_settings.py.sample @@ -4,14 +4,13 @@  # rename this file to local_settings.py and overload settings in this file  # Make this string unique, and don't share it with anybody. +# Don't leave it empty  SECRET_KEY = ''  ADMINS = (      # ('Your Name', 'your_email@domain.com'),  ) -MANAGERS = ADMINS -  DATABASES = {      'default': {          'NAME': 'ishtar', diff --git a/example_project/manage.py b/example_project/manage.py index 4981a4830..80114eb68 100755 --- a/example_project/manage.py +++ b/example_project/manage.py @@ -1,15 +1,12 @@  #!/usr/bin/env python -from django.core.management import execute_manager -import os, sys +import os +import sys  sys.path.append(os.path.abspath('..')) -try: -    import settings # Assumed to be in the same directory. -except ImportError: -    import sys -    sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__) -    sys.exit(1) -  if __name__ == "__main__": -    execute_manager(settings) +    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") + +    from django.core.management import execute_from_command_line + +    execute_from_command_line(sys.argv) diff --git a/example_project/settings.py b/example_project/settings.py index 78d97f0ae..2e91cb73f 100644 --- a/example_project/settings.py +++ b/example_project/settings.py @@ -10,7 +10,8 @@ DEBUG_TOOLBAR = False  TEMPLATE_DEBUG = DEBUG  SQL_DEBUG = False  DJANGO_EXTENSIONS = False -USE_SPATIALITE_FOR_TESTS = True +USE_SPATIALITE_FOR_TESTS = False +TEST_VIEWS = True  if "test" in sys.argv:      sys.path.insert(0, '..') @@ -35,7 +36,6 @@ ODT_TEMPLATE = ROOT_PATH + "../ishtar_common/static/template.odt"  LOGIN_REDIRECT_URL = "/" + URL_PATH -AUTH_PROFILE_MODULE = 'ishtar_common.IshtarUser'  ACCOUNT_ACTIVATION_DAYS = 7  # change this in local_settings @@ -137,10 +137,8 @@ INSTALLED_APPS = [      'django.contrib.sites',      'django.contrib.gis',      'django.contrib.staticfiles', -    'django.contrib.formtools',      'django.contrib.messages',      'django.contrib.humanize', -    'south',      'registration',      # 'geodjangofla',      'ishtar_pdl', @@ -230,9 +228,6 @@ ISHTAR_DOC_TYPES = {u"undefined": u"Undefined"}  ISHTAR_DPTS = [] -PRE_APPS = [] -EXTRA_APPS = [] -  TEST_RUNNER = 'ishtar_common.tests.ManagedModelTestRunner'  try: @@ -242,12 +237,9 @@ except ImportError, e:  TESTING = sys.argv[1:2] == ['test'] -if TESTING: -    SOUTH_TESTS_MIGRATE = False - -    if USE_SPATIALITE_FOR_TESTS: -        DATABASES['default']['ENGINE'] = \ -            'django.contrib.gis.db.backends.spatialite' +# if TESTING and USE_SPATIALITE_FOR_TESTS: +#     DATABASES['default']['ENGINE'] = \ +#         'django.contrib.gis.db.backends.spatialite'  PROJECT_SLUG = locals().get('PROJECT_SLUG', 'default') diff --git a/example_project/urls.py b/example_project/urls.py index 62a6b1e04..0e138eb8e 100644 --- a/example_project/urls.py +++ b/example_project/urls.py @@ -1,5 +1,5 @@  from django.conf import settings -from django.conf.urls.defaults import * +from django.conf.urls import patterns, include, url  from django.contrib import admin  admin.autodiscover() | 
