Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crispy Forms - Bootstrap Buttons #10

Open
cpbarretthc opened this issue Dec 20, 2019 · 0 comments
Open

Crispy Forms - Bootstrap Buttons #10

cpbarretthc opened this issue Dec 20, 2019 · 0 comments

Comments

@cpbarretthc
Copy link
Collaborator

Hey,
The buttons for "Register" and "Login" aren't rendered in Bootstrap 4, and instead use Django's default style. This is unusual because the "Contact" page's form works correctly.

Each page is rendered using Bootstrap 4 by using Crispy Form's FormHelper class, a la

def __init__(self, *args, **kwargs):

This helper class renders the button with all the other fields, instead of the previous system that added the input button as a separate tag in the template files.

Login's form uses a modified AuthenticationForm from forms.py, which is installed with Django (which I just found out doesn't push with the other edited documents, is it feasible to allow me to edit the default forms and store them elsewhere?)

Register's base form:

self.helper.add_input(Submit('submit', 'Register'))

Contact.py's working button:

self.helper.add_input(Submit('submit', 'Send'))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant