Man I hate silly errors!
Thanks so much Rajesh! (It happens to be my first view, the generic
views got me spoiled!)
Corey
On Jun 22, 2006, at 9:10 PM, [EMAIL PROTECTED] wrote:
>
> Ah..I should've noticed this earlier, but you are missing the
> mandatory
> first argument 'request' in your
Ah..I should've noticed this earlier, but you are missing the mandatory
first argument 'request' in your view function. That's causing Python
to assign pub as the first argument i.e. request, and then yet another
time with the actual value. That must be why you're getting this error.
Nope, I get the same thing with:
def select_date_for_pub(pub=None, template_name=None):
But, interestingly, if I switch the arguments to:
def select_date_for_pub(template_name=None, pub=None):
I get the same error, but with template_name instead of pub!
Any ideas?
Thanks,
Corey
On Jun
The positional argument "pub" in your method is causing the problem, I
think. Replace it with pub=None and let me know if that fixes things:
def select_date_for_pub(pub=None, template_name=None):
--~--~-~--~~~---~--~~
You received this message because you are
Here is the view:
def select_date_for_pub(pub, template_name=None):
"""
Given a publication code, generate a view of a calendar with
dates that can be selected
"""
date_list = Publication.objects.get
I would still like to see the definition of the select_date_for_pub()
view method. I have seen errors similar to this where it was the
positional parameters defined in my method caused this.
You see this exception in base.py because that's where it's first
trapped by Django. It could still be
It doesn't happen in the view. That's the strange thing. Here is the full error:Request Method: GETRequest URL: http://localhost:8000/reservations/pubs/42/Exception Type: TypeErrorException Value: select_date_for_pub() got multiple values for keyword argument 'pub'Exception Location:
Can you show the excerpt of your view including the line number at
which this happens?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
Hey All!
I'm trying to debug a view but I'm getting an error that I can't trace.
The error is:
TypeError at /reservations/pubs/42/
select_date_for_pub() got multiple values for keyword argument 'pub'
but the local vars in the error screen shows:
callback_kwargs {'template_name':
9 matches
Mail list logo