diff --git a/example/settings.py b/example/settings.py index 9b2796d2..ce88ba93 100644 --- a/example/settings.py +++ b/example/settings.py @@ -14,12 +14,15 @@ MANAGERS = ADMINS -DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. -DATABASE_NAME = 'cms.db' # Or path to database file if using sqlite3. -DATABASE_USER = '' # Not used with sqlite3. -DATABASE_PASSWORD = '' # Not used with sqlite3. -DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3. -DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3. +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': 'cms.db', + 'USER': '', + 'PASSWORD': '', + 'HOST': '', + } +} # Local time zone for this installation. Choices can be found here: # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name @@ -38,12 +41,6 @@ STATIC_ROOT = os.path.join(PROJECT_DIR, 'static') STATIC_URL = '/static/' -# Absolute path to the directory that holds pages media. -# PAGES_MEDIA_ROOT = os.path.join(STATIC_ROOT, 'pages', 'media', 'pages') -# Absolute path to the directory that holds media. -ADMIN_MEDIA_ROOT = os.path.join(STATIC_ROOT, 'admin_media') -ADMIN_MEDIA_PREFIX = '/admin_media/' - FIXTURE_DIRS = [os.path.join(PROJECT_DIR, 'fixtures')] @@ -52,15 +49,12 @@ # List of callables that know how to import templates from various sources. TEMPLATE_LOADERS = ( - # this syntax is deprecated with django 1.2 - 'django.template.loaders.filesystem.load_template_source', - 'django.template.loaders.app_directories.load_template_source', - # could help - 'django.template.loaders.eggs.load_template_source', + 'django.template.loaders.filesystem.Loader', + 'django.template.loaders.app_directories.Loader', ) TEMPLATE_CONTEXT_PROCESSORS = ( - "django.core.context_processors.auth", + "django.contrib.auth.context_processors.auth", "django.core.context_processors.i18n", "django.core.context_processors.debug", "django.core.context_processors.request", @@ -78,6 +72,7 @@ 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.middleware.doc.XViewMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', ) ROOT_URLCONF = 'example.urls' @@ -97,11 +92,11 @@ 'django.contrib.sessions', 'django.contrib.admin', 'django.contrib.sites', + 'django.contrib.staticfiles', 'pages.testproj.documents', 'taggit', 'pages', 'mptt', - 'staticfiles', #'tinymce', # disabled to make "setup.py test" to work properly #'south', @@ -171,9 +166,13 @@ def language_mapping(lang): SITE_ID = 1 PAGE_USE_SITE_ID = False -HAYSTACK_SITECONF = 'example.search_sites' -HAYSTACK_SEARCH_ENGINE = 'whoosh' -HAYSTACK_WHOOSH_PATH = os.path.join(PROJECT_DIR, 'whoosh_index') +HAYSTACK_CONNECTIONS = { + 'default': { + 'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine', + 'PATH': os.path.join(os.path.dirname(__file__), 'whoosh_index'), + 'INCLUDE_SPELLING': True, + }, +} PAGE_REAL_TIME_SEARCH = False diff --git a/example/urls.py b/example/urls.py index a2c7c9b3..89d1cf65 100644 --- a/example/urls.py +++ b/example/urls.py @@ -3,7 +3,6 @@ from django.conf.urls.defaults import url, include, patterns from django.conf.urls.defaults import handler404, handler500 from django.contrib import admin -from django.contrib.staticfiles.urls import staticfiles_urlpatterns from pages.views import details from pages.urlconf_registry import register_urlconf @@ -22,8 +21,6 @@ ) -urlpatterns += staticfiles_urlpatterns() - urlpatterns += patterns('', # this gonna match /admin if someone forget the traling slash (r'^', include('pages.urls')), diff --git a/pages/templates/admin/pages/page/change_list.html b/pages/templates/admin/pages/page/change_list.html index 285f5aec..8a46ca30 100644 --- a/pages/templates/admin/pages/page/change_list.html +++ b/pages/templates/admin/pages/page/change_list.html @@ -42,7 +42,7 @@