diff --git a/.gitignore b/.gitignore index 4f093b1..e38168a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ *.pyc +*.swp temp *.log +settings.py +dns_mdb.db diff --git a/apache/django.wsgi b/apache/django.wsgi index 13e0793..7f8d44a 100644 --- a/apache/django.wsgi +++ b/apache/django.wsgi @@ -1,6 +1,15 @@ import os -os.environ['DJANGO_SETTINGS_MODULE'] = 'dns_mdb.settings' +os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' + +# fix path +def map_path(target_name=''): + '''Enables path names to be decided at runtime.''' + return join(dirname(__file__), target_name).replace('\\', '/') + +path = map_path("..") +if path not in sys.path: + sys.path.append(path) import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler() diff --git a/settings.py b/settings-sample.py similarity index 91% rename from settings.py rename to settings-sample.py index fdfdf17..7eeb530 100644 --- a/settings.py +++ b/settings-sample.py @@ -12,8 +12,8 @@ MANAGERS = ADMINS DATABASES = { 'default': { - 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. - 'NAME': 'dns_mdb', # Or path to database file if using sqlite3. + 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. + 'NAME': 'dns_mdb.db', # Or path to database file if using sqlite3. 'USER': 'dns_mdb', # Not used with sqlite3. 'PASSWORD': 'dns_mdb', # Not used with sqlite3. 'HOST': 'hel', # Set to empty string for localhost. Not used with sqlite3. @@ -66,7 +66,7 @@ STATIC_URL = '/static/' # URL prefix for admin static files -- CSS, JavaScript and images. # Make sure to use a trailing slash. # Examples: "http://foo.com/static/admin/", "/static/admin/". -ADMIN_MEDIA_PREFIX = '/static/admin/' +ADMIN_MEDIA_PREFIX = '/media/' # Additional locations of static files STATICFILES_DIRS = ( @@ -101,7 +101,7 @@ MIDDLEWARE_CLASSES = ( 'django.contrib.messages.middleware.MessageMiddleware', ) -ROOT_URLCONF = 'dns_mdb.urls' +ROOT_URLCONF = 'urls' TEMPLATE_DIRS = ( # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". @@ -117,10 +117,7 @@ INSTALLED_APPS = ( 'django.contrib.messages', 'django.contrib.staticfiles', 'mdb', - # Uncomment the next line to enable the admin: 'django.contrib.admin', - # Uncomment the next line to enable admin documentation: - # 'django.contrib.admindocs', ) # A sample logging configuration. The only tangible logging