Sadia Islam Thaky’s Post

Spent way too long debugging a 404 error in Django recently. I had this in my resumes/urls.py: path('resumes/', views.upload_resume) Which combined with the main urls.py prefix gave me /resumes/resumes/ The fix was just changing it to an empty string: path('', views.upload_resume) If you're learning Django, remember - include() joins the prefixes. Whatever you write in the main urls.py is already part of the URL. Your app's urls.py only defines what comes after. Hope this saves someone an hour. #Django #Python #BackendDevelopment #JuniorDeveloper

To view or add a comment, sign in

Explore content categories