Changeset 1300
- Timestamp:
- 10/31/07 09:59:38 (12 months ago)
- Location:
- trunk/pylucid/PyLucid
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/pylucid/PyLucid/index.py
r1298 r1300 219 219 return response 220 220 221 222 def handle_command(request, page_id, module_name, method_name, url_args): 223 """224 handle a _command request221 def _get_page(request, page_id): 222 """ 223 returns the page object. 224 TODO: Check int(page_id)! 225 225 """ 226 226 setup_debug(request) … … 238 238 ) 239 239 ) 240 return current_page_obj 241 242 def handle_command(request, page_id, module_name, method_name, url_args): 243 """ 244 handle a _command request 245 """ 246 current_page_obj = _get_page(request, page_id) 240 247 241 248 context = _get_context(request, current_page_obj) … … 302 309 303 310 return HttpResponsePermanentRedirect(url) 311 312 def permalink(request, page_id): 313 """ 314 redirect to the real page url. 315 """ 316 current_page_obj = _get_page(request, page_id) 317 url = current_page_obj.get_absolute_url() 318 return redirect(request, url) -
trunk/pylucid/PyLucid/settings_example.py
r1290 r1300 332 332 # Prefix to the django admin panel 333 333 ADMIN_URL_PREFIX = "_admin" 334 # the redirect to the real page url 335 PERMALINK_URL_PREFIX = "_goto" 334 336 335 337 -
trunk/pylucid/PyLucid/urls.py
r1229 r1300 76 76 ), 77 77 #_____________________________________ 78 # permalink 79 ( 80 ( 81 '^%s/' 82 '(?P<page_id>\d+)/$' 83 ) % settings.PERMALINK_URL_PREFIX, 84 'PyLucid.index.permalink' 85 ), 86 #_____________________________________ 78 87 # CMS PAGE VIEW 79 88 # A normal CMS page url simply consists of the page shortcuts. … … 102 111 #-------------------------------------------------------------------------- 103 112 ) 104 105 113 urlpatterns = patterns('', *urls)
