Skip to main content

Fork of django-url-tracker with query_string support

Project description

django-url-fullpath-redirect
==================

``django-url-fullpath-redirect`` - простой приложение для редиректов в Django. Форк проекта django-url-tracker.
Поддерживает на данный момент следующие коды ответа:
1. 304
2. 410
Редиректы задаются через админку

Установка
------------

Просто::

pip install django-url-fullpath-redirect

Настройка
-------------

Для запуска добавляем в ``settings.py``:

1. Ставим последним в ``MIDDLEWARE_CLASSES`` наше ``url_tracker.middleware.URLChangePermanentRedirectMiddleware``::

MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
'url_tracker.middleware.URLChangePermanentRedirectMiddleware',
)

2. И добавляем в ``INSTALLED_APPS`` ::

INSTALLED_APPS = (
"url_tracker",
)



Теперь обновляем базу и можем задавать редиректы через админку.
Профит.

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

django-url-fullpath-redirect-0.1.2.tar.gz (10.2 kB view details)

Uploaded Source

File details

Details for the file django-url-fullpath-redirect-0.1.2.tar.gz.

File metadata

File hashes

Hashes for django-url-fullpath-redirect-0.1.2.tar.gz
Algorithm Hash digest
SHA256 0d4429ea53ffb1a4344d5aed955e3472d303ef96ca707dcf5bef3c3ea1a066d3
MD5 ac7d7763fe2a4ec10f1cbef242a7933a
BLAKE2b-256 f7352d8db2d96f1af805312907686c5cc9d2b0fb68ffe43b6e309aee270f6d42

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page