-
David Pape authored
* Change color of 'please log in' message * Set placeholder on ORCID field * Set title and pattern on ORCID field * Update CHANGELOG * One fewer .save() in user creation * enable_register → registration_enabled * Use FormView as base for RegisterView * Fix NULL constraint in HeliportGroup creation * Add ORCID validation * Fix bug in clean_X functions They have to return the cleaned value. * Fix type annotations for Python 3.8 * Fix tests * Move RegisterView into views.user * Add type annotations * Rename template heliport_login → login * Create common base template for login and register * Align login and register template They now look the same except for the form. * Add missing docstring * Replace some style attrs with classes * Use .form-text for all errors * Update login UI to match registration form * Remove rendering of obsolete message variable * RegisterView based on new RegistrationForm * Simplify login UI * Login UI based on Django form * Install django-widget-tweaks This allows us to alter rendering of Django forms using template tags rather than in Python code. * Add back messages to login page * Replace LoginView with Django built-in LoginView * Use user_logged_in signal instead of post_save * Update HELIPORT user/group in post_save handler This is the way suggested in Django's custom auth guide and it will allow us to get rid of the custom LoginView. See: https://docs.djangoproject.com/en/4.2/topics/auth/customizing/#extending-the-existing-user-model * Don't pass backend to login function As explained in the docs, it can be determined automatically from the `user.backend` attribute. See: https://docs.djangoproject.com/en/4.2/topics/auth/default/#selecting-the-authentication-backend This also means that the `auth_backend` attribute on the `UserInformationManager` is not needed. * Remove is_login_page distinction This was used to change the behaviour of the navbar HELIPORT logo. On normal pages, it would lead users to /project/list/, on the login page it would lead users to / which would return a redirect to /project/list/, thus making the distinction unnecessary.
571b0a52
To find the state of this project's repository at the time of any of these versions, check out the tags.