This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
This project is not CMS system but simplify developers create dynamic pages with options changing url without restarting the server. It is possible adds custom page content that will be available in the template.

* Create pages which url is possible dynamically change
* Set page content to pages
* Static, redirect, redirect to page, default page content
* Custom page content
* Dynamic reverse that return url string from page name
* Automatic urls reload for every process which processes request when pages is changed
* Tree structured admin for pages
* Automatic admin registration of page content


Firstly install djagno-simple-utilities
pip install -U django-simple-utilities
and finally install django-dynamic-pages
pip install -U django-dynamic-pages

Add utilities and dynamic_pages to INSTALLED_APPS in before django.contrib.admin:




add 'dynamic_pages.middleware.UrlsReloadMiddleware' to MIDDLEWARE_CLASSES and 'dynamic_pages.context_processors.page_content' into TEMPLATE_CONTEXT_PROCESSORS

Firstly you must add dnamic_patterns to django patterns

from dynamic_pages.dynamic.utils import dynamic_urlpatterns
urlpatterns += dynamic_urlpatterns()

After that you can set dynamic_patterns, for example:

from dynamic_pages.dynamic.dynamic_urls import DynamicUrl
DynamicUrl('static', _(u'Static page'), StaticView.as_view(), (r'',), 'dynamic_pages.StaticPageContent'),
DynamicUrl('redirects', _(u'Redirect to first child page')),
DynamicUrl('redirectstourl', _(u'Redirect to URL'), None, None, 'dynamic_pages.RedirectToURLPageContent', can_change_url = False),
DynamicUrl('redirectstopage', _(u'Redirect to page'), None, None, 'dynamic_pages.RedirectToPagePageContent', can_change_url = False),

class dynamic url has this constructor:
DynamicUrl(name, verbose_name, view = None, patterns = [], model = None, can_change_url = True, view_kwargs = None)

name - unique name of dynamic_pattern
verbose_name - name which is used in administration
view - django class view or string path to function
patterns - url patterns. Every pattern can be changed in administration, but url which is set in administration create prefix all this paterns. If you can edit the entire url in the administration set patterns to ['']
model - you can create custom PageContent, this model must extend PageContent model. Page content is available in template as page_content variable. This value must be string which contains app_name.model_name
can_change_url - is this value is set to False, you will not be able change url dynamically.
view_kwargs - same value as url view_kwargs

Custom page content:
PageContent is model which contains webpage data. Every page can have one page content. You can create custom page content in your apps in file. For example:

class HomePageContent(PageContent):
html = HtmlField(_(u'Text'), blank=True)

def __unicode__(self):
return '%s' % force_unicode(_(u'Home page content'));

class Meta:
verbose_name = _(u'Home page content')
verbose_name_plural = _(u'Home page content')

and when you set model in right DynamicUrl as path to this model class, page_content variable will contain this page content in template.


page_utils contains template tags. You can use it in your templates.

{% load page_utils %}

because template tag url is not working on dynamic pages, you can use tag dynamicurl

{% dynamicurl dynamic_pattern_name val1 val2 … %}

this tag help with change query strings:
{% get_query_string remove:a,b new_params:c=5,d='e' %} - return query string which from queries removes queries a and b and adds queries c and d with values 5 and 'e'

Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-dynamicpages-0.1.tar.gz (65.1 kB) Copy SHA256 Checksum SHA256 Source Aug 26, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting