On Oct 7, 1:49 pm, KillaBee <[EMAIL PROTECTED]>
wrote:
> On Oct 6, 4:44 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Mon, Oct 6, 2008 at 4:55 PM, KillaBee <
>
> > [EMAIL PROTECTED]> wrote:
> > > Thanks I have read the forms doc. and it helped a great deal.
> > > now I am get this error:'QueryDict' object has no attribute 'method'
> > > at line 12.
>
> > > view:
> > > from django.http import HttpResponse
> > > from intranet.timesheets.models import Poll
> > > from intranet.timesheets.models import Choice
> > > from django.shortcuts import render_to_response, get_object_or_404
> > > from django.core.urlresolvers import reverse
> > > from django.contrib.auth import views
> > > from django.contrib import databrowse
> > > from django.contrib import auth
> > > #from django.contrib.databrowse.plugins.calendars import
> > > CalendarPlugin
>
> > > def timesheet(request):
> > >    if request.method == 'POST': # If the form has been
> > > submitted..........................
> > >        form = timesheet(request.POST) # A form bound to the POST data
>
> > You've named both your view and your form 'timesheet'.  When your timesheet
> > view gets called, it tries to instantiate a form by calling 'timesheet' and
> > passing in request.POST (a QueryDict).  However, timesheet the view gets
> > called (again, recursively) with a QueryDict and promptly runs into trouble
> > when it tries to access the 'method' attribute of the argument it was
> > handed.  You need to give these things different names.
>
> > Karen
>
> I did give them different name, I know better.  It  solve my problem.

I have a few more problems, if some one can piont me in the right
direction:

1) I have a problem in the login template.  After I click submit the :
<input type="hidden" name="next" value="{{ timesheet }}" />
should send me some where but it send me to the default /accounts/
profile/


2) my form shows up now but it does not post the data to the MYSQL db,
and no error is given.

3)  how do I put a calendar in a view or template?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to