Opened 4 months ago
Closed 4 months ago
#35579 closed Uncategorized (invalid)
Run the development server (python manage.py runserver) creating http://127.0.0.1:8000/login/ in your browser.
Reported by: | clay richmond | Owned by: | |
---|---|---|---|
Component: | Uncategorized | Version: | 5.0 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
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
Change History (3)
comment:1 by , 4 months ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 by , 4 months ago
Resolution: | invalid |
---|---|
Status: | closed → new |
Sorry you closed the ticket ... your summary was 100% wrong , just the opposite ... I DO NOT WANT ANY TIME OF LOGIN FEATURE AT ALL... the app automatically includes login and cant work around it.
thank you for the help
Clay
comment:3 by , 4 months ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Hello Clay, thanks for your report. If I understand your description correctly, you are saying that:
If the above is correct, then this is the expected behavior. Django will respond with a 404 for URLs that your project does not implement.
When you say:
What do you expect to happen instead?
With the information provided so far, I think this report seems better suited to be a support request. The best place to get answers to your issue is using any of the user support channels from this link.
Since the goal of this issue tracker is to track issues about Django itself, and your issue seems, at first, to be located in your custom code, I'll be closing this ticket as invalid following the ticket triaging process.