Skip to content

Commit

Permalink
enabling django admin
Browse files Browse the repository at this point in the history
  • Loading branch information
madisona committed Nov 20, 2010
1 parent 3fed90f commit 839595e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 deletions.
30 changes: 18 additions & 12 deletions src/settings.py
@@ -1,22 +1,26 @@
# Django settings for django_project project.

import os

PROJECT_DIR = os.path.dirname(__file__)

DEBUG = True
TEMPLATE_DEBUG = DEBUG

ADMINS = (
# ('Your Name', 'your_email@domain.com'),
('Aaron Madison', 'aaron.l.madison@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.
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'project_db', # 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.
}
}

Expand All @@ -27,7 +31,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 = 'UTC'

# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
Expand All @@ -37,7 +41,7 @@

# 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
Expand Down Expand Up @@ -75,7 +79,7 @@
'django.contrib.messages.middleware.MessageMiddleware',
)

ROOT_URLCONF = 'src.urls'
ROOT_URLCONF = 'urls'

TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
Expand All @@ -90,7 +94,9 @@
'django.contrib.sites',
'django.contrib.messages',
# 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',
'django.contrib.admindocs',

'contact_form',
)
8 changes: 4 additions & 4 deletions src/urls.py
@@ -1,16 +1,16 @@
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'^django_project/', include('django_project.foo.urls')),

# Uncomment the admin/doc line below to enable admin documentation:
# (r'^admin/doc/', include('django.contrib.admindocs.urls')),
(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)),
)

0 comments on commit 839595e

Please sign in to comment.