I have been searching for examples but everything that I see has a link to a
database. How to you 'get' the data from a form in django? What is the
equivalent of 'data = cgi.FieldStorage(keep_blank_values=1)' I would use
with a Python cgi script?

Thanks,

Vincent

On 6/5/07 7:22 PM, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote:

> 
> On 6/6/07, Vincent Nijs <[EMAIL PROTECTED]> wrote:
>> 
>> Question: If I want to save the file to a directory and information about
>> the submitter (e.g., name and time of submission) directly to a csv file,
>> how would I do that in Django? Do you need 'newforms' to do that? In the
>> documentation it seems that if you use newforms you would have to save
>> everything to a database. Is that really necessary? For some of my forms I
>> want to save information in a dbase that but probably not for all.
> 
> Newforms is a tool for constructing HTML forms. One obvious source of
> forms is to create a form that matches a database object, so newforms
> provides tools to assist in creating forms for database objects, with
> an easy method for saving objects that are created/modified using that
> form. However, forms don't have to be bound to a database object. You
> can create a form, gather data using that form, and then just use the
> data, rather than using it to populate a database object.
> 
> It looks like what you need to do is:
> - write a custom form that gathers the data you need
> - write a custom view that displays the form, validates the data, then
> outputs the CSV file if the form data is valid.
> 
> Yours,
> Russ Magee %-)
> 
> > 

-- 
Vincent R. Nijs
Assistant Professor of Marketing
Kellogg School of Management, Northwestern University
2001 Sheridan Road, Evanston, IL 60208-2001
Phone: +1-847-491-4574 Fax: +1-847-491-2498
E-mail: [EMAIL PROTECTED]
Skype: vincentnijs




--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to