On Sat, Apr 23, 2016 at 11:50:05AM -0700, Chris Seberino wrote: > I am trying to be consistent and make urls.py expect / after every url. > > The problem is Django isn't automatically adding / at the end and so now > I get 404s when I try to access my web pages. > > How fix?
https://docs.djangoproject.com/en/1.9/ref/settings/#append-slash But this shouldn't happen to you with URLs from within your application, as long as you use the url template tag, and reverse for redirects – those will generate correct URLs for you, including the trailing slash, as long as it appears in the URL regex. Cheers, Michal -- 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+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/20160423190320.GC435%40koniiiik.org. For more options, visit https://groups.google.com/d/optout.
signature.asc
Description: Digital signature