Re: inputting a request.user into a model on the backend

2010-02-08 Thread goome
My previous mex got with wrong identation: the last 4 lines need to start at the same level: if request.method == 'POST': form = GoalForm(request.POST) if form.is_valid(): goal=form.save(commit=False) goal.user=request.user goal.save() form.save_m2m() -- You received this

Re: inputting a request.user into a model on the backend

2010-02-08 Thread goome
On 7 Feb, 22:26, kamilski81 wrote: > I am trying to set a user on a model, on the back-end. > >         u = request.user >         g = Goal() >         g.user = u >         form = GoalForm(request.POST, g) > > I am getting the following error: > goal.user_id may not be

FormWrapper in django1.1

2010-01-21 Thread goome
Hello any substitute for forms.FormWrapper in django1.1. ? sorry for my poor english thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send

Re: Admin UnicodeEncodeError

2009-12-16 Thread goome
On 16 Dic, 04:03, Karen Tracey <kmtra...@gmail.com> wrote: > On Tue, Dec 15, 2009 at 2:42 PM, goome <marcs2...@gmail.com> wrote: > > Hello > > i have a model with a CharField field. > > When in the admin panel i try to insert a new record for the mo

Admin UnicodeEncodeError

2009-12-15 Thread goome
Hello i have a model with a CharField field. When in the admin panel i try to insert a new record for the model with a text containing "é" for the field, i got """UnicodeEncodeError at /admin/abruzzodavedere/servizio/4/ 'ascii' codec can't encode character u'\xe8' in position 14: ordinal not in