Changeset - ab300f858903
[Not reviewed]
0 2 0
Branko Majic (branko) - 10 years ago 2015-09-13 22:09:20
branko@majic.rs
MDT-1: Use better pathfinding for development environment when locating the sqlite3 database. Set a saner default for redirect after login (redirect to 'index' view, whatever it may be).
2 files changed with 4 insertions and 1 deletions:
0 comments (0 inline, 0 general)
project/project_name/settings/base.py
Show inline comments
 
@@ -70,12 +70,15 @@ MEDIA_URL = '/media/'
 
# files. Calculated based on assets root.
 
MEDIA_ROOT = os.path.normpath(os.path.join(ASSETS_ROOT, "media"))
 

	
 
# Absolute path to the directory static files should be collected to. Calculated
 
# based on project assets root.
 
STATIC_ROOT = os.path.normpath(os.path.join(ASSETS_ROOT, "static"))
 

	
 
# Additional locations for static files. Useful for project-wide overrides of
 
# default static files.
 
STATICFILES_DIRS = (
 
    os.path.normpath(os.path.join(PROJECT_ROOT, "static")),
 
)
 

	
 
# Redirect user to specified view after login.
 
LOGIN_REDIRECT_URL = "index"
project/project_name/settings/development.py
Show inline comments
 
@@ -31,22 +31,22 @@ for template_config in TEMPLATES:
 
# Site administrators and managers.
 
ADMINS = (
 
    # ('Your Name', 'your_email@example.com'),
 
)
 
MANAGERS = ADMINS
 

	
 
# Database configuration. sqlite3 is used for development for convenience. See
 
# testing/production environment settings and official Django documentation if a
 
# proper database should be used.
 
DATABASES = {
 
    'default': {
 
        'ENGINE': 'django.db.backends.sqlite3',
 
        'NAME': 'development.sqlite3',
 
        'NAME': os.path.join(PROJECT_ROOT, 'development.sqlite3'),
 
    }
 
}
 

	
 
# Hosts that are valid for accessing this site. For development, empty list is
 
# sufficient.
 
ALLOWED_HOSTS = []
 

	
 
# Local time zone for development environment.
 
TIME_ZONE = 'Europe/Stockholm'
0 comments (0 inline, 0 general)