1. boblefrag
  2. django_todo

Commits

boblefrag  committed 9531407

initial setting

  • Participants
  • Parent commits d5a32ae
  • Branches default

Comments (0)

Files changed (5)

File todo/devel_settings.py

View file
  • Ignore whitespace
+
+import os
+import settings
+SETTINGS_DIR = os.path.abspath(os.path.dirname(__file__))
+DATABASES = {"default":{
+    "ENGINE":"django.db.backends.sqlite3",
+    "NAME":os.path.join(SETTINGS_DIR,"devel.db")
+        }}
+MEDIA_ROOT = os.path.join(SETTINGS_DIR,"public/site_media")
+settings.INSTALLED_APPS += 'django.contrib.admin',

File todo/local_settings.py

View file
  • Ignore whitespace
+LOCAL_SETTING= True    
+from devel_settings import *

File todo/production_settings.py

View file
  • Ignore whitespace
+import os
+import settings
+SETTINGS_DIR = os.path.abspath(os.path.dirname(__file__))
+DATABASES = {
+    "default":{
+        "ENGINE":"django.db.backends.mysql",
+        "NAME":"blo11_todo",
+        "USER":"blo11",
+        "PASSWORD":"130577",
+        "HOST":"mysql.alwaysdata.com",
+        "PORT":"",
+}}
+MEDIA_ROOT = os.path.join(SETTINGS_DIR,"public/site_media")
+settings.INSTALLED_APPS += "django.contrib.admin",

File todo/settings.py

View file
  • Ignore whitespace
     # Uncomment the next line to enable the admin:
     # 'django.contrib.admin',
 )
+
+try:
+    LOCAL_SETTINGS
+except NameError:
+    try:
+        from local_settings import *
+    except ImportError:
+        pass
+ADMIN_MEDIA_PREFIX = 'admin/media/'
+

File todo/urls.py

View file
  • Ignore whitespace
+
 from django.conf.urls.defaults import *
-
-# 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('',
-    # Example:
-    # (r'^todo/', include('todo.foo.urls')),
-
-    # Uncomment the admin/doc line below and add 'django.contrib.admindocs' 
-    # to INSTALLED_APPS to enable admin documentation:
-    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
-
-    # Uncomment the next line to enable the admin:
-    # (r'^admin/', include(admin.site.urls)),
+    (r'^admin/', include(admin.site.urls)),
 )