A reusable Django app that generates static pages using Django test client
Project description
Installation
Install a package:
$ pip install django-static-pages
Add “static_pages” to your INSTALLED_APPS setting:
INSTALLED_APPS = ( ... 'static_pages', )
Configuration
Specify which files should be generated as static files:
STATIC_PAGES_LIST = ( ('/', 'index.html'), ('/about/', 'about.html'), ('news:list', 'news/index.html'), )
Set path for an output directory of the static files:
STATIC_PAGES_DIR = '/srv/example.com/html/'
This kwargs will be passed to the Django test client arguments. It may be usefull if you want to control WSGI environments of the RequestFactory of the the client:
STATIC_CLIENT_KWARGS = { 'HTTP_SERVER_NAME': 'example.com', }
Usage
Just execute the following command:
$ python manage.py generate_static_pages
Requirements
Python 2.7+ or 3+
Django>=1.5
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
Close
Hashes for django-static-pages-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdc40832f5cd25b0a22d7e88a04470fbc85d622fd49fd9b077075319f1c61485 |
|
MD5 | 522a3b327d7c0ddb60cb393162df215b |
|
BLAKE2b-256 | 8bdb378f200ca1b0468dfa3909be9efacaef0dea2b44856877e8fbea28434cf8 |