Deploy fixes
This commit is contained in:
1 parent
d3d5bcb27c
commit
8f13ebf59a
3 files changed
+17
-8
No files matched your search
@@ -1,3 +1,6 @@
|
||||
*.pyc
|
||||
*.swp
|
||||
temp
|
||||
*.log
|
||||
settings.py
|
||||
dns_mdb.db
|
||||
+10
-1
@@ -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()
|
||||
@@ -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
|
||||
Reference in new issue
Block a user