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

In urls.py, you can write urlpatterns by using dictionary.

from django.conf.urls import include
from django.contrib import admin
admin.autodiscover()

from dictpatterns.urls import DictPatterns

UrlDictPatterns = DictPatterns(
    {
        r'^': ('testapp.views.home', 'home',
            {
                r'test/': ('testapp.views.test', 'test',
                    {
                        r'(?P<id>\d*)/': ('testapp.views.test_n', 'test_n',
                            {
                                r'd/': ('testapp.views.test_d', 'test_d')
                            }
                        )
                    }
                ),
                r'admin/': (include(admin.site.urls), 'admin')
            }
        )
    }
)

urlpatterns = UrlDictPatterns.to_patterns()

In template

Because of this format, you can trace the parent url of a page. You can display the parent url in template.

{% load dict_url_tools %}

Now :
<br>
{% this_url %}
<br>
Parent :
<br>
{% parent_url %}

Settings

Make sure of writing DictPatterns in your urls which is designated as ROOT_URLCONF. And designate the root of DictPatterns as ROOT_DICTPATTERNS_NAME in settings.py if you need. Default value is “UrlDictPatterns”.

Release History

Release History

0.2.1

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

0.2

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

0.1

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-dictpatterns-0.2.1.tar.gz (3.4 kB) Copy SHA256 Checksum SHA256 Source Apr 6, 2014

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