> And each one of them inputs data in different format (id numbers, phone
> numbers, dates, names [upper cased, capitalized, lower cased])
> Therefore I have to normalize an input to store, and then print contract
> agreements in normalized way.
Input normalization should be done in form clean() or views.
If it is impossible or inconvenient then Model.save() is ok, but
signals should not handle this.
After all it's your model logic it should be in model, it will be far
more confusing moving it from there.
You can also take a look at Model.clean().
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment