Permalink
Browse files

Added localsettings example

  • Loading branch information...
1 parent e3a6a3a commit b1eed56ce03371c3c15cc499a4ec1f6a6dbf18f4 @igorgue committed Nov 12, 2011
Showing with 44 additions and 26 deletions.
  1. +11 −0 .gitignore
  2. +14 −0 local_settings_example.py
  3. 0 manage.py
  4. +15 −18 settings.py
  5. +4 −8 urls.py
View
@@ -0,0 +1,11 @@
+.DS_Store
+*.pyo
+*.pyc
+*.log
+*.swp
+*.swo
+build
+dist
+paython.egg-info
+local_settings.py
+*.esproj
View
@@ -0,0 +1,14 @@
+DEBUG = True
+TEMPLATE_DEBUG = DEBUG
+
+DATABASES = {
+ 'default': {
+ 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
+ 'NAME': os.path.join(PROJECT_PATH, 'data/database'), # Or path to database file if using sqlite3.
+ 'USER': '', # Not used with sqlite3.
+ 'PASSWORD': '', # Not used with sqlite3.
+ 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
+ 'PORT': '', # Set to empty string for default. Not used with sqlite3.
+ }
+}
+
View
0 manage.py 100644 → 100755
No changes.
View
@@ -1,24 +1,16 @@
# Django settings for douchejar project.
-
-DEBUG = True
-TEMPLATE_DEBUG = DEBUG
+import os
+import sys
ADMINS = (
- # ('Your Name', 'your_email@example.com'),
+ ('Igor Guerrero', 'igfgt1@gmail.com'),
)
MANAGERS = ADMINS
-DATABASES = {
- 'default': {
- 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
- 'NAME': '', # Or path to database file if using sqlite3.
- 'USER': '', # Not used with sqlite3.
- 'PASSWORD': '', # Not used with sqlite3.
- 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
- 'PORT': '', # Set to empty string for default. Not used with sqlite3.
- }
-}
+PROJECT_PATH = os.path.dirname(__file__)
+
+sys.path.insert(0, PROJECT_PATH)
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
@@ -27,7 +19,7 @@
# timezone as the operating system.
# If running in a Windows environment this must be set to the same as your
# system time zone.
-TIME_ZONE = 'America/Chicago'
+TIME_ZONE = 'America/New_York'
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
@@ -37,11 +29,11 @@
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
-USE_I18N = True
+USE_I18N = False
# If you set this to False, Django will not format dates, numbers and
# calendars according to the current locale
-USE_L10N = True
+USE_L10N = False
# Absolute filesystem path to the directory that will hold user-uploaded files.
# Example: "/home/media/media.lawrence.com/media/"
@@ -116,7 +108,7 @@
'django.contrib.messages',
'django.contrib.staticfiles',
# Uncomment the next line to enable the admin:
- # 'django.contrib.admin',
+ 'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
)
@@ -143,3 +135,8 @@
},
}
}
+
+try:
+ from local_settings import *
+except ImportError:
+ raise RuntimeError("Create local_settings.")
View
12 urls.py
@@ -1,17 +1,13 @@
from django.conf.urls.defaults import patterns, include, url
-# Uncomment the next two lines to enable the admin:
-# from django.contrib import admin
-# admin.autodiscover()
+from django.contrib import admin
+admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'douchejar.views.home', name='home'),
# url(r'^douchejar/', include('douchejar.foo.urls')),
- # Uncomment the admin/doc line below to enable admin documentation:
- # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
-
- # Uncomment the next line to enable the admin:
- # url(r'^admin/', include(admin.site.urls)),
+ # Admin
+ url(r'^admin/', include(admin.site.urls)),
)

0 comments on commit b1eed56

Please sign in to comment.