Category: Django

0

Chapter 3: Django QuerySet – Filter

QuerySet – Filter: .filter() — the heart of almost every real QuerySet you will ever write. Most beginners do one or two simple .filter(is_active=True) and think “okay, I know how to filter”. But .filter()...

0

Chapter 4: Django QuerySet – Order By

QuerySet – Order By: .order_by() — sorting your data. Beginners often think “oh, just add -pub_date and done”, but .order_by() has many subtle but very powerful behaviors, especially when you combine it with annotations,...

0

Static Files

Static Files — CSS, JavaScript, images, fonts, PDFs, etc. The files that make your site look beautiful and modern instead of plain HTML. Many beginners either: hardcode inline styles forever (messy) put CSS in...

0

Chapter 1: Django – Add Static File

Add Static File: How to properly add and use static files (CSS, JavaScript, images, fonts, favicons, etc.) in Django. Many beginners either: keep writing everything inline inside <style> or <script> tags → code becomes...

0

Chapter 2: Django – Installing WhiteNoise

Installing and configuring WhiteNoise (the simplest, most popular way to serve static files in production when you don’t have a separate nginx/Apache server yet) Many people reach the deployment stage, run collectstatic, see 404...

0

Chapter 3: Django – Collect Static Files

Collecting static files — the python manage.py collectstatic command. This is the step that separates “it works on my laptop” from “it works on the internet”. Many people reach deployment day, see 404 errors...

0

Chapter 4: Django – Global Static Files

Global static files — the CSS, JavaScript, images, favicons, fonts, etc. that should appear on every single page of your app. Most beginners start by putting everything inside one app’s static/ folder (e.g. polls/static/polls/css/style.css)...

0

Chapter 5: Add CSS File to the Project

Add CSS File to the Project: Many beginners keep writing styles directly inside <style> tags in base.html or in individual templates — which works for 5 minutes, but becomes a complete nightmare when you...