Skip to content

Commit

Permalink
a new and more sensible way of loading default settings
Browse files Browse the repository at this point in the history
  • Loading branch information
evildmp committed Jun 22, 2011
1 parent 7db2553 commit 4c653a8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 15 deletions.
2 changes: 1 addition & 1 deletion arkestra_utilities/context_processors.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from arkestra_utilities import settings
from django.conf import settings

def arkestra_templates(request):
print "------arkestra_templates context processor-------"
Expand Down
34 changes: 20 additions & 14 deletions arkestra_utilities/settings.py
Original file line number Diff line number Diff line change
@@ -1,32 +1,36 @@
from django.conf import settings

# For projects hosting the site of more than one entity
# This does not necessarily entail a site for complex organisation,
# or for a number of different organisations - being able to redirect
# news and events items to particular entities for example requires
# MULTIPLE_ENTITY_MODE to be True
MULTIPLE_ENTITY_MODE = getattr(settings, "MULTIPLE_ENTITY_MODE", False)

MULTIPLE_ENTITY_MODE = True

# 1. copy this to arkestra_settings
# 2. make sure it's correct

ARKESTRA_BASE_ENTITY = 1

# -------- News & Events ----------------------

# How many items should be displayed on main news & events pages,
# such as /news-and-events
MAIN_NEWS_EVENTS_PAGE_LIST_LENGTH = getattr(settings, "MAIN_NEWS_EVENTS_PAGE_LIST_LENGTH", 6)
MAIN_NEWS_EVENTS_PAGE_LIST_LENGTH = 6

# in All forthcoming events lisys, gather top events together
COLLECT_TOP_ALL_FORTHCOMING_EVENTS = getattr(settings, "COLLECT_TOP_EVENTS", True)
COLLECT_TOP_ALL_FORTHCOMING_EVENTS = True

# show event type (e.g. "Seminar")
SHOW_EVENT_TYPES = getattr(settings, "SHOW_EVENT_TYPES", False)
SHOW_EVENT_TYPES = False

# -------- Headings ----------------------

# global value for the heading level for page titles (e.g. entity names in entity pages)
PAGE_TITLE_HEADING_LEVEL = getattr(settings, "PAGE_TITLE_HEADING_LEVEL", 1)
PAGE_TITLE_HEADING_LEVEL = 1

# The default (typically, the next down from the PAGE_TITLE_HEADING_LEVEL)
IN_BODY_HEADING_LEVEL = getattr(settings, "IN_BODY_HEADING_LEVEL", 2)
PLUGIN_HEADING_LEVEL_DEFAULT = getattr(settings, "PLUGIN_HEADING_LEVEL_DEFAULT", 2)
IN_BODY_HEADING_LEVEL = 2
PLUGIN_HEADING_LEVEL_DEFAULT = 2

# The heading levels available to plugins
PLUGIN_HEADING_LEVELS = (
Expand All @@ -38,12 +42,14 @@
(5, u"Heading 5"),
)

PLUGIN_HEADING_LEVELS = getattr(settings, "PLUGIN_HEADING_LEVELS", PLUGIN_HEADING_LEVELS)
# -------- Django CMS ----------------------

CMS_SEO_FIELDS = True

# -------- Menus ----------------------

# Built in menu modifiers are in contacts_and_people.menu
MENU_MODIFIERS = getattr(settings, "MENU_MODIFIERS", {"ArkestraPages": ("contacts", "news",)})
MENU_MODIFIERS = {"ArkestraPages": ("contacts", "news",)}

# -------- Semantic editor ----------------------

Expand All @@ -62,8 +68,6 @@
# "{'name': 'TH', 'title': 'Table_Header', 'css': 'wym_containers_th'}", # not ready for this yet
])

WYM_TOOLS = getattr(settings, "WYM_CONTAINERS", WYM_CONTAINERS)

WYM_TOOLS = ",\n".join([
"{'name': 'Bold', 'title': 'Strong', 'css': 'wym_tools_strong'}", # not 'bold'
"{'name': 'Italic', 'title': 'Emphasis', 'css': 'wym_tools_emphasis'}", # and not italic
Expand All @@ -84,4 +88,6 @@
#"{'name': 'Preview', 'title': 'Preview', 'css': 'wym_tools_preview'}",
])

WYM_TOOLS = getattr(settings, "WYM_TOOLS", WYM_TOOLS)
# -------- what happens after login - why is this required? ----------------------

LOGIN_REDIRECT_URL = "/admin/"

0 comments on commit 4c653a8

Please sign in to comment.