gabrielgrant/django-staticpages
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
master
Could not load branches
Nothing to show
Could not load tags
Nothing to show
{{ refName }}
default
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
-
Clone
Use Git or checkout with SVN using the web URL.
Work fast with our official CLI. Learn more about the CLI.
- Open with GitHub Desktop
- Download ZIP
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
For when you don't need no stinkin' CMS Makes things ever-so-slightly easier when you just want to serve a bunch of pages that are just rendered templates (with no special views or context) Routing autogeneration ---------------------- define STATICPAGES_TEMPLATES in your settings.py as a series of (section_name, base_url, base_template_path) three-tuples: STATICPAGES_TEMPLATES = [ ('homesite', '', 'homesite'), ('subsite', 'url/of/subsite', 'staticpages/subsite'), ] make a directory-and-page hierarchy within the given template directory, and the files will be automatically served with properly-named urls URL patterns are named by the site section name, and have a parameter for the path: reverse('sectionname', args=('path/to/file/')) For example: $PROJECT_ROOT/templates/homesite/ - index.html - pricing.html - about/ - index.html - team.html - news.html reverse('homesite', args=('about/team/') -> '/about/team/' TODO ==== Menu activation --------------- http://110j.wordpress.com/2009/01/25/django-template-tag-for-active-class/ Sitemaps -------- http://minimoesfuerzo.org/2011/02/12/sitemaps-django-static-pages/
About
For when you don't need no stinkin' CMS (just templates)
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published