Coder Social home page Coder Social logo

django-painless-redirects's People

Contributors

benzkji avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

benzkji

django-painless-redirects's Issues

introduce "keep tree" mode

/products/whatever/it-is/ => /shop/whatever/it-is/

  • from url: /products/
  • to url: /products/
  • wildcard mode: true
  • move tree mode: true
  • go

do everything with dynamic urls

instead of a middleware. much less load on the db.

needs proof of concept that it really can work (urls reload, multi-server setups, threading, etc).

respect installed multilanguage middleware

do redirect if we have a real hit, but do never auto create redirects when url does not start with a language slug (ie /de/ or /en/ or /en-us/ - must be in LANGUAGES, though). as the middleware will redirect to /lang/original-404-maybe/ anyway, and we will fetch it then!

Introduce "keep_querystring"

Redirect, and keep GET vars. Must be set on redirect. Decide about this: Normal behaviour is, forget about GET vars when evaluating redirects?!?

/a/b/?x=y --> /c/d/?x=y
/a/b/?z=v --> /c/d/?z=v

with only one entry in the database.

make LocaleMiddleware and APPEND_SLASH work better together

want to redirect /foo AND /foo/ (obviously) to /bar/

whne LocaleMiddleware is enabled, together with i18n_patterns in urls.py, we'll have to enter two redirects, with and without slash - as /foo/ is not a valid url (as checked in CommonMiddleware, about here: https://github.com/django/django/blob/main/django/middleware/common.py#L71 ), and because of that, no redirect to /foo/ is made (but, instead, to /language/foo/).

One approach could be to check for Redirects with and without slash at the end, when there is no slash at the end of the current path. Or even try a "ignore the slash at the end" approach, making the final slah irrellevant. This would enhance usability for redirect editors, as currently, one is often forced to enter redirects with and withouth the trailing slahsh.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.