Do investigate what reverse and the url template tag are going to do with these views.
I don't see any reason that you shouldn't remove trailing slashes, but someone else may have a comment.
What do you see as the source of urls with erroneous slashes?
Bill
On Sun, Feb 24, 2013 at 1:21 AM, Odagi <fcmiranda@gmail.com> wrote:
Hello, according to https://docs.djangoproject.com/en/dev/ref/settings/#append-slash, using CommonMiddleware and APPEND_SLASH=True, if the request URL does not match any of the patterns in the URLconf and it doesn't end in a slash, an HTTP redirect is issued to the same URL with a slash appended.I'd like to do the opposite action, i.e. remove the slash from a URL and redirect the request if URL does not match any of the patterns:www.my-site/my-url/ (redirect to) > www.my-site/my-urlCan I do that? Why Django does not include this option? Is there any good reason?Thanks in advance.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment