No, I think I didn't correctly explain the matter; say I have a Thing model
with a list of strings in it.

I want the user to be able to:

1. Access the Thing creation form
2. While editing the form loading a file and being presented with the full
content
3. Choosing some lines from that content
4. Submit the form

So I need to "modify" the view attaching fields which content comes from
what the user uploads.

2011/10/20 Venkatraman S <venka...@gmail.com>

>
> On Thu, Oct 20, 2011 at 1:32 PM, Leonardo Giordani <
> giordani.leona...@gmail.com> wrote:
>
>>
>> I'm trying to implement a an application where the user creates a new
>> object through a form. Up to here I'm fine.
>>
>> This time though the object creation involves loading a file and choosing
>> some data from it (say choosing some lines, for examples).
>>
>> So I'm a little stuck here. How can I let the user load the file and show
>> the file content in the form itself before submitting?
>>
>> Or is this behaviour wrong for a Web application?
>>
>
>
> Probably, you may want to show the contents of the file after the user
> uploads the file? So that the file's copy is present in the server.
> If you want to show the preview of the doc in the app, i would suggest
> generating a summary or clip a few lines when the model is saved, and store
> the summary in a different field, so that you can avoid run-time
> computations of the summary when the file is to be accessed.
>
> Did i get you right?
>
> -V
>
> --
> 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
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to