In all fairness, it's actually
magic_urlpatterns_you_will_never_see = path('/', include(the_urlconf))
Django uses the magic_urlpatterns_you_will_never_see, which already includes that slash.
My recommendation would be to forgo the starting slash. In Flask you provide the full route ("absolute path") to your view, in Django the relative path. Relative paths don't start with a slash.
On Oct 4, 2016 22:01, Tom Christie <christie....@gmail.com> wrote:
Yup, good points there. I wasn't really considering `include` at that point.--Definitely some awkwardnesses that need thinking about there.urlpatterns = [path('', homepage),path('users/', users_list)]Looks very odd to me, since those are not actually valid URL paths. ('/' and '/users/' are the actual URL paths)Anyways, something to mull over. That and the import names are probably the two areas that'll need resolutions.
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscribe@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/70d64bf4-6ba9-444f-b161-165e6607d257%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/d2678f29-c8e9-4c46-9eae-65afe07eae2a%40email.android.com.
For more options, visit https://groups.google.com/d/optout.