Changes between Initial Version and Version 1 of Ticket #36699, comment 1
- Timestamp:
- Oct 31, 2025, 7:55:11 AM (4 weeks ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #36699, comment 1
initial v1 1 ### Proposed Fix 1 == Proposed Fix == 2 2 Below is a proposed fix for the login page (404) issue discussed in this ticket. 3 3 This fix demonstrates how a Django project can manually define a login route, view, and template. 4 4 It also helps clarify to new users why the default `/login/` route does not exist. 5 5 6 ```python6 {{{#!python 7 7 # mysite/urls.py 8 8 from django.urls import path … … 18 18 def login_view(request): 19 19 return render(request, 'login.html') 20 }}} 21 22 {{{ 20 23 <!-- templates/login.html --> 21 24 <h1>Login Page</h1> … … 26 29 <button type="submit">Login</button> 27 30 </form> 31 }}}