Use gramps const for locations

svn: r13544
This commit is contained in:
Doug Blank 2009-11-10 13:04:14 +00:00
parent 3be59844d4
commit 7063d4215c
3 changed files with 14 additions and 12 deletions

View File

@ -10,7 +10,7 @@ init_gramps:
python init_gramps.py # clear primary and secondary tables
run:
python manage.py runserver
PYTHONPATH=../../../src python manage.py runserver
sql:
python manage.py sqlall > gramps_sql.txt

View File

@ -1,5 +1,8 @@
# Django settings for gramps project.
import const
import os
DEBUG = True
TEMPLATE_DEBUG = DEBUG
@ -9,7 +12,7 @@ ADMINS = (
MANAGERS = ADMINS
DATABASE_ENGINE = 'sqlite3'
DATABASE_NAME = '/home/dblank/gramps/trunk/src/gen/web/sqlite.db'
DATABASE_NAME = os.path.join(const.WEB_DIR, 'sqlite.db')
DATABASE_USER = ''
DATABASE_PASSWORD = ''
DATABASE_HOST = ''
@ -38,7 +41,7 @@ ROOT_URLCONF = 'gen.web.urls'
TEMPLATE_DIRS = (
# Use absolute paths, not relative paths.
"/home/dblank/gramps/trunk/src/data/templates",
os.path.join(const.DATA_DIR, "templates"),
)
INSTALLED_APPS = (

View File

@ -1,5 +1,8 @@
from django.conf.urls.defaults import *
import os
import const
from django.conf.urls.defaults import *
from django.contrib import admin
admin.autodiscover()
@ -14,16 +17,12 @@ urlpatterns = patterns('',
urlpatterns += patterns('',
# Static serves! DANGEROUS in production:
(r'^styles/(?P<path>.*)$', 'django.views.static.serve',
{'document_root':
'/home/dblank/gramps/trunk/src/data',
'show_indexes':
True},
{'document_root': const.DATA_DIR,
'show_indexes': True},
),
(r'^images/(?P<path>.*)$', 'django.views.static.serve',
{'document_root':
'/home/dblank/gramps/trunk/src/images',
'show_indexes':
True},
{'document_root': const.IMAGE_DIR,
'show_indexes': True},
),
)