So simple you'll burst into tears right away.
Project description
An app for those cases when you want database-configurable URLs.
Installation
Install django-keyed-urls with pip:
pip install django-keyed-urls
Add keyed_urls and modeltranslation to INSTALLED_APPS.
Specify a custom location for South migrations for keyed_urls – you really want to use South to handle schema changes when adding or removing languages from LANGUAGES:
SOUTH_MIGRATION_MODULES = { 'keyed_urls': 'yourapp.migrate.keyed_urls', }
Create and run database migrations:
python manage.py schemamigration keyed_urls --initial python manage.py migrate keyed_urls
If you want to use the forwarding URLs, add an entry to your URLconf file. It is recommended to use i18n_patterns because that means that language-specific redirection URLs are automatically handled correctly:
from django.conf.urls import include, url from django.conf.urls.i18n import i18n_patterns urlpatterns += i18n_patterns( '', url(r'', include('keyed_urls.urls'), )
Usage
Helpers
TODO Describe keyed_urls.get_url and keyed_urls.get_forwarding_url.
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
Built Distribution
Hashes for django_keyed_urls-0.2.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 909897f9699a78cd995dfb05269278eb5f89d148c784339a1ad3a011319e40e6 |
|
MD5 | f72c23a6938abdc83f1581d232a56783 |
|
BLAKE2b-256 | cb6a60905f67ec376d32c76913f61ee4d5e3f8a1aaa7b60b9c9a5b7a072a5f6d |