Hello Jochen,

On Monday, December 12, 2016 at 9:17:11 AM UTC-5, joche...@gmail.com wrote:
>
>
> for editing Objects, but it seems that those views can only deal with 
> objects that already are in the database.  So is there a more 
> idiomatic way to solve this or am I stuck with the above solution? 
>

What about using the forms validate() method? i.e. if the user has not 
filled in all the JSON details, return a validation error. This should give 
them the opportunity to make edits or re-type as needed.

 

> On another note, there are several Models I want to work with in 
> this way so it would be even better if I could select the model 
> class according to the contents of the json file. 
>

This sounds like a validation job to me. Just put in all the logic checks 
into the validate() method. Bear in mind that you are likely to receive bad 
input, so handle accordingly. 

Yours sincerely,
Abraham V.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ed0b8b47-9922-45e1-9899-745ff6197275%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to