Advertisement
Guest User

home

a guest
Jul 27th, 2014
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.21 KB | None | 0 0
  1.    # HOMEPAGE AS STATIC TEMPLATE
  2.     # ---------------------------
  3.     # This pattern simply loads the index.html template. It isn't
  4.     # commented out like the others, so it's the default. You only need
  5.     # one homepage pattern, so if you use a different one, comment this
  6.     # one out.
  7.  
  8.     url("^$", direct_to_template, {"template": "index.html"}, name="home"),
  9.  
  10.     # HOMEPAGE AS AN EDITABLE PAGE IN THE PAGE TREE
  11.     # ---------------------------------------------
  12.     # This pattern gives us a normal ``Page`` object, so that your
  13.     # homepage can be managed via the page tree in the admin. If you
  14.     # use this pattern, you'll need to create a page in the page tree,
  15.     # and specify its URL (in the Meta Data section) as "/", which
  16.     # is the value used below in the ``{"slug": "/"}`` part.
  17.     # Also note that the normal rule of adding a custom
  18.     # template per page with the template name using the page's slug
  19.     # doesn't apply here, since we can't have a template called
  20.     # "/.html" - so for this case, the template "pages/index.html"
  21.     # should be used if you want to customize the homepage's template.
  22.  
  23.     # url("^$", "mezzanine.pages.views.page", {"slug": "/"}, name="home"),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement