It's actually pretty simple. A form is generated on the fly for each editlive field using modelform_factory:
https://github.com/h3/django-editlive/blob/master/editlive/adaptors/base.py#L45
Then when saving, I check the form for field errors:
https://github.com/h3/django-editlive/blob/master/editlive/adaptors/base.py#L195
It might be useful eventually to add support for custom forms, I don't think it would be very hard to implement.
Regards,
--
Maxime Haineault
Consultant Web / Associé
∞ Motion Média
http://motion-m.ca
m...@motion-m.ca
(450) 747-0862
Maxime Haineault
Consultant Web / Associé
∞ Motion Média
http://motion-m.ca
m...@motion-m.ca
(450) 747-0862
On Friday, February 1, 2013 8:12:32 AM UTC-5, JoeLinux wrote:
--Looks pretty cool, and maybe this is just my naivety at work, but how does form validation work with this?
On Fri, Feb 1, 2013 at 12:25 AM, h3 <hain...@gmail.com> wrote:Hi everybody,
I would like to introduce you my latest project: django-editlive
It can make any database object editable in template with a simple template tag.
More informations, including demos and docs here: http://editlive.motion-m.ca
Feedback would be appreciated.--
Maxime Haineault
Consultant Web / Associé
∞ Motion Média
http://motion-m.ca
m...@motion-m.ca
(450) 747-0862
--
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...@googlegroups.com .
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en .
For more options, visit https://groups.google.com/groups/opt_out .
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment