Skip to content

Commit 4f48dd7

Browse files
committed
fixed lookup bug
1 parent 0742c0c commit 4f48dd7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cigar_example/cigar_example/settings.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Django settings for cigar_example project.
2+
from os.path import dirname, abspath, join
23

34
DEBUG = True
45
TEMPLATE_DEBUG = DEBUG
@@ -8,10 +9,13 @@
89

910
MANAGERS = ADMINS
1011

12+
DJANGO_ROOT = dirname(dirname(abspath(__file__)))
13+
root = lambda *x: abspath(join(abspath(DJANGO_ROOT), *x))
14+
1115
DATABASES = {
1216
'default': {
1317
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
14-
'NAME': 'db.sql', # Or path to database file if using sqlite3.
18+
'NAME': root('db.sql'), # Or path to database file if using sqlite3.
1519
'USER': '', # Not used with sqlite3.
1620
'PASSWORD': '', # Not used with sqlite3.
1721
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.

0 commit comments

Comments
 (0)