mirror of https://github.com/interlegis/sigi.git
Guilherme Gondim
17 years ago
3 changed files with 148 additions and 45 deletions
@ -0,0 +1,50 @@ |
|||||
|
# LOCAL SETTINGS -*- Mode: Python; -*- |
||||
|
# --------------------------------------------------------------------- |
||||
|
# |
||||
|
# Template of Django settings for local user. Copy to local_settings.py |
||||
|
# and make your necessary changes. |
||||
|
# |
||||
|
|
||||
|
|
||||
|
################################## |
||||
|
## TEMPLATE FOR DEVELOPMENT USE ## |
||||
|
################################## |
||||
|
|
||||
|
#DEBUG = True |
||||
|
#TEMPLATE_DEBUG = DEBUG |
||||
|
|
||||
|
|
||||
|
#################################### |
||||
|
## TEMPLATE FOR USE IN PRODUCTION ## |
||||
|
#################################### |
||||
|
|
||||
|
#DEBUG = False |
||||
|
#TEMPLATE_DEBUG = DEBUG |
||||
|
#MAINTENANCE = True |
||||
|
|
||||
|
|
||||
|
#ADMINS = (('root', 'root@localhost'),) |
||||
|
#MANAGERS = ADMINS |
||||
|
#SERVER_EMAIL = 'root@localhost' |
||||
|
#DEFAULT_FROM_EMAIL = 'noreply@localhost' |
||||
|
#SEND_BROKEN_LINK_EMAILS = True |
||||
|
|
||||
|
#EMAIL_HOST = 'smtp.otherhost.net' |
||||
|
#INTERNAL_IPS = ('127.0.0.1',) |
||||
|
|
||||
|
|
||||
|
#DATABASE_ENGINE = 'mysql' # 'postgresql_psycopg2', 'postgresql', |
||||
|
# 'mysql', 'sqlite3' or 'ado_mssql'. |
||||
|
#DATABASE_NAME = 'mydbname' # not used with SQLite |
||||
|
#DATABASE_USER = 'mydbuser' # not used with SQLite |
||||
|
#DATABASE_PASSWORD = 'mydbpassword' # not used with SQLite |
||||
|
#DATABASE_HOST = 'localhost' # not used with SQLite |
||||
|
#DATABASE_PORT = '' # Empty for default. Not used with SQLite. |
||||
|
|
||||
|
#SESSION_EXPIRE_AT_BROWSER_CLOSE = True |
||||
|
|
||||
|
#CACHE_BACKEND = 'file:///var/tmp/sigi_cache' |
||||
|
|
||||
|
# Used to provide a seed in secret-key hashing algorithms. Set this to |
||||
|
# a random string - the longer, the better. |
||||
|
#SECRET_KEY = 'random-ascii-string' |
@ -1,8 +1,44 @@ |
|||||
|
from django.conf import settings |
||||
from django.conf.urls.defaults import * |
from django.conf.urls.defaults import * |
||||
from django.contrib import admin |
from django.contrib import admin |
||||
|
from django.contrib import databrowse |
||||
|
from django.db.models import get_models |
||||
|
|
||||
admin.autodiscover() |
admin.autodiscover() |
||||
|
map(databrowse.site.register, get_models()) |
||||
|
|
||||
urlpatterns = patterns('', |
urlpatterns = patterns( |
||||
(r'^admin/(.*)', admin.site.root), |
'', |
||||
|
|
||||
|
(r'^(.*)', admin.site.root), |
||||
|
(r'^doc/', include('django.contrib.admindocs.urls')), |
||||
|
|
||||
|
# databrowse |
||||
|
(r'^databrowse/(.*)', databrowse.site.root), |
||||
|
|
||||
|
# bug report |
||||
|
#(r'^bug_report/$', 'sigi.views.bug_report'), |
||||
) |
) |
||||
|
|
||||
|
if settings.MAINTENANCE: |
||||
|
urlpatterns = patterns('', |
||||
|
(r'.*', 'sigi.views.service_unavailable') |
||||
|
) + urlpatterns |
||||
|
|
||||
|
if settings.DEBUG: |
||||
|
urlpatterns += patterns( |
||||
|
'', |
||||
|
|
||||
|
# static files |
||||
|
(r'^media/(?P<path>.*)$', 'django.views.static.serve', |
||||
|
{'document_root': settings.MEDIA_ROOT}), |
||||
|
|
||||
|
(r'^404/$', 'django.views.generic.simple.direct_to_template', |
||||
|
{'template': '404.html'}), |
||||
|
|
||||
|
(r'^500/$', 'django.views.generic.simple.direct_to_template', |
||||
|
{'template': '500.html'}), |
||||
|
|
||||
|
(r'^503/$', 'django.views.generic.simple.direct_to_template', |
||||
|
{'template': '503.html'}), |
||||
|
) |
||||
|
Loading…
Reference in new issue