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 hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page