Skip to content

Commit

Permalink
Try fix deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
macropin committed Apr 16, 2012
1 parent d234897 commit 0c46ac3
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 27 deletions.
31 changes: 15 additions & 16 deletions settings.py → adlibre_tms/local_settings.py
@@ -1,8 +1,20 @@
from adlibre_tms import settings
#### Database Location ../db/

import os

PROJECT_PATH = os.path.abspath(os.path.split(__file__)[0])

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(PROJECT_PATH, '..', 'db', 'tms.sqlite'),
}
}
###

ADMINS = (
#('Admin', 'admin@example.com'),
)
#('Admin', 'admin@example.com'),
)

# Make this unique, and don't share it with anybody.
SECRET_KEY = 'change me'
Expand All @@ -17,17 +29,4 @@
# Turn off demo
DEMO = False

##########

import os

PROJECT_PATH = os.path.abspath(os.path.split(__file__)[0])

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(PROJECT_PATH, '..', 'db', 'tms.sqlite'),
}
}

print PROJECT_PATH
17 changes: 7 additions & 10 deletions adlibre_tms/settings.py
Expand Up @@ -23,12 +23,12 @@
# tells django to serve media through django.views.static.serve.
SERVE_MEDIA = DEBUG

#DATABASES = {
# 'default': {
# 'ENGINE': 'django.db.backends.sqlite3',
# 'NAME': os.path.join(PROJECT_PATH, '..', '..', 'db', 'tms.sqlite'),
# }
#}
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(PROJECT_PATH, '..', '..', 'db', 'tms.sqlite'),
}
}

# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
Expand Down Expand Up @@ -143,17 +143,14 @@
'django.contrib.admin',
'django.contrib.sitemaps',
#'django.contrib.flatpages',
#for Django 1.3
'django.contrib.staticfiles',

# external
'uni_form',
'pagination',

# for Django 1.2.1
#'staticfiles',
# Compresses CSS/JS files from media/static
"compressor",
'pagination',

# local
'accounts',
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -36,7 +36,7 @@ def find_packages(path, base="" ):
data_files = [
('db', ['db/.gitignore']),
('deployment', glob.glob('deployment/*')),
('adlibre_tms', ['settings.py', 'adlibre_tms/manage.py']),
('adlibre_tms', ['adlibre_tms/local_settings.py', 'adlibre_tms/manage.py']),
],
install_requires=[
'BeautifulSoup==3.2.0',
Expand Down

0 comments on commit 0c46ac3

Please sign in to comment.