I don't think Python is the right tool for frontend development.
There are entire (and good) frameworks oriented to frontend using JavaScript (such as AngularJS), that also take care of DOM manipulation, handling events, encapsulating ajax requests, etc.
On Mon, Jan 5, 2015 at 8:11 PM, Martin Formanko <martin.formanko@gmail.com> wrote:
In the past (2 years ago), when I used dajaxice, it was quite unstable and definitely not robust - it took some time after I understood how to react to different (erroneous) behavior. It would be better that time to code my own library, so that I could understand it more deeply in case of errors (I do not consider "something went wrong" as an explanatory error). It's just my experience, I am using it in 2 projects, it works, but it just took hours to get it fixed and working (incompatibility issues with datatables, debug-toolbar, quite serious performance problems in case of greater complexity). Anyways, it force you to keep your Ajax code organised in ajax.py. May be good or not.Whether you use dajaxice or not, you do not need any JS in your form template file. Just override the submit handler with document.on('submit', '.ajaxified-form', ...) in your main javascript file and thus make it generic for all "ajaxified" forms. You have to pass to this function POST URL as well somehow. Make also your forms in separate templates.On Mon, Jan 5, 2015 at 5:50 PM, Krishnakant Mane <krmane@gmail.com> wrote:I see, it is a great library, yet I still have to write some javascript code.
I was looking for some library wich let's say integrates with Jquery and gives access to it's AJAX functionality through Python code, just like crispy-forms does for CSS.
Happy hacking.
Krishnakant.To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/54AAC0CB.30502%40gmail.com.
On 01/05/2015 08:08 PM, Daniel França wrote:
Have you tried Dajax/Dajaxice? http://www.dajaxproject.com/
Em Sun Jan 04 2015 at 2:15:16 PM, Krishnakant Mane <krmane@gmail.com>
escreveu:
Hello all,
I am realy impressed with the Django forms and some additional
enhancements with CrispyForms
<http://django-crispy-forms.readthedocs.org/en/latest/index.html>
Specially that additional library does a great job with css management
making it possible to make the forms look good and accessible using only
Python code.
Is there some thing similar for AJAX support?
I wish some thing like this.
Make a form using Crispy forms or even simple Django forms.
If a submit is required for sending an AJAX request and getting response
either in JSOn or otherwise, some Python code which exploites the
functionality of Jquery or any JS library is available.
The entire AJAX code is written using Python, just like the way css is
managed with the above mentioned library, so that one does not have to
go back to the template and write the javascript code, then come back to
the view to check the form for IDs of fields etc.
This moving back and forth for either css or javascript could be avoided
(Crispy forms already does it for css as I said before ).
Kindly let me know if such a thing exists.
Happy hacking.
Krishnakant.
--
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.
To view this discussion on the web visit https://groups.google.com/d/
msgid/django-users/54A93CCE.6070108%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
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.To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAFA7yDTUM_PHNhqQNVk-b62cP_EcE4Pd08ELKscFb-DSGBN%3DWQ%40mail.gmail.com.--
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.
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CALn3ei1uPj2hG6z3j7OPudF313LkCwGBP1u4s1rNVxo8FCirwg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment