#35579: Run the development server (python manage.py runserver) creating
http://127.0.0.1:8000/login/ in your browser.
--------------------------+-----------------------------------------
     Reporter:  clay1969  |                     Type:  Uncategorized
       Status:  new       |                Component:  Uncategorized
      Version:  5.0       |                 Severity:  Normal
     Keywords:            |             Triage Stage:  Unreviewed
    Has patch:  0         |      Needs documentation:  0
  Needs tests:  0         |  Patch needs improvement:  0
Easy pickings:  0         |                    UI/UX:  0
--------------------------+-----------------------------------------
 Potential Bug Report for Django (4.2.13)
 Title: Unexpected "Page not found (404)" error for "/login/" path even
 without login functionality enabled.

 Description:

 This bug report describes an issue where Django (version 4.2.13) throws a
 "Page not found (404)" error for the path "/login/" even when the project
 doesn't utilize Django's built-in login functionality. The mysite/urls.py
 file does not define a URL pattern for login, yet the error persists.

 Steps to Reproduce:

 Create a new Django project (using django-admin startproject mysite).

 In mysite/settings.py, ensure there are no configurations related to login
 functionality (e.g., no LOGIN_URL setting).

 In mysite/urls.py, define only URL patterns for desired functionalities
 (excluding login). For example:

 Python
 from django.contrib import admin
 from django.urls import path

 urlpatterns = [
     path("admin/", admin.site.urls),
     # Other URL patterns for your app views
 ]
 Use code with caution.
 content_copy
 Run the development server (python manage.py runserver).

 Access the URL http://127.0.0.1:8000/login/ in your browser.

 Expected Behavior:

 Django should not generate a "Page not found" error for "/login/" as the
 project doesn't have a login URL pattern defined.
 Actual Behavior:

 Django displays a "Page not found (404)" error for "/login/".
 Additional Information:

 Python version: [Mention your Python version]
 Operating System: macOS
 Django version: 4.2.13
 Possible Causes (for investigation):

 Conflicting URL patterns in other apps (if applicable).
 Third-party app interference with URL resolution.
 Unexpected behavior in core Django routing logic (less likely).
 Severity:

 Medium (Disrupts development workflow and might cause confusion for users
 encountering the error).

 Workaround (if applicable):

 Manually remove any login URL patterns defined in other app-specific
 urls.py files.
 Request:

 Investigate the cause of the unexpected "Page not found" error for
 "/login/" when login functionality is not explicitly used.
 Provide a potential fix or workaround if this is a bug in Django's core
 behavior.
 Please note: This is a potential bug report based on the information
 provided. You might need to modify it based on your specific project setup
 and any additional details you discover.




 tune

 share


 more_vert
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35579>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701908405362f-abfcfb41-29c0-4ff2-b8f6-3cd57e568cfd-000000%40eu-central-1.amazonses.com.

Reply via email to