--- settings.py.org 2008-12-20 00:09:54.000000000 -0500 +++ settings.py 2008-12-20 14:06:14.000000000 -0500 @@ -1,3 +1,4 @@ +import os # Django settings for djangocms2 project. DEBUG = True @@ -9,8 +10,8 @@ MANAGERS = ADMINS -DATABASE_ENGINE = '' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. -DATABASE_NAME = '' # Or path to database file if using sqlite3. +DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. +DATABASE_NAME = 'djangocms2.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. @@ -21,7 +22,7 @@ # although not all choices may be available on all operating systems. # 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 @@ -35,12 +36,12 @@ # Absolute path to the directory that holds media. # Example: "/home/media/media.lawrence.com/" -MEDIA_ROOT = '' +MEDIA_ROOT = os.path.join(os.path.dirname(__file__), 'media').replace('\\', '/') # URL that handles the media served from MEDIA_ROOT. Make sure to use a # trailing slash if there is a path component (optional in other cases). # Examples: "http://media.lawrence.com", "http://example.com/media/" -MEDIA_URL = '' +MEDIA_URL = '/m' # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a # trailing slash. @@ -57,10 +58,22 @@ # 'django.template.loaders.eggs.load_template_source', ) +TEMPLATE_CONTEXT_PROCESSORS = ( + "django.core.context_processors.auth", + "django.core.context_processors.i18n", + "django.core.context_processors.debug", + "django.core.context_processors.request", + "django.core.context_processors.media", + "cms.context_processors.media", +) + MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.middleware.locale.LocaleMiddleware', + 'django.middleware.doc.XViewMiddleware', + 'cms.middleware.CurrentSiteMiddleware', ) ROOT_URLCONF = 'djangocms2.urls' @@ -69,6 +82,7 @@ # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". # Always use forward slashes, even on Windows. # Don't forget to use absolute paths, not relative paths. + os.path.join(os.path.dirname(__file__), 'templates').replace('\\', '/'), ) INSTALLED_APPS = ( @@ -76,4 +90,11 @@ 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', + 'django.contrib.admin', + 'cms', + 'cms.plugins.text', + 'cms.plugins.picture', + 'mptt', ) + +DEFAULT_CMS_TEMPLATE = 'index.html' --- urls.py.org 2008-12-20 00:14:40.000000000 -0500 +++ urls.py 2008-12-20 01:01:06.000000000 -0500 @@ -1,8 +1,9 @@ from django.conf.urls.defaults import * +from django.conf import settings # 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: @@ -13,5 +14,13 @@ # (r'^admin/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: - # (r'^admin/(.*)', admin.site.root), + (r'^admin/(.*)', admin.site.root), + (r'', include('cms.urls')), ) + +if settings.DEBUG: + urlpatterns += patterns('', + (r'^m/(?P.*)$', 'django.views.static.serve', + {'document_root': settings.MEDIA_ROOT}), +) + --- cms/admin/__init__.py.org 2008-12-20 01:10:07.000000000 -0500 +++ cms/admin/__init__.py 2008-12-20 00:56:39.000000000 -0500 @@ -313,6 +313,7 @@ 'has_add_permission': self.has_add_permission(request), 'root_path': self.admin_site.root_path, 'app_label': app_label, + 'CMS_MEDIA_URL': settings.CMS_MEDIA_URL, } context.update(extra_context or {}) return render_to_response(self.change_list_template or [