I use bootstrap modal with some jquery code.

jQuery code isnt hard, on Django side what you need is special treatment
for ajax call so you can render template for form (and only form), so you
can load it into modal.

Fortunately I wrote a AjaxUpdateView yesterday. It is in beta, but check at
https://github.com/chronossc/django-cbv-utils/blob/4d992533925e4bc2e215cbfa8e98d07853d65784/cbv_utils/views.py#L152
...
you will see in form_valid and form_invalid methods that I render the form
and return with JSON in response to ajax request.

Here is html files and jquery code used with this view:
https://gist.github.com/chronossc/4952775 ... consider it a example :)



Felipe 'chronos' Prenholato.
Linux User nº 405489
Home page: http://devwithpassion.com | http://chronosbox.org/blog
GitHub: http://github.com/chronossc/ | Twitter: http://twitter.com/chronossc


2013/2/13 <jirka.vejra...@gmail.com>

> **
> Probably the easiest way is to use a JS/CSS framework that has a good
> support for popups and forms. There are a lot out there. I have personal
> experience with Bootstrap (one of the most popular these days) - check its
> documentation (look for both "popup" and "modal"), also search for
> available bootstrap plugins - plenty exist.
>
> If you wanted to stick with jQuery, check out jQuery UI - a set of
> reusable components that might suit your needs.
>
> HTH
>
> Jirka
> ------------------------------
> *From: * frocco <faro...@gmail.com>
> *Sender: * django-users@googlegroups.com
> *Date: *Wed, 13 Feb 2013 11:35:36 -0800 (PST)
> *To: *<django-users@googlegroups.com>
> *ReplyTo: * django-users@googlegroups.com
> *Cc: *<tevans...@googlemail.com>
> *Subject: *Re: Is there an easy way to popup forms?
>
> Thanks Tom,
>
> Do you know how I would have a form display using this?
>
>
> On Wednesday, February 13, 2013 11:41:59 AM UTC-5, Tom Evans wrote:
>>
>> On Wed, Feb 13, 2013 at 4:12 PM, frocco <far...@gmail.com> wrote:
>> > I have a form I want to popup and am having trouble getting this to
>> work.
>> > This is not in the admin page.
>> >
>> > Can someone give me an example?
>> >
>> > Thanks
>> >
>>
>> An easy way to do a pop up form is to use a jqueryui dialog¹
>>
>> http://api.jqueryui.com/**dialog/ <http://api.jqueryui.com/dialog/>
>>
>> Cheers
>>
>> Tom
>>
>> ¹ Other dialogs are available, consult your local google
>>
>  --
> 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+unsubscr...@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.
>
>
>
> --
> 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+unsubscr...@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.
>
>
>

-- 
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+unsubscr...@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.


Reply via email to