Skip to main content

A modified version of django.contrib.redirects with multilingual target URLs.

Project description

################
Aldryn Redirects
################

This is a modified version of Django's ``django.contrib.redirects`` app that
supports language-dependent target URLs, using ``django-parler``.

This is useful for cases in which another middleware strips the language
prefix from the URL, like django CMS. It allows to define different urls to
redirect to, depending on the user's language.

************
Installation
************

Aldryn Platform Users
#####################

To install the addon on Aldryn, all you need to do is follow this
`installation link <https://control.aldryn.com/control/?select_project_for_addon=aldryn-redirects>`_
on the Aldryn Marketplace and follow the instructions.

Manually you can:

#. Choose a site you want to install the Addon to from the dashboard.
#. Go to Apps > Install App
#. Click Install next to the Aldryn Redirects app.
#. Redeploy the site.


Manual Installation
###################


```bash
pip install aldryn-redirects
```

Follow the `setup instructions for django-parler <http://django-parler.readthedocs.org/>`_.

```python

# settings.py

INSTALLED_APPS += [
'parler',
'aldryn_redirects'
]

# add the middleware somewhere near the top of MIDDLEWARE_CLASSES

MIDDLEWARE_CLASSES.insert(
0, 'aldryn_redirects.middleware.RedirectFallbackMiddleware')
```

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for aldryn-redirects, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size aldryn_redirects-1.0.0-py2-none-any.whl (71.3 kB) File type Wheel Python version 2.7 Upload date Hashes View
Filename, size aldryn-redirects-1.0.0.tar.gz (22.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page