--- /dev/null
+#!/usr/bin/env python
+import os
+import sys
+
+ROOT = os.path.dirname(os.path.abspath(__file__))
+sys.path = [
+ os.path.join(ROOT, 'apps'),
+ os.path.join(ROOT, 'lib'),
+ os.path.join(ROOT, 'lib/librarian'),
+] + sys.path
+
+if __name__ == "__main__":
+ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "wolnelektury.settings")
+
+ from django.core.management import execute_from_command_line
+
+ execute_from_command_line(sys.argv)
+++ /dev/null
-#!/usr/bin/env python
-import os.path
-import sys
-
-ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
-
-# Add apps and lib directories to PYTHONPATH
-sys.path = [
- os.path.join(ROOT, 'apps'),
- os.path.join(ROOT, 'lib'),
- os.path.join(ROOT, 'lib/librarian'),
-] + sys.path
-
-from django.core.management import execute_manager
-
-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)
# Django settings for wolnelektury project.
from os import path
-from settings.basic import *
-from settings.auth import *
-from settings.cache import *
-from settings.celery import *
-from settings.contrib import *
-from settings.custom import *
-from settings.locale import *
-from settings.static import *
+from .basic import *
+from .auth import *
+from .cache import *
+from .celery import *
+from .contrib import *
+from .custom import *
+from .locale import *
+from .static import *
TEMPLATE_CONTEXT_PROCESSORS = (
# Load localsettings, if they exist
try:
- from localsettings import *
+ from wolnelektury.localsettings import *
except ImportError:
pass
-
from os import path
-from settings.paths import PROJECT_DIR
+from .paths import PROJECT_DIR
DEBUG = False
TEMPLATE_DEBUG = DEBUG
from os import path
-from settings.paths import PROJECT_DIR
+from .paths import PROJECT_DIR
CACHES = {
'default': {
# -*- coding: utf-8 -*-
from os import path
-from settings.paths import PROJECT_DIR
+from .paths import PROJECT_DIR
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
from os import path
-from settings.paths import PROJECT_DIR
+from .paths import PROJECT_DIR
# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"