From 98f57f3dafddb4331bfade062f4cab84f1c59a60 Mon Sep 17 00:00:00 2001 From: benoitc Date: Mon, 20 Feb 2012 22:17:36 +0100 Subject: [PATCH] add admin so we can test with SQL eventually --- .gitignore | 1 + examples/frameworks/django/testing/testing/settings.py | 6 +++--- examples/frameworks/django/testing/testing/urls.py | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index a0809138..764ea0b1 100755 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ nohup.out doc/.sass-cache examples/frameworks/pylonstest/PasteScript* examples/frameworks/pylonstest/pylonstest.egg-info/ +examples/frameworks/django/testing/testdb.sql diff --git a/examples/frameworks/django/testing/testing/settings.py b/examples/frameworks/django/testing/testing/settings.py index 1994194f..cb8eca68 100644 --- a/examples/frameworks/django/testing/testing/settings.py +++ b/examples/frameworks/django/testing/testing/settings.py @@ -11,8 +11,8 @@ MANAGERS = ADMINS DATABASES = { 'default': { - 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. - 'NAME': '', # Or path to database file if using sqlite3. + 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. + 'NAME': 'testdb.sql', # 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. @@ -119,7 +119,7 @@ INSTALLED_APPS = ( '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', 'testing.apps.someapp', diff --git a/examples/frameworks/django/testing/testing/urls.py b/examples/frameworks/django/testing/testing/urls.py index 955ce714..00818ac3 100644 --- a/examples/frameworks/django/testing/testing/urls.py +++ b/examples/frameworks/django/testing/testing/urls.py @@ -1,8 +1,8 @@ from django.conf.urls 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: @@ -13,7 +13,7 @@ urlpatterns = patterns('', # url(r'^admin/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: - # url(r'^admin/', include(admin.site.urls)), + url(r'^admin/', include(admin.site.urls)), (r'^', include("testing.apps.someapp.urls")), )