File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,8 +26,12 @@ <h2 class="h3">Log in to your account</h2>
2626 < button class ="btn btn-primary btn-lg btn-block " name ="commit " type ="submit "> Log In</ button >
2727 < input type ="hidden " name ="next " value ={{ next }} >
2828 </ form >
29+ {% if registration_enabled %}
2930 < a class ="panel-footer " href ="/user/registration/ "> < span > Sign Up</ span > </ a >
31+ {% endif %}
3032 </ div >
33+ {% if password_reset_enabled %}
3134 < a href ="/user/password_reset/ " class ="white-link "> Forgot your password?</ a >
35+ {% endif %}
3236 </ div >
3337</ div >
Original file line number Diff line number Diff line change @@ -136,6 +136,10 @@ class ActivateAccountFailView(TemplateView):
136136
137137
138138class UserLoginView (views .LoginView ):
139+ extra_context = {
140+ "registration_enabled" : settings .REGISTRATION_ENABLED ,
141+ "password_reset_enabled" : True if settings .EMAIL_HOST else False ,
142+ }
139143 template_name = 'user/login.html'
140144
141145
You can’t perform that action at this time.
0 commit comments