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
Sadia Islam Thaky’s Post
More Relevant Posts
-
Most Django developers don’t realize this… The ORM is silently killing their performance. I’ve seen APIs go from: ⚠️ 300 queries → ⚡ 3 queries Just by fixing QuerySet usage. In this carousel, I broke down: - N+1 problem - select_related vs prefetch_related - F expressions - Real production mistakes If you're working with Django, this is a must-know. Full guide here 👇 https://lnkd.in/dVuaXBMq #Django #Python #DjangoORM #WebDevelopment #BackendDevelopment #SoftwareEngineering #DatabaseOptimization #ProgrammingTips #Developers #CodingLife #BuildInPublic
To view or add a comment, sign in
-
Exploring how Django handles the flow of a web application 👨💻 While working on my project, I focused on understanding how Django connects URLs, views, and templates to process requests and return responses. It’s interesting to see how a simple request from the user goes through different layers before rendering the final output. This helped me better understand how web frameworks structure applications behind the scenes. #Django #Python #WebDevelopment #Backend #Learning
To view or add a comment, sign in
-
-
Most beginner Django projects aren't wrong. They're just incomplete. ✅ They work ✅ They run ✅ They look fine But miss one thing: 👉 Real-world thinking. No error handling. No edge cases. No clear API structure. Just "it works on my system." I'm realizing: building projects is step one. Making them reliable is step two. That's what actually separates beginners from developers. What's one thing you'd add to make a project more "real-world ready"? #Django #BackendDevelopment #Python #LearningInPublic
To view or add a comment, sign in
-
-
Optimizing Django Queries: How to Avoid N+1 Problems One of the quickest ways to slow down your Django backend is the classic N+1 query issue. While working on Inboxit, I had to be deliberate about this especially when dealing with relationships between models. The fix I use most often: prefetch_related() It’s perfect for optimizing reverse relationships (when you have a ForeignKey pointing to your model and you need to access related data). Instead of making one query per object (which explodes with more records), prefetch_related fetches all the related data in just two queries one for the main objects and one for the related ones. This small change keeps response times fast and your API scalable as usage grows. Have you run into N+1 issues in your Django projects? What’s your go-to optimization technique? #Django #DRF #Python #BackendDevelopment #QueryOptimization #TechNigeria #webdev
To view or add a comment, sign in
-
-
5 mistakes killing your React, .NET & Python code — and how to fix them 👇 Most devs learn these the hard way. I made this so you don't have to. Swipe through for tips on: → React re-renders that tank your app's performance → EF Core N+1 queries you probably have in production right now → Writing Python that actually looks like Python → The frontend-backend contract nobody talks about → How I use AI tools to ship faster in 2026 Save this post. You'll want to come back to it. If this was useful, follow me for more full-stack tips every week. What's your biggest dev tip? Drop it in the comments 👇 #ReactJS #DotNet #CSharp #Python #FullStackDevelopment #WebDevelopment #SoftwareEngineering #Programming #TechTips #AITools #CursorAI #DeveloperLife #CodeQuality #BackendDevelopment #FrontendDevelopment
To view or add a comment, sign in
-
💡 I used to think complex code = better backend skills. Now I see the opposite. Simple code is actually harder to write. Why? Complex code hides confusion. Simple code exposes it. To keep things simple, you need: clear understanding + better structure + fewer assumptions. In Django, writing a working view is easy. Writing a clean, predictable one? That takes real thinking. Now I reduce complexity instead of adding more. Good backend code doesn't impress, it makes things easier. #Django #BackendDevelopment #Python #LearningInPublic
To view or add a comment, sign in
-
-
Flask vs Django: Key Differences Every Python Developer Should Know #programming #webdesign #rswebsols https://ift.tt/bB6T4co Excited to share our latest dive into Python web frameworks: Flask vs Django. This post breaks down the key differences every developer should know, from project size and complexity to learning curves, speed of development, and ecosystem strength. If you’re choosing the right tool for your next project, this comparison will help you make an informed decision between Django’s batteries-included approach and Flask’s lightweight, flexible design. Read the full analysis and decide which framework aligns with your goals and team needs. Link: https://ift.tt/bB6T4co
To view or add a comment, sign in
-
-
💡 The moment I started thinking like a backend developer: I stopped asking "Is my code correct?" And started asking 👉 "What could go wrong?" Now whenever I build something in Django, I think: → What if the user sends wrong data? → What if the API fails? → What if the database returns nothing? Earlier, I only focused on the happy path. Now I focus on edge cases. That one shift completely changed how I write backend code. Because real applications don't break on correct inputs… They break on the ones you didn't expect. If you're learning backend development, stop only building for perfect scenarios. Your users definitely won't cooperate. 😅 Are you thinking about edge cases yet? 👇 #Django #BackendDevelopment #Python #LearningInPublic #WebDev
To view or add a comment, sign in
-
-
Day 02 of 30 | Django MVT Pattern 🐍 Before writing any code in Django, you need to understand how it thinks. MVT = Model + View + Template. Every request your user makes follows this exact flow: → Browser sends a request → urls.py routes it to the right View → View asks the Model for data → Model queries the database → View sends data to the Template → Template renders HTML and returns it to the browser I made a video explaining each part. My English is A2. The diagram helps. 👀 #Django #Python #30DaysOfDjango #LearningInPublic #Developer #SaaS
To view or add a comment, sign in
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development