django urls helper based on wsgi selector
Project description
django-selector is a custom url pattern parser for Django that is based off of Luke Arno’s Selector for WSGI. It is designed to simplify the writing and reading of url patterns by providing recipes for frequently used patterns. django-selector’s parser ignores classic regex based url patterns, so if you require the flexibility of regexes you needn’t jump through registration hoops for a one-off url pattern. Using these named patterns in your urls.py clarifies what they are matching as well as how they are matching it:
patterns(‘foo.views’, (r’^/(?P<name>[a-zA-Z0-9-]+)/(?P<foos>d*.?d+)/$’, ‘index’, {}, ‘foo-index’))
becomes:
parser.patterns(‘foo.views’, (r’/{name:slug}/{foos:number}/’, ‘index’, {}, ‘foo-index’))
You can install django-selector with pip:
pip install johnny-cache
You can fork django-selector from its hg repository:
You can also read the full current development documentation or the release documentation.
Project details
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-selector-0.1.tar.gz
.
File metadata
- Download URL: django-selector-0.1.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | df8e5848c01804e188b74da91984efa9e71d0d4152d3a305d788552cb36a7286 |
|
MD5 | dcadeb4a63aa23cbc13df5b26e66e6c2 |
|
BLAKE2b-256 | c7c2b58d6449b9dc6dc3a1542238d02f00c4450502ed4814bf23a43070d2a0f3 |