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 %-)

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