-# -*- coding: utf-8 -*-
-# Django settings for sandbox project.
-import os
-import sys
-from django.core.urlresolvers import reverse_lazy
-
-sys.dont_write_bytecode = True
-
-DEBUG = True
-TEMPLATE_DEBUG = DEBUG
+######################
+# MEZZANINE SETTINGS #
+######################
+
+# The following settings are already defined with default values in
+# the ``defaults.py`` module within each of Mezzanine's apps, but are
+# common enough to be put here, commented out, for convenient
+# overriding. Please consult the settings documentation for a full list
+# of settings Mezzanine implements:
+# http://mezzanine.jupo.org/docs/configuration.html#default-settings
+
+# Controls the ordering and grouping of the admin menu.
+#
+ADMIN_MENU_ORDER = (
+ ("Content", ("pages.Page", "blog.BlogPost",
+ "generic.ThreadedComment", ("Media Library", "fb_browse"),)),
+ ("Site", ("sites.Site", "redirects.Redirect", "conf.Setting")),
+ ("Users", ("auth.User", "auth.Group",)),
+)
+# A three item sequence, each containing a sequence of template tags
+# used to render the admin dashboard.
+#
+# DASHBOARD_TAGS = (
+# ("blog_tags.quick_blog", "mezzanine_tags.app_list"),
+# ("comment_tags.recent_comments",),
+# ("mezzanine_tags.recent_actions",),
+# )
+
+# A sequence of templates used by the ``page_menu`` template tag. Each
+# item in the sequence is a three item sequence, containing a unique ID
+# for the template, a label for the template, and the template path.
+# These templates are then available for selection when editing which
+# menus a page should appear in. Note that if a menu template is used
+# that doesn't appear in this setting, all pages will appear in it.
+
+# PAGE_MENU_TEMPLATES = (
+# (1, "Top navigation bar", "pages/menus/dropdown.html"),
+# (2, "Left-hand tree", "pages/menus/tree.html"),
+# (3, "Footer", "pages/menus/footer.html"),
+# )
+
+# A sequence of fields that will be injected into Mezzanine's (or any
+# library's) models. Each item in the sequence is a four item sequence.
+# The first two items are the dotted path to the model and its field
+# name to be added, and the dotted path to the field class to use for
+# the field. The third and fourth items are a sequence of positional
+# args and a dictionary of keyword args, to use when creating the
+# field instance. When specifying the field class, the path
+# ``django.models.db.`` can be omitted for regular Django model fields.
+#
+# EXTRA_MODEL_FIELDS = (
+# (
+# # Dotted path to field.
+# "mezzanine.blog.models.BlogPost.image",
+# # Dotted path to field class.
+# "somelib.fields.ImageField",
+# # Positional args for field class.
+# ("Image",),
+# # Keyword args for field class.
+# {"blank": True, "upload_to": "blog"},
+# ),
+# # Example of adding a field to *all* of Mezzanine's content types:
+# (
+# "mezzanine.pages.models.Page.another_field",
+# "IntegerField", # 'django.db.models.' is implied if path is omitted.
+# ("Another name",),
+# {"blank": True, "default": 1},
+# ),
+# )
+
+# Setting to turn on featured images for blog posts. Defaults to False.
+#
+# BLOG_USE_FEATURED_IMAGE = True
+
+# If ``True``, users will be automatically redirected to HTTPS
+# for the URLs specified by the ``SSL_FORCE_URL_PREFIXES`` setting.
+#
+# SSL_ENABLED = True
+
+# Host name that the site should always be accessed via that matches
+# the SSL certificate.
+#
+# SSL_FORCE_HOST = "www.example.com"
+
+# Sequence of URL prefixes that will be forced to run over
+# SSL when ``SSL_ENABLED`` is ``True``. i.e.
+# ('/admin', '/example') would force all URLs beginning with
+# /admin or /example to run over SSL. Defaults to:
+#
+# SSL_FORCE_URL_PREFIXES = ("/admin", "/account")
+
+# If True, the south application will be automatically added to the
+# INSTALLED_APPS setting.
+USE_SOUTH = True
+
+
+########################
+# MAIN DJANGO SETTINGS #
+########################
+
+# People who get code error notifications.
+# In the format (('Full Name', 'email@example.com'),
+# ('Full Name', 'anotheremail@example.com'))
ADMINS = (
- ('Guillaume Pellerin', 'webmaster@parisson.com'),
- ('Lists', 'lists@parisson.com'),
+ ('Guillaume Pellerin', 'pellerin@parisson.com'),
)
-
MANAGERS = ADMINS
-# DATABASES = {
-# 'default': {
-# 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
-# 'NAME': 'teleforma', # Or path to database file if using sqlite3.
-# 'USER': 'teleforma', # Not used with sqlite3.
-# 'PASSWORD': 'HMYsrZLEtYeBrvER', # 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.
-# }
-# }
-
-DATABASES = {
- 'default': {
- 'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
- 'NAME': 'teleforma_test', # Or path to database file if using sqlite3.
- 'USER': 'teleforma', # Not used with sqlite3.
- 'PASSWORD': 'teleforma', # Not used with sqlite3.
- 'HOST': 'localhost', # Set to empty string for localhost. Not used with sqlite3.
- 'PORT': '5432', # Set to empty string for default. Not used with sqlite3.
- }
-}
-
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# system time zone.
TIME_ZONE = 'Europe/Paris'
+# If you set this to True, Django will use timezone-aware datetimes.
+USE_TZ = True
+
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
-#LANGUAGE_CODE = 'fr_FR'
-LANGUAGES = [ ('fr', 'French'),
- ('en', 'English'),
-]
-
-SITE_ID = 1
-
-# If you set this to False, Django will make some optimizations so as not
-# to load the internationalization machinery.
-USE_I18N = True
+LANGUAGE_CODE = "fr"
# If you set this to False, Django will not format dates, numbers and
# calendars according to the current locale
USE_L10N = True
-# Absolute path to the directory that holds media.
-# Example: "/home/media/media.lawrence.com/"
-MEDIA_ROOT = os.path.join(os.path.dirname(__file__), 'media/')
+# A boolean that turns on/off debug mode. When set to ``True``, stack traces
+# are displayed for error pages. Should always be set to ``False`` in
+# production. Best set to ``True`` in local_settings.py
+DEBUG = True
-if not os.path.exists(MEDIA_ROOT):
- os.mkdir(MEDIA_ROOT)
+# Whether a user's session cookie expires when the Web browser is closed.
+SESSION_EXPIRE_AT_BROWSER_CLOSE = True
-# 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 = 'http://localhost:8040/'
+SITE_ID = 1
-# 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 = '/var/www/static/'
+# If you set this to False, Django will make some optimizations so as not
+# to load the internationalization machinery.
+USE_I18N = True
-ADMIN_MEDIA_PREFIX = '/static/'
+# Make this unique, and don't share it with anybody.
+SECRET_KEY = "2c5a26bd-716c-4a51-bcaa-5f840ba4dfe68c7361eb-3e19-48d8-8ba1-fa141aee861fcebe6451-6ac7-407f-a6b2-63f2f3d157e5"
-# URL prefix for static files.
-# Example: "http://media.lawrence.com/static/"
-STATIC_URL = '/static/'
+# Tuple of IP addresses, as strings, that:
+# * See debug comments, when DEBUG is true
+# * Receive x-headers
+INTERNAL_IPS = ("127.0.0.1",)
-# 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 callables that know how to import templates from various sources.
+TEMPLATE_LOADERS = (
+ "django.template.loaders.filesystem.Loader",
+ "django.template.loaders.app_directories.Loader",
)
+AUTHENTICATION_BACKENDS = ("mezzanine.core.auth_backends.MezzanineBackend",)
+
# 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',
+ "django.contrib.staticfiles.finders.FileSystemFinder",
+ "django.contrib.staticfiles.finders.AppDirectoriesFinder",
+ 'django.contrib.staticfiles.finders.DefaultStorageFinder',
)
-# Make this unique, and don't share it with anybody.
-SECRET_KEY = 'a8l7%06wr2k+3=%#*#@#rvop2mmzko)44%7k(zx%lls^ihm9^5'
-# List of callables that know how to import templates from various sources.
-#TEMPLATE_LOADERS = (
-# ('django.template.loaders.cached.Loader', (
-# 'django.template.loaders.filesystem.Loader',
-# 'django.template.loaders.app_directories.Loader',
-# )),
-#)
+#############
+# DATABASES #
+#############
+
+DATABASES = {
+ "default": {
+ # Add "postgresql_psycopg2", "mysql", "sqlite3" or "oracle".
+ "ENGINE": "django.db.backends.postgresql_psycopg2",
+ # DB name or path to database file if using sqlite3.
+ "NAME": "teleforma_pro",
+ # Not used with sqlite3.
+ "USER": "teleforma",
+ # Not used with sqlite3.
+ "PASSWORD": "teleforma",
+ # Set to empty string for localhost. Not used with sqlite3.
+ "HOST": "localhost",
+ # Set to empty string for default. Not used with sqlite3.
+ "PORT": "5432",
+ }
+}
-MIDDLEWARE_CLASSES = (
- 'django.middleware.common.CommonMiddleware',
- 'django.contrib.sessions.middleware.SessionMiddleware',
- 'django.middleware.csrf.CsrfViewMiddleware',
- 'django.contrib.auth.middleware.AuthenticationMiddleware',
- 'django.contrib.messages.middleware.MessageMiddleware',
- 'django.middleware.locale.LocaleMiddleware',
- 'pagination.middleware.PaginationMiddleware',
+#########
+# PATHS #
+#########
- "mezzanine.core.request.CurrentRequestMiddleware",
- "mezzanine.core.middleware.TemplateForDeviceMiddleware",
- "mezzanine.core.middleware.TemplateForHostMiddleware",
- "mezzanine.core.middleware.AdminLoginInterfaceSelectorMiddleware",
- "mezzanine.pages.middleware.PageMiddleware",
- "mezzanine.core.middleware.FetchFromCacheMiddleware",
+import os, sys
+from django.core.urlresolvers import reverse_lazy
+sys.dont_write_bytecode = True
-)
-ROOT_URLCONF = 'urls'
+# Full filesystem path to the project.
+PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
-TEMPLATE_DIRS = (
- # 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.
- '/home/momo/dev/teleforma/teleforma/teleforma/templates/',
-)
+# Name of the directory for the project.
+PROJECT_DIRNAME = PROJECT_ROOT.split(os.sep)[-1]
+
+# Every cache key will get prefixed with this value - here we set it to
+# the name of the directory the project is in to try and use something
+# project specific.
+CACHE_MIDDLEWARE_KEY_PREFIX = PROJECT_DIRNAME
+
+# URL prefix for static files.
+# Example: "http://media.lawrence.com/static/"
+STATIC_URL = "/static/"
+
+# 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 = '/var/www/static/'
+
+# URL that handles the media served from MEDIA_ROOT. Make sure to use a
+# trailing slash.
+# Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
+MEDIA_URL = "http://localhost:8040/"
+
+# Absolute filesystem path to the directory that will hold user-uploaded files.
+# Example: "/home/media/media.lawrence.com/media/"
+MEDIA_ROOT = os.path.join(PROJECT_ROOT, 'media/')
+
+# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
+# trailing slash.
+# Examples: "http://foo.com/media/", "/media/".
+ADMIN_MEDIA_PREFIX = STATIC_URL + "grappelli/"
+
+# Package/module name to import the root urlpatterns from for the project.
+ROOT_URLCONF = "%s.urls" % PROJECT_DIRNAME
+
+# 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.
+TEMPLATE_DIRS = (os.path.join(PROJECT_ROOT, "templates"),)
+
+
+################
+# APPLICATIONS #
+################
INSTALLED_APPS = (
- 'django.contrib.auth',
- 'django.contrib.contenttypes',
- 'django.contrib.sessions',
- 'django.contrib.sites',
+ "django.contrib.admin",
+ "django.contrib.auth",
+ "django.contrib.contenttypes",
+ "django.contrib.redirects",
+ "django.contrib.sessions",
+ "django.contrib.sites",
+ "django.contrib.sitemaps",
+ "django.contrib.staticfiles",
'django.contrib.messages',
- 'django.contrib.staticfiles',
- 'django.contrib.admin',
- 'django.contrib.comments',
- 'telemeta',
+ "mezzanine.boot",
+ "mezzanine.conf",
+ "mezzanine.core",
+ "mezzanine.generic",
+ # "mezzanine.blog",
+ # "mezzanine.forms",
+ "mezzanine.pages",
+ "mezzanine.galleries",
+ "mezzanine.twitter",
+ #"mezzanine.accounts",
+ #"mezzanine.mobile",
'jsonrpc',
'south',
- 'teleforma',
'sorl.thumbnail',
'django_extensions',
'pagination',
'postman',
-# 'private_files',
'markup_mixin',
'notes',
-# 'jquery',
'timezones',
- 'jqchat',
-# 'follow',
'googletools',
- # 'telecaster',
+ 'jqchat',
'tinymce',
- 'mezzanine',
- "mezzanine.boot",
- "mezzanine.conf",
- "mezzanine.core",
- "mezzanine.generic",
- "mezzanine.blog",
- "mezzanine.forms",
- "mezzanine.pages",
- "mezzanine.blog",
+ 'telemeta',
+ 'teleforma',
+ # 'telecaster',
+ 'forms_builder.forms',
)
+# List of processors used by RequestContext to populate the context.
+# Each one should be a callable that takes the request object as its
+# only parameter and returns a dictionary to add to the context.
TEMPLATE_CONTEXT_PROCESSORS = (
- 'django.core.context_processors.request',
- 'django.contrib.auth.context_processors.auth',
- 'postman.context_processors.inbox',
+ "django.contrib.auth.context_processors.auth",
+ "django.contrib.messages.context_processors.messages",
+ "django.core.context_processors.debug",
"django.core.context_processors.i18n",
+ "django.core.context_processors.static",
"django.core.context_processors.media",
- 'django.core.context_processors.static',
- 'mezzanine.conf.context_processors.settings',
+ "django.core.context_processors.request",
+ "django.core.context_processors.tz",
+ "mezzanine.conf.context_processors.settings",
+ "teleforma.context_processors.all_seminars",
+ "teleforma.context_processors.total_progress",
+ 'postman.context_processors.inbox',
+)
+
+TEMPLATE_DIRS = (
+ # 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.
+ '/home/momo/dev/teleforma/teleforma/teleforma/templates/',
)
-TELEMETA_ORGANIZATION = 'Pre-Barreau - CRFPA'
+# List of middleware classes to use. Order is important; in the request phase,
+# these middleware classes will be applied in the order given, and in the
+# response phase the middleware will be applied in reverse order.
+MIDDLEWARE_CLASSES = (
+ "mezzanine.core.middleware.UpdateCacheMiddleware",
+ "django.contrib.sessions.middleware.SessionMiddleware",
+ "django.contrib.auth.middleware.AuthenticationMiddleware",
+ "django.contrib.redirects.middleware.RedirectFallbackMiddleware",
+ "django.middleware.common.CommonMiddleware",
+ "django.middleware.csrf.CsrfViewMiddleware",
+ "django.contrib.messages.middleware.MessageMiddleware",
+ "mezzanine.core.request.CurrentRequestMiddleware",
+ "mezzanine.core.middleware.TemplateForDeviceMiddleware",
+ "mezzanine.core.middleware.TemplateForHostMiddleware",
+ "mezzanine.core.middleware.AdminLoginInterfaceSelectorMiddleware",
+ # Uncomment the following if using any of the SSL settings:
+ # "mezzanine.core.middleware.SSLRedirectMiddleware",
+ "mezzanine.pages.middleware.PageMiddleware",
+ "mezzanine.core.middleware.FetchFromCacheMiddleware",
+ 'django.middleware.transaction.TransactionMiddleware',
+ 'pagination.middleware.PaginationMiddleware',
+)
+
+# Store these package names here as they may change in the future since
+# at the moment we are using custom forks of them.
+PACKAGE_NAME_FILEBROWSER = "filebrowser_safe"
+PACKAGE_NAME_GRAPPELLI = "grappelli_safe"
+
+
+#########################
+# OPTIONAL APPLICATIONS #
+#########################
+
+# These will be added to ``INSTALLED_APPS``, only if available.
+OPTIONAL_APPS = (
+ "debug_toolbar",
+ "django_extensions",
+ "compressor",
+ PACKAGE_NAME_FILEBROWSER,
+ # PACKAGE_NAME_GRAPPELLI,
+)
+
+DEBUG_TOOLBAR_CONFIG = {"INTERCEPT_REDIRECTS": False}
+
+###################
+# DEPLOY SETTINGS #
+###################
+
+# These settings are used by the default fabfile.py provided.
+# Check fabfile.py for defaults.
+
+# FABRIC = {
+# "SSH_USER": "", # SSH username
+# "SSH_PASS": "", # SSH password (consider key-based authentication)
+# "SSH_KEY_PATH": "", # Local path to SSH key file, for key-based auth
+# "HOSTS": [], # List of hosts to deploy to
+# "VIRTUALENV_HOME": "", # Absolute remote path for virtualenvs
+# "PROJECT_NAME": "", # Unique identifier for project
+# "REQUIREMENTS_PATH": "", # Path to pip requirements, relative to project
+# "GUNICORN_PORT": 8000, # Port gunicorn will listen on
+# "LOCALE": "en_US.UTF-8", # Should end with ".UTF-8"
+# "LIVE_HOSTNAME": "www.example.com", # Host for public site.
+# "REPO_URL": "", # Git or Mercurial remote repo URL for the project
+# "DB_PASS": "", # Live database password
+# "ADMIN_PASS": "", # Live admin user password
+# }
+
+
+##################
+# LOCAL SETTINGS #
+##################
+
+# Allow any settings to be defined in local_settings.py which should be
+# ignored in your version control system allowing for settings to be
+# defined per machine.
+try:
+ from local_settings import *
+except ImportError:
+ pass
+
+
+####################
+# DYNAMIC SETTINGS #
+####################
+
+# set_dynamic_settings() will rewrite globals based on what has been
+# defined so far, in order to provide some better defaults where
+# applicable. We also allow this settings module to be imported
+# without Mezzanine installed, as the case may be when using the
+# fabfile, where setting the dynamic settings below isn't strictly
+# required.
+try:
+ from mezzanine.utils.conf import set_dynamic_settings
+except ImportError:
+ pass
+else:
+ set_dynamic_settings(globals())
+
+
+TELEMETA_ORGANIZATION = 'Pro-Barreau'
TELEMETA_SUBJECTS = ('test', 'telemeta', 'sandbox')
TELEMETA_DESCRIPTION = "Telemeta TEST sandbox"
TELEMETA_GMAP_KEY = 'ABQIAAAArg7eSfnfTkBRma8glnGrlxRVbMrhnNNvToCbZQtWdaMbZTA_3RRGObu5PDoiBImgalVnnLU2yN4RMA'
TELEMETA_DOWNLOAD_ENABLED = True
TELEMETA_STREAMING_FORMATS = ('mp3', 'webm')
-TELEMETA_DOWNLOAD_FORMATS = ('wav', 'mp3', 'webm')
+TELEMETA_DOWNLOAD_FORMATS = ('wav', 'ogg', 'webm')
TELEMETA_PUBLIC_ACCESS_PERIOD = 51
TELEMETA_DEFAULT_GRAPHER_SIZES = ['360x130', '640x130']
TELEMETA_DEFAULT_GRAPHER_ID = 'waveform_contour_wh'
LOGIN_REDIRECT_URL = reverse_lazy('teleforma-desk')
SESSION_EXPIRE_AT_BROWSER_CLOSE = False
-EMAIL_HOST = 'smtp.numericable.fr'
+EMAIL_HOST = 'localhost'
DEFAULT_FROM_EMAIL = 'webmaster@parisson.com'
SERVER_EMAIL = 'webmaster@parisson.com'
+ADMIN_USERNAME = 'admin'
EMAIL_SUBJECT_PREFIX = '[' + TELEMETA_ORGANIZATION.decode('utf8') + '] '
POSTMAN_AUTO_MODERATE_AS = True
'custom_undo_redo_levels': 10,
}
-#############
-# MEZZANINE #
-#############
-
-PACKAGE_NAME_FILEBROWSER = 'filebrowser_safe'
-
-####################
-# DYNAMIC SETTINGS #
-####################
-
-# set_dynamic_settings() will rewrite globals based on what has been
-# defined so far, in order to provide some better defaults where
-# applicable. We also allow this settings module to be imported
-# without Mezzanine installed, as the case may be when using the
-# fabfile, where setting the dynamic settings below isn't strictly
-# required.
-try:
- from mezzanine.utils.conf import set_dynamic_settings
-except ImportError:
- pass
-else:
- set_dynamic_settings(globals())
-
+FORMS_LABEL_MAX_LENGTH = 1024
+FORMS_FIELD_MAX_LENGTH = 255
+FORMS_BUILDER_USE_SITES = False
\ No newline at end of file
-# -*- coding: utf-8 -*-
-from django.conf.urls.defaults import *
-# Uncomment the next two lines to enable the admin:
+from django.conf.urls.defaults import patterns, include, url
from django.contrib import admin
-admin.autodiscover()
+
+from mezzanine.core.views import direct_to_template
js_info_dict = {
- 'packages': ('telemeta','telecaster'),
+ 'packages': ('telemeta', 'teleforma'),
}
-urlpatterns = patterns('',
- # Example:
- # (r'^sandbox/', include('sandbox.foo.urls')),
- # Uncomment the admin/doc line below and add 'django.contrib.admindocs'
- # to INSTALLED_APPS to enable admin documentation:
- # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
- url(r'^admin/django/', include(admin.site.urls)),
+admin.autodiscover()
+
+# Add the urlpatterns for any custom Django applications here.
+# You can also change the ``home`` view to add your own functionality
+# to the project's homepage.
+
+urlpatterns = patterns("",
+
+ # Change the admin prefix here to use an alternate URL for the
+ # admin interface, which would be marginally more secure.
+ ("^admin/django/", include(admin.site.urls)),
+
+ # We don't want to presume how your homepage works, so here are a
+ # few patterns you can use to set it up.
+
+ # HOMEPAGE AS STATIC TEMPLATE
+ # ---------------------------
+ # This pattern simply loads the index.html template. It isn't
+ # commented out like the others, so it's the default. You only need
+ # one homepage pattern, so if you use a different one, comment this
+ # one out.
+
+ # url("^$", direct_to_template, {"template": "index.html"}, name="home"),
- # TeleForma
- (r'^', include('teleforma.urls')),
- (r'^telecaster/', include('telecaster.urls')),
+ # HOMEPAGE AS AN EDITABLE PAGE IN THE PAGE TREE
+ # ---------------------------------------------
+ # This pattern gives us a normal ``Page`` object, so that your
+ # homepage can be managed via the page tree in the admin. If you
+ # use this pattern, you'll need to create a page in the page tree,
+ # and specify its URL (in the Meta Data section) as "/", which
+ # is the value used below in the ``{"slug": "/"}`` part. Make
+ # sure to uncheck "show in navigation" when you create the page,
+ # since the link to the homepage is always hard-coded into all the
+ # page menus that display navigation on the site. Also note that
+ # the normal rule of adding a custom template per page with the
+ # template name using the page's slug doesn't apply here, since
+ # we can't have a template called "/.html" - so for this case, the
+ # template "pages/index.html" can be used.
+
+ # url("^$", "mezzanine.pages.views.page", {"slug": "/"}, name="home"),
+
+ # HOMEPAGE FOR A BLOG-ONLY SITE
+ # -----------------------------
+ # This pattern points the homepage to the blog post listing page,
+ # and is useful for sites that are primarily blogs. If you use this
+ # pattern, you'll also need to set BLOG_SLUG = "" in your
+ # ``settings.py`` module, and delete the blog page object from the
+ # page tree in the admin if it was installed.
+
+ # url("^$", "mezzanine.blog.views.blog_post_list", name="home"),
+
+ # MEZZANINE'S URLS
+ # ----------------
+ # ADD YOUR OWN URLPATTERNS *ABOVE* THE LINE BELOW.
+ # ``mezzanine.urls`` INCLUDES A *CATCH ALL* PATTERN
+ # FOR PAGES, SO URLPATTERNS ADDED BELOW ``mezzanine.urls``
+ # WILL NEVER BE MATCHED!
+
+ # If you'd like more granular control over the patterns in
+ # ``mezzanine.urls``, go right ahead and take the parts you want
+ # from it, and use them directly below instead of using
+ # ``mezzanine.urls``.
+ ("^mezzanine/", include("mezzanine.urls")),
+
+ # MOUNTING MEZZANINE UNDER A PREFIX
+ # ---------------------------------
+ # You can also mount all of Mezzanine's urlpatterns under a
+ # URL prefix if desired. When doing this, you need to define the
+ # ``SITE_PREFIX`` setting, which will contain the prefix. Eg:
+ # SITE_PREFIX = "my/site/prefix"
+ # For convenience, and to avoid repeating the prefix, use the
+ # commented out pattern below (commenting out the one above of course)
+ # which will make use of the ``SITE_PREFIX`` setting. Make sure to
+ # add the import ``from django.conf import settings`` to the top
+ # of this file as well.
+ # Note that for any of the various homepage patterns above, you'll
+ # need to use the ``SITE_PREFIX`` setting as well.
+
+ # ("^%s/" % settings.SITE_PREFIX, include("mezzanine.urls"))
+
+ ('^', include('teleforma.urls')),
# Languages
(r'^i18n/', include('django.conf.urls.i18n')),
(r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict),
)
+
+# Adds ``STATIC_URL`` to the context of error pages, so that error
+# pages can use JS, CSS and images.
+handler500 = "mezzanine.core.views.server_error"