You need to render your template with two forms in context. For example:

class LoginFormView(views.View):
    def get_context_data(self, **kwargs):
        context = super().get_context_data(**kwargs)
        context["login_form"] = LoginForm()
        context["registration_form"] = RegistrationForm()
        return context

Ege Güneş
+90 532 740 0848
https://gunes.io <https://www.gunes.io>
For anything sensitive: https://gunes.io/publickey.txt

On Wed, Nov 15, 2017 at 6:29 AM, Mike Ru <[email protected]> wrote:

> How can I pass two forms(registration and login) in one template? I'm
> using 'registration' and it's using different templates. For registration
> it's using 'registration_form.html and for login it's using login.html. How
> can I pass a login form in modal window inside registration_form.html. In
> short, I have a page for registration. It has a modal window. I need to
> pass in modal window only form for login. How can I make it ?
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> 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/65c476e9-cfe6-4bf8-b8f2-30901db03e92%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/65c476e9-cfe6-4bf8-b8f2-30901db03e92%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> 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 [email protected].
To post to this group, send email to [email protected].
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/CAC0wnshdBZmxzO7to6%2BLDZOSSSJeNMqtc2Wz2C6NdeDX_rbt%3Dw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to