r'^(?P<manufacturer_id>\d+)/(?P<collection_id>\d+)/styles/$',
'mysite.rugs.views.showcollection'),
//////////////////////
I have the following function defined in my views.py file
def showcollection(request, manufacturer_id, collection_id):
s = Style.objects.filter(collection=collection_id)
return render_to_response('thecollectionpage.html', {'coll': s})
//////////////////////
When I go to that url I get the following error:
TypeError at /rugs/2/1/styles/
showcollection() got an unexpected keyword argument 'collection_id'
Request Method: GET
Request URL: http://127.0.0.1:8000/rugs/2/1/styles/
Exception Type: TypeError
Exception Value: showcollection() got an unexpected keyword argument
'collection_id'
Exception Location: c:\Python24\lib\site-packages\django\core\handlers
\base.py in get_response, line 77
////////////////////////////
I done this before with just one variable and it's always been (?
P<object_id>\d+). Can I change the name from object_id to
manufacturer_id and collection_id? And can I send two variables
(three including request)?
Thanks
def showcollection(request, manufacturer_id=None, collection_id=None):
and see if that makes any difference.
I done this before with just one variable and it's always been (?
P<object_id>\d+). Can I change the name from object_id to
manufacturer_id and collection_id? And can I send two variables
(three including request)?
Thanks
On Jul 7, 7:05 pm, "Karen Tracey" <kmtra...@gmail.com> wrote: