Login and registration on the homepage

74 views
Skip to first unread message

Alexandre Lara

unread,
May 20, 2015, 11:11:40 PM5/20/15
to django...@googlegroups.com
Hi,

I'd like to know if there is a way to display the login and registration form on the homepage besides 'account/login' URL. I tried to copy the code from 'templates/customer/login_registration.html' and put it on the homepage but the form fields are not being displayed.

Thank you.

David Winterbottom

unread,
Jun 2, 2015, 1:13:16 PM6/2/15
to django-oscar
You'll will need to override the homepage view class (or provide your own one) that provides data to the template, and ensure it passes the appropriate form classes (see here) so the template has something to render.

You'll also need to ensure your form submits to the regular login/registration URL so the form data is processed correctly.

--
https://github.com/tangentlabs/django-oscar
http://django-oscar.readthedocs.org/en/latest/
https://twitter.com/django_oscar
---
You received this message because you are subscribed to the Google Groups "django-oscar" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-oscar...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-oscar.
To view this discussion on the web, visit https://groups.google.com/d/msgid/django-oscar/e248adb8-cdc8-4b8f-b4d6-02449c34229e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages