According to the code I have, this should be working. Try changing it
to
def showcollection(request, manufacturer_id=None, collection_id=None):
and see if that makes any difference.
On Sat, 2007-07-07 at 16:07 -0700, Greg wrote:
> Hello,
> I have the following line in my urls.py file
>
> 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
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---