You need to change the view argument you supplied - 'order_details' either to a string with the full path to the 'order_details' function like:
(r'^order_details/(?P<order_id>[-\w]+)/$', 'path.to.my.view.order_details',
{'template_name': 'registration/order_details.html'}, 'order_details'),
or import 'order_details' into your namespace then remove the quote marks from the view argument so that you will be passing the actual order_detail object like:
from path.to.my.view import order_details
(r'^order_details/(?P<order_id>[-\w]+)/$', order_details,
{'template_name': 'registration/order_details.html'}, 'order_details'),
Sent from my Windows Phone
(r'^order_details/(?P<order_id>[-\w]+)/$', 'path.to.my.view.order_details',
{'template_name': 'registration/order_details.html'}, 'order_details'),
or import 'order_details' into your namespace then remove the quote marks from the view argument so that you will be passing the actual order_detail object like:
from path.to.my.view import order_details
(r'^order_details/(?P<order_id>[-\w]+)/$', order_details,
{'template_name': 'registration/order_details.html'}, 'order_details'),
Sent from my Windows Phone
From: frocco
Sent: 2/1/2013 1:55 AM
To: django-users@googlegroups.com
Subject: Re: newbie confused about urls
No comments:
Post a Comment