Skip to content

Crispy Forms - Bootstrap Buttons #10

@cpbarretthc

Description

@cpbarretthc

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'))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions