-
Notifications
You must be signed in to change notification settings - Fork 33
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
Restore usernames to user model #211
Conversation
WalkthroughThis update streamlines the user account management in the application by introducing a custom signup form, making usernames mandatory, and enhancing the login and signup templates with modern designs. The changes improve user experience through a more organized layout and flexible authentication options, aligning the interface with contemporary standards. Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
🧙 Sourcery has finished reviewing your pull request! Tips
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've reviewed this pull request using the Sourcery rules engine. If you would also like our AI-powered code review then let us know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (5)
- approval_polls/forms.py (2 hunks)
- approval_polls/settings.py (2 hunks)
- approval_polls/templates/account/base_manage.html (1 hunks)
- approval_polls/templates/account/login.html (1 hunks)
- approval_polls/templates/account/signup.html (1 hunks)
Additional comments not posted (15)
approval_polls/templates/account/base_manage.html (1)
1-1
: Verify the appropriateness of the new base template.The template now extends
../base.html
instead ofallauth/layouts/manage.html
. Ensure that../base.html
provides the necessary structure and styles for managing accounts.approval_polls/templates/account/signup.html (5)
Line range hint
1-5
:
Verify the appropriateness of the base template and loaded libraries.The template extends
base.html
and loads necessary libraries (widget_tweaks
,allauth
,i18n
). Ensure that these are appropriate for the signup page.
6-6
: LGTM!The head title is set to "Sign Up" and is correctly localized.
9-50
: LGTM! But verify the Bootstrap layout.The content uses Bootstrap's grid system and card layout. Ensure that the layout is appropriate and correctly implemented.
19-35
: LGTM! But verify form field handling.The form uses a loop to iterate through form fields and handles errors appropriately. Ensure that the form is correctly implemented.
Line range hint
37-56
:
LGTM!The actions and social login options are correctly implemented.
approval_polls/templates/account/login.html (3)
Line range hint
1-10
:
Verify the appropriateness of the base template and loaded libraries.The template extends
base.html
and loads necessary libraries (static
,socialaccount
,i18n
,allauth account
,widget_tweaks
). Ensure that these are appropriate for the login page.
11-11
: LGTM!The head title is set to "Sign In" and is correctly localized.
11-56
: LGTM! But verify the Bootstrap layout.The content uses Bootstrap's grid system and card layout. Ensure that the layout is appropriate and correctly implemented.
approval_polls/forms.py (2)
95-99
: Ensure proper handling of password confirmation removal.The
__init__
method removes thepassword2
field, which is typically used for password confirmation. Ensure that this change is intentional and that the user experience and security implications are considered.
100-103
: LGTM!The
save
method correctly overrides the default behavior and ensures the user is saved without using thepassword2
field.approval_polls/settings.py (4)
261-261
: Ensure the username field is correctly integrated.The
ACCOUNT_USER_MODEL_USERNAME_FIELD
is set to"username"
. Verify that the user model includes this field and that it is correctly integrated throughout the application.
262-262
: Mandatory username requirement.The
ACCOUNT_USERNAME_REQUIRED
is set toTrue
, making usernames mandatory. Ensure that all user creation processes and forms are updated to reflect this requirement.
267-267
: Expanded authentication methods.The
ACCOUNT_AUTHENTICATION_METHOD
is updated to"username_email"
, allowing users to authenticate using either their username or email. Ensure that this change is reflected in the login forms and authentication logic.
276-276
: Custom signup form integration.The
ACCOUNT_FORMS
setting specifies a custom signup form:{"signup": "approval_polls.forms.CustomSignupForm"}
. Verify that the custom form is correctly integrated and functioning as expected.
No description provided.