Re: Associating Form Data with Users

2012-02-21 Thread ds39
alid(): # check if valid >              mynewobject = form.save(commit=False) #save it to create > the object but dont send to database >              mynewobject.user = request.user # attach the user to it >              mynewobject.save() # now do the real save and send it to > the databas

Re: Associating Form Data with Users

2012-02-20 Thread ds39
that allows the user ID to be added to the model or ModelForm ? Would this make the user object associated with the form or model object accessible by filtering in the API ? Thanks again On Feb 19, 9:48 pm, Shawn Milochik <sh...@milochik.com> wrote: > On 02/19/2012 09:29 PM, d

Re: Associating Form Data with Users

2012-02-19 Thread ds39
Thanks for your response. But, would you mind expanding on it a little bit ? On Feb 19, 9:21 pm, Shawn Milochik wrote: > When you process the form in your view, you'll have access to > request.user. Just use that. -- You received this message because you are subscribed to

Associating Form Data with Users

2012-02-19 Thread ds39
Hi All, I was wondering if someone could tell me the correct method for associating submitted form data with a user. I would like to access user-submitted form information with the API (or a template) via user identification. I'm making use of a ModelForm in a forms.py file which corresponds to a

Re: Entering Text into a Database

2012-02-03 Thread ds39
m using. > > > I collect the data elements via a request > > and then build a sql statement > > > for example > > > (The exact syntax may be a little off.) > > > var_1=request.post(name) > > > var_2=...etc > > > insert into table 1(col_

Entering Text into a Database

2012-02-02 Thread ds39
Hello Everyone, I've just started web programming and using Django, and I'm still not sure how to enter text into a database via a page. From everything I've read, the suggestion seems to be that a ModelForm should be used. I've tried to implement this on a simple example model, but I'm sure I'm