Re: Add model item with AJAX pop up

2016-03-03 Thread guettli
The comparison grid of autocomplete inputs has a feature called "Add-another outside the admin": These libraries support adding new instances. I don't know if they use an ajay pop-up or an other solution: https://www.djangopackages.com/grids/g/auto-complete/ Am Montag, 8. Februar 2016 21:12:

Re: Add model item with AJAX pop up

2016-02-08 Thread guettli
There many auto-complete fields. Adding an item in a popup is needed very often. The django-admin does it, too. For me it is strange that there is no reusable widget for this. Am Montag, 8. Februar 2016 09:17:48 UTC+1 schrieb pa xapy: > > hi > easiest way is to write separate view which will han

Re: Add model item with AJAX pop up

2016-02-08 Thread pa xapy
hi easiest way is to write separate view which will handle ajax requests (get and post) and render html (as a json field) and success status as response. on frontend you will handle this response to show modal with form and submit it until model will successfully saved once it happens, you can re

Re: Add model item with AJAX pop up

2016-02-06 Thread guettli
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 val