mirror of
https://github.com/jazzband/django-categories.git
synced 2026-03-16 22:30:24 +00:00
Updating settings for Django 1.3
This commit is contained in:
parent
7d295843aa
commit
93cd476c57
2 changed files with 53 additions and 22 deletions
|
|
@ -97,8 +97,7 @@ class CategoryAdmin(TreeEditor, admin.ModelAdmin):
|
||||||
inlines = [InlineCategoryRelation,]
|
inlines = [InlineCategoryRelation,]
|
||||||
|
|
||||||
class Media:
|
class Media:
|
||||||
js = (settings.MEDIA_URL + '/js/genericcollections.js',)
|
js = (settings.STATIC_URL + 'js/genericcollections.js',)
|
||||||
|
|
||||||
|
|
||||||
admin.site.register(Category, CategoryAdmin)
|
admin.site.register(Category, CategoryAdmin)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
import os, sys
|
import os, sys
|
||||||
|
|
||||||
APP = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
APP = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
||||||
|
PROJ_ROOT = os.path.abspath(os.path.dirname(__file__))
|
||||||
sys.path.append(APP)
|
sys.path.append(APP)
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
TEMPLATE_DEBUG = DEBUG
|
TEMPLATE_DEBUG = DEBUG
|
||||||
|
|
@ -12,12 +13,16 @@ ADMINS = (
|
||||||
|
|
||||||
MANAGERS = ADMINS
|
MANAGERS = ADMINS
|
||||||
|
|
||||||
DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
|
DATABASES = {
|
||||||
DATABASE_NAME = 'dev.db' # Or path to database file if using sqlite3.
|
'default': {
|
||||||
DATABASE_USER = '' # Not used with sqlite3.
|
'ENGINE': 'django.db.backends.sqlite3',
|
||||||
DATABASE_PASSWORD = '' # Not used with sqlite3.
|
'NAME': 'dev.db',
|
||||||
DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
|
'USER': '',
|
||||||
DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
|
'PASSWORD': '',
|
||||||
|
'HOST': '',
|
||||||
|
'PORT': '',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# Local time zone for this installation. Choices can be found here:
|
# Local time zone for this installation. Choices can be found here:
|
||||||
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
|
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
|
||||||
|
|
@ -36,34 +41,60 @@ SITE_ID = 1
|
||||||
# to load the internationalization machinery.
|
# to load the internationalization machinery.
|
||||||
USE_I18N = True
|
USE_I18N = True
|
||||||
|
|
||||||
# Absolute path to the directory that holds media.
|
# Absolute filesystem path to the directory that will hold user-uploaded files.
|
||||||
# Example: "/home/media/media.lawrence.com/"
|
# Example: "/home/media/media.lawrence.com/media/"
|
||||||
MEDIA_ROOT = APP + '/media/'
|
MEDIA_ROOT = os.path.abspath(os.path.join(PROJ_ROOT, 'media', 'uploads'))
|
||||||
|
|
||||||
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
|
# 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 = '/static/'
|
|
||||||
|
|
||||||
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
|
|
||||||
# trailing slash.
|
# trailing slash.
|
||||||
# Examples: "http://foo.com/media/", "/media/".
|
# Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
|
||||||
ADMIN_MEDIA_PREFIX = '/media/'
|
MEDIA_URL = '/uploads/'
|
||||||
|
|
||||||
|
# Absolute path to the directory static files should be collected to.
|
||||||
|
# Don't put anything in this directory yourself; store your static files
|
||||||
|
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
|
||||||
|
# Example: "/home/media/media.lawrence.com/static/"
|
||||||
|
STATIC_ROOT = os.path.abspath(os.path.join(PROJ_ROOT, 'media', 'static'))
|
||||||
|
|
||||||
|
# URL prefix for static files.
|
||||||
|
# Example: "http://media.lawrence.com/static/"
|
||||||
|
STATIC_URL = '/static/'
|
||||||
|
|
||||||
|
# Additional locations of static files
|
||||||
|
STATICFILES_DIRS = (
|
||||||
|
# Put strings here, like "/home/html/static" or "C:/www/django/static".
|
||||||
|
# Always use forward slashes, even on Windows.
|
||||||
|
# Don't forget to use absolute paths, not relative paths.
|
||||||
|
)
|
||||||
|
|
||||||
|
# List of finder classes that know how to find static files in
|
||||||
|
# various locations.
|
||||||
|
STATICFILES_FINDERS = (
|
||||||
|
'django.contrib.staticfiles.finders.FileSystemFinder',
|
||||||
|
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
||||||
|
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
|
||||||
|
)
|
||||||
|
|
||||||
|
# URL prefix for admin static files -- CSS, JavaScript and images.
|
||||||
|
# Make sure to use a trailing slash.
|
||||||
|
# Examples: "http://foo.com/static/admin/", "/static/admin/".
|
||||||
|
ADMIN_MEDIA_PREFIX = '/static/admin/'
|
||||||
|
|
||||||
# Make this unique, and don't share it with anybody.
|
# Make this unique, and don't share it with anybody.
|
||||||
SECRET_KEY = 'bwq#m)-zsey-fs)0#4*o=2z(v5g!ei=zytl9t-1hesh4b&-u^d'
|
SECRET_KEY = 'bwq#m)-zsey-fs)0#4*o=2z(v5g!ei=zytl9t-1hesh4b&-u^d'
|
||||||
|
|
||||||
# List of callables that know how to import templates from various sources.
|
# List of callables that know how to import templates from various sources.
|
||||||
TEMPLATE_LOADERS = (
|
TEMPLATE_LOADERS = (
|
||||||
'django.template.loaders.filesystem.load_template_source',
|
'django.template.loaders.filesystem.Loader',
|
||||||
'django.template.loaders.app_directories.load_template_source',
|
'django.template.loaders.app_directories.Loader',
|
||||||
# 'django.template.loaders.eggs.load_template_source',
|
|
||||||
)
|
)
|
||||||
|
|
||||||
MIDDLEWARE_CLASSES = (
|
MIDDLEWARE_CLASSES = (
|
||||||
'django.middleware.common.CommonMiddleware',
|
'django.middleware.common.CommonMiddleware',
|
||||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||||
|
'django.middleware.csrf.CsrfViewMiddleware',
|
||||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||||
|
'django.contrib.messages.middleware.MessageMiddleware',
|
||||||
)
|
)
|
||||||
|
|
||||||
ROOT_URLCONF = 'example.urls'
|
ROOT_URLCONF = 'example.urls'
|
||||||
|
|
@ -81,6 +112,8 @@ INSTALLED_APPS = (
|
||||||
'django.contrib.contenttypes',
|
'django.contrib.contenttypes',
|
||||||
'django.contrib.sessions',
|
'django.contrib.sessions',
|
||||||
'django.contrib.sites',
|
'django.contrib.sites',
|
||||||
|
'django.contrib.messages',
|
||||||
|
'django.contrib.staticfiles',
|
||||||
'django.contrib.flatpages',
|
'django.contrib.flatpages',
|
||||||
'categories',
|
'categories',
|
||||||
'editor',
|
'editor',
|
||||||
|
|
@ -88,7 +121,6 @@ INSTALLED_APPS = (
|
||||||
'simpletext',
|
'simpletext',
|
||||||
'south',
|
'south',
|
||||||
)
|
)
|
||||||
#EDITOR_MEDIA_PATH = '/static/editor/'
|
|
||||||
|
|
||||||
CATEGORIES_SETTINGS = {
|
CATEGORIES_SETTINGS = {
|
||||||
'ALLOW_SLUG_CHANGE': True,
|
'ALLOW_SLUG_CHANGE': True,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue