Saturday, February 6, 2016

Re: Add model item with AJAX pop up

The result should look like the "create user" modal dialog on this page:

https://jqueryui.com/dialog/#modal-form

Any idea how to get this done?

Up to now I use the usual pattern:

 - redirect after post, if the submitted data is valid.
 - show form again with error message if the data is not valid.

I could code this myself. But I ask myself it is good to do so.

I guess this has already been solved many times before. I most cases
there is a library/reusable-app. But here I found none.

Regards,
  Thomas Güttler

Am Samstag, 6. Februar 2016 14:12:48 UTC+1 schrieb guettli:

I use django-select2 for easy ForeignKey picking. Works nice.


But how can I add a new item in the ForeignKey table?


I would like to have a big [+] button near the select2 field and then a (ajax) modal dialog should open (like in the admin interface).


AFAIK django-select2 does not help here. Is there a different library which can help here?


I would like to re-use and not to re-invent. Maybe I was blind, but I could not

find a matching comparison grid on djangopackages.com.


I would like to avoid a "old-school" browser-window-pop-up :-)


Regards,

  Thomas Güttler

--
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/db6f6d27-727b-4dd0-aae6-848ee94e528f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment