Advanced url migration application
Project description
# django-url-migration
A custom 404 handler that uses fixed or regex rules to redirect from old to new urls.
* Fixed URL -> URL rules
* Regex rules
* Usage logging
* Removal of unused url migrations
Configuration
-------------
* Add custom 404 handler to your main urls.py:
```
handler404 = 'url_migration.views.page_not_found'
```
* Add `url_migration` to your `INSTALLED_APPS`.
* Run migrations (`manage.py migrate`)
* Check your Django admin for the url_migration models:
* Url mappings: fixed url -> url rules
* Url regexp mappings: regex rules that will generate url mapping for every regex match.
`remove_expired_redirects` management command may be used to remove expired url mappings -
if the mapping isn't used for given expiry time it will be removed (so you can see which old urls are still used).
Every mapping hit is being logged to `LastUsageLog` model.
You can also check url_migration_demo project in this repository.
A custom 404 handler that uses fixed or regex rules to redirect from old to new urls.
* Fixed URL -> URL rules
* Regex rules
* Usage logging
* Removal of unused url migrations
Configuration
-------------
* Add custom 404 handler to your main urls.py:
```
handler404 = 'url_migration.views.page_not_found'
```
* Add `url_migration` to your `INSTALLED_APPS`.
* Run migrations (`manage.py migrate`)
* Check your Django admin for the url_migration models:
* Url mappings: fixed url -> url rules
* Url regexp mappings: regex rules that will generate url mapping for every regex match.
`remove_expired_redirects` management command may be used to remove expired url mappings -
if the mapping isn't used for given expiry time it will be removed (so you can see which old urls are still used).
Every mapping hit is being logged to `LastUsageLog` model.
You can also check url_migration_demo project in this repository.
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
Close
Hashes for django-url-migration-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98fa30f3d096feb3cc03297e5ce9805c2b23c92a51d3f89d2113daf262161a9a |
|
MD5 | 7847112d7327c6393b485fe81313a7c3 |
|
BLAKE2b-256 | 5b44f242e65708a0f3a100c25c783262c6afb336b810b9d5286eaffe40dafd29 |