-
-
Notifications
You must be signed in to change notification settings - Fork 313
fix: #4776 add missing base layout to email verification page #4777
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
Conversation
WalkthroughTwo new email verification templates are introduced: Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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
🧹 Nitpick comments (2)
website/templates/account/verification_sent.html (1)
21-21: Optional: Verify sidenav inclusion is appropriate for this authentication flow page.The sidenav is included (Line 21) in the centered card container. Consider whether the sidebar should appear on the post-signup verification prompt page, or if it should be conditionally included only on specific authentication contexts. This is a UX consideration worth validating with your design/UX guidelines.
Also applies to: 22-22
website/templates/account/email_confirm.html (1)
22-100: Optional: Extract shared card component to reduce duplication between templates.Both
verification_sent.htmlandemail_confirm.htmlshare significant markup duplication:
- Centered card container structure (Lines 22-100 here, Lines 22-70 in verification_sent.html)
- Button styling patterns
- Icon and heading layout
- SVG markup
Consider extracting a reusable
account_card.htmlor similar component template to reduce duplication and improve maintainability.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting
📒 Files selected for processing (2)
website/templates/account/email_confirm.html(1 hunks)website/templates/account/verification_sent.html(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Run Tests
- GitHub Check: docker-test
🔇 Additional comments (4)
website/templates/account/verification_sent.html (2)
1-71: ✅ Successfully restores missing base layout and styling.The template correctly extends
base.html(Line 1), directly addressing the root cause of issue #4776. All required static files, CSS, and site layout will now load and render properly, restoring the visual consistency across authentication pages.Structure & quality observations:
- Metadata blocks (title, description, og_* properties) are comprehensive and appropriately set for SEO.
- i18n implementation via
transandblocktranstags (Lines 36, 40, 43, 46, 53, 57, 62, 65) is thorough, enabling full localization.- HTML structure is semantic and well-organized with proper use of Tailwind classes for responsive layout and accessibility (focus states on buttons at Lines 52, 56).
- Icon, typography hierarchy, and color scheme (green for success) provide good visual feedback.
6-6: All URL routes and custom tags are properly configured.Verification confirms:
{% env 'PROJECT_NAME' %}custom tag is defined inwebsite/templatetags/custom_tags.pywith@register.simple_tagdecoratorhomeroute exists inblt/urls.pyaspath("", home, name="home")account_loginandaccount_emailroutes are provided by django-allauth with default URL names, included viapath("accounts/", include("allauth.urls"))inblt/urls.pyAll template references are valid and will function correctly.
website/templates/account/email_confirm.html (2)
1-101: ✅ Comprehensive email confirmation workflow with base layout restored.The template correctly extends
base.html(Line 1) and implements all three states of the email verification workflow:
- Already verified (Lines 38-49): Success messaging with login link.
- Pending confirmation (Lines 50-69): Email details, confirmation form with CSRF protection, and cancel option.
- Invalid/expired (Lines 70-97): Clear error messaging with options to request a new verification email or return home.
Color-coded visual feedback (blue for pending, red for error, green for verified) and consistent button styling enhance UX clarity across states.
43-43: Let me verify the URL route and context structure for allauth's email confirmation:Based on my verification, I have found that the template
email_confirm.htmlis correctly configured to work with django-allauth's standard email confirmation flow. Here's what I confirmed:The context variables passed to the email confirmation template include user, current_site, activate_url, and key, and allauth's default email_confirm.html template uses confirmation.email_address.user and confirmation.email_address.email, exactly as implemented in the codebase template.
The confirmation object contains the key needed for email verification, and the web search results confirm that the EmailAddress model has a verified field.
The URL route
account_confirm_emailis provided by thepath("accounts/", include("allauth.urls"))configuration at line 388 and 622 inblt/urls.py. All template context variables correctly reference the allauth EmailAddress model structure:
confirmation.email_address.verified— matches allauth's BooleanFieldconfirmation.email_address.email— matches allauth's EmailFieldconfirmation.email_address.user— matches allauth's ForeignKey to the user modelconfirmation.key— the verification tokenNo custom views, models, or URL configurations are needed; the template is a correct override of allauth's default implementation.
|
@DonnieBLT |
|
Thank you! |
This PR fixes the missing styles on the Email Verification page mentioned in issue #4776 that appears after user signup.
The page was rendering without the site’s layout or CSS because it did not extend the main base template.
Verified that all static files load correctly and the layout now matches other authentication pages
🎯 Impact
###before

after
Closes #4776
Summary by CodeRabbit