Changeset 2027
- Timestamp:
- 06/12/09 12:31:20 (9 months ago)
- Location:
- branches/0.9/pylucid_project
- Files:
-
- 4 modified
-
apps/pylucid/system/pylucid_objects.py (modified) (2 diffs)
-
apps/pylucid/views.py (modified) (2 diffs)
-
tests/test_PluginAPI.py (modified) (1 diff)
-
tests/unittest_plugin/views.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/0.9/pylucid_project/apps/pylucid/system/pylucid_objects.py
r2008 r2027 5 5 6 6 class PyLucidRequestObjects(object): 7 """ PyLucid request objects """ 7 """ 8 PyLucid request objects 9 see also: http://www.pylucid.org/_goto/187/PyLucid-objects/ 10 """ 8 11 def __init__(self): 9 12 self.system_preferences = SystemPreferencesForm().get_preferences() … … 12 15 self.default_lang_entry = Language.objects.get(code=default_lang_code) 13 16 # objects witch will be set later: 14 #self.pagetree - The current page tree instance 17 #self.pagetree - The current PageTree model instance 18 #self.pagemeta - The current PageMeta model instance 15 19 #self.pagecontent - PageContent instance, but only if the current page is not a PagePlugin! 16 20 #self.lang_entry - The current language instance -
branches/0.9/pylucid_project/apps/pylucid/views.py
r2022 r2027 80 80 """ render a cms page """ 81 81 request.PYLUCID.pagetree = pagetree 82 83 # Get the pagemeta instance for the current pagetree and language 84 pagemeta = PageTree.objects.get_pagemeta(request) 85 request.PYLUCID.pagemeta = pagemeta 82 86 83 87 # Get template content and add it to PyLucid objects … … 85 89 page_template, origin = loader.find_template_source(template_name) 86 90 request.PYLUCID.page_template = page_template 87 88 # Get the pagemeta instance for the current pagetree and language89 pagemeta = PageTree.objects.get_pagemeta(request)90 91 91 92 # Create initial context object -
branches/0.9/pylucid_project/tests/test_PluginAPI.py
r2023 r2027 197 197 " (site: %s, type: PluginPage)>" 198 198 ) % site.name, 199 ( 200 "pagemeta: <PageMeta: PageMeta for page: '3-pluginpage'" 201 " (lang: '%s')>" 202 ) % language.code, 199 203 "system_preferences: {'lang_code': u'%s'}" % self.default_lang_code, 200 204 ), -
branches/0.9/pylucid_project/tests/unittest_plugin/views.py
r2022 r2027 104 104 105 105 def test_PyLucid_api(request): 106 """ Test the PyLucid API """ 106 """ 107 Test the PyLucid API 108 see also: http://www.pylucid.org/_goto/187/PyLucid-objects/ 109 """ 107 110 request.page_msg(PLUGINPAGE_API_TEST_PAGE_MSG) 108 111 … … 115 118 output.append("page_template: %r" % request.PYLUCID.page_template) 116 119 output.append("pagetree: %r" % request.PYLUCID.pagetree) 120 output.append("pagemeta: %r" % request.PYLUCID.pagemeta) 117 121 output.append("system_preferences: %r" % request.PYLUCID.system_preferences) 118 122