UNKNOWN
Project description
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 there, 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/
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 there, 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/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file django-staticpages-0.2.3.tar.gz.
File metadata
- Download URL: django-staticpages-0.2.3.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
097e629ed7c245948ad54a984858d05aef731403ecadd49dcf1dc88512ac201e
|
|
| MD5 |
8e2d2cbfbaefadc873c14f4b72095593
|
|
| BLAKE2b-256 |
fbbfa764f4d6f870c2d02ef83eb772758ea6752ad4903cf6ec248d4cd8323705
|