When I try to go to index.html, I get:
On Saturday, September 23, 2017 at 4:39:48 PM UTC-4, James Schneider wrote:
-- Exception Type: | NoReverseMatch |
---|---|
Exception Value: | Reverse for 'item_detail' with arguments '(1, 1)' not found. 2 pattern(s) tried: [u'item\\.(?P<format>[a-z0-9]+)/?$', 'item/$'] My Views:
index.html
|
On Saturday, September 23, 2017 at 4:39:48 PM UTC-4, James Schneider wrote:
On Sep 23, 2017 1:27 PM, "Mel DeJesus" <meldej...@gmail.com> wrote:Unfortunately, I didn't show my entire URLpatterns list, and the ^item/$ seems to interfere with the ^$ of the previous: Any suggestions for a work around? thanks again.from django.conf.urls import include, urlfrom django.contrib import adminfrom rest_framework.urlpatterns import format_suffix_patternsfrom durham_app import viewsurlpatterns = [# Examples:url(r'^admin/', include(admin.site.urls)),url(r'^$', views.index, name='index'),url(r'^item/$', views.item_detail, name='item_detail'),url(r'^items/', views.ItemList.as_view()),]urlpatterns = format_suffix_patterns(urlpatterns) There isn't really a reason that any of those URL patterns would interfere with each other. I'd change the last one to r'items/$', but otherwise they look fine.What do you mean by 'interfere'?-James
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/8a1194fc-c1fb-4b02-9d14-9400321342bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment