On Dec 3, 11:59 am, refreegrata <refreegr...@yahoo.com> wrote:
> Ok, with hidden fields. But if the user manually, with some tool,
> change the value, thats will be a problem. For my safety I must to use
> the hidden fields and still keep the clean methods to overwrite any
> possible editing over the fields value. Originally the idea of this
> post was search a way to prevent the double assign(in the init and the
> clean methods), but apparently isn't possible.
>
> Thanks for the answer.

It isn't possible because you are, in actuality, asking two questions:

1.  How can I set the value of a field on the server w/o client
interaction, and
2.  Ensure that the client doesn't do something malicious

Number one is something that you should take care of in your view or
model (__init__, perhaps), and number 2 is a validation issue.

Since you said you didn't want to handle it in your POST processing,
which is the only way you can set it once and take care of both issues
(because you're doing it at the end of the chain), you will have to do
it twice, no matter what method/idea/framework you use.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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