<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Zabby</title>
    <description>The latest articles on DEV Community by Zabby (@zabby).</description>
    <link>https://dev.to/zabby</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3291617%2F0d819c57-9345-40ae-b939-02547bc27d23.jpeg</url>
      <title>DEV Community: Zabby</title>
      <link>https://dev.to/zabby</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zabby"/>
    <language>en</language>
    <item>
      <title>QuerySet Wizardry: Making Django ORM My Playground</title>
      <dc:creator>Zabby</dc:creator>
      <pubDate>Mon, 04 Aug 2025 19:29:21 +0000</pubDate>
      <link>https://dev.to/zabby/queryset-wizardry-making-django-orm-my-playground-5e9l</link>
      <guid>https://dev.to/zabby/queryset-wizardry-making-django-orm-my-playground-5e9l</guid>
      <description>&lt;p&gt;Why filtering data with Django is part science, part sorcery and how the ORM helps me build features that users actually care about.&lt;/p&gt;

&lt;h2&gt;
  
  
  From &lt;code&gt;.filter()&lt;/code&gt; to &lt;code&gt;.annotate()&lt;/code&gt; My Early ORM Revelations
&lt;/h2&gt;

&lt;p&gt;Django's ORM felt deceptively simple at first:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Expense.objects.filter(amount__gt=100)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That gave me a list of big expenses. Cool, but the real power of QuerySets came when I learned to &lt;em&gt;chain, annotate, and optimize.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  My Favorite Query Patterns
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Chained Filters
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Expense.objects.filter(user=request.user).filter(date__year=2025)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Keeps the logic readable while layering constraints.&lt;/p&gt;




&lt;h3&gt;
  
  
  2. Using &lt;code&gt;.values()&lt;/code&gt; and &lt;code&gt;.values_list()&lt;/code&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Expense.objects.values("name", "amount")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Perfect for lightweight API responses or debugging structured data.&lt;/p&gt;




&lt;h3&gt;
  
  
  3. &lt;code&gt;.annotate()&lt;/code&gt; with Aggregates
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from django.db.models import Sum

User.objects.annotate(total_expense=Sum("expense__amount"))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Teaching tip:&lt;/strong&gt; Describe annotations like “attaching post-it notes to each object” computed fields without changing the database.&lt;/p&gt;




&lt;h3&gt;
  
  
  4. &lt;code&gt;.select_related()&lt;/code&gt; and &lt;code&gt;.prefetch_related()&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Speed tricks that saved me from N+1 query hell:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Expense.objects.select_related("user")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or for many-to-many:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User.objects.prefetch_related("groups")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I use &lt;code&gt;print(connection.queries)&lt;/code&gt; to profile query counts. Always fun to demo performance wins with just a few lines.&lt;/p&gt;




&lt;h2&gt;
  
  
  When I Use Raw SQL
&lt;/h2&gt;

&lt;p&gt;Sometimes the ORM can’t express a complex join or a conditional CASE statement cleanly.&lt;/p&gt;

&lt;p&gt;I reach for:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Expense.objects.raw("SELECT * FROM myapp_expense WHERE amount &amp;gt; %s", [100])
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But I always encapsulate raw queries behind services or helper functions never scatter them across views.&lt;/p&gt;




&lt;h2&gt;
  
  
  QuerySet as a Language
&lt;/h2&gt;

&lt;p&gt;One moment that changed my thinking: realizing QuerySets aren't just tools they’re a language. You compose meaning through chaining, nesting, and creative logic.&lt;/p&gt;

&lt;p&gt;Eg: Filtering by focus tag and date range in my Minimalist Inbox:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Task.objects.filter(user=request.user).filter(tag="focus").filter(date__gte=today)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That translates a user’s need into code so &lt;em&gt;directly&lt;/em&gt;, it feels like UX at the ORM level.&lt;/p&gt;




&lt;h2&gt;
  
  
  For Educators and Collaborators
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Document your QuerySets:&lt;/strong&gt; Use comments that explain business logic, not just syntax&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use helper methods:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def high_value_expenses(user):
    return Expense.objects.filter(user=user, amount__gt=500)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Teach the Zen of chaining:&lt;/strong&gt; Show how each &lt;code&gt;.filter()&lt;/code&gt; narrows the query’s intent&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Django’s ORM isn't just for data it’s a canvas for logic, insight, and intention. Whether I’m building dashboards, analytics, or just helping users find what matters, QuerySets are my language of choice.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>backend</category>
      <category>django</category>
    </item>
    <item>
      <title>JWT in Django Rest Framework: Building Secure Auth from Scratch</title>
      <dc:creator>Zabby</dc:creator>
      <pubDate>Mon, 04 Aug 2025 18:16:21 +0000</pubDate>
      <link>https://dev.to/zabby/jwt-in-django-rest-framework-building-secure-auth-from-scratch-2ob1</link>
      <guid>https://dev.to/zabby/jwt-in-django-rest-framework-building-secure-auth-from-scratch-2ob1</guid>
      <description>&lt;p&gt;Why I moved beyond Django’s default auth system and how JWT unlocked modular, secure, and scalable authentication.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Not Django’s Default Login?
&lt;/h2&gt;

&lt;p&gt;Let’s face it session-based auth is fine for traditional sites, but once I started building SPAs with React, things got clunky. I needed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Stateless auth for mobile + frontend clients&lt;/li&gt;
&lt;li&gt;Token refresh flow&lt;/li&gt;
&lt;li&gt;Endpoint flexibility&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Enter &lt;strong&gt;JSON Web Tokens (JWT)&lt;/strong&gt; my passport to modern Django authentication.&lt;/p&gt;




&lt;h2&gt;
  
  
  Setup with Django Rest Framework + djangorestframework-simplejwt
&lt;/h2&gt;

&lt;h4&gt;
  
  
  Installation
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install djangorestframework djangorestframework-simplejwt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Add to &lt;code&gt;settings.py&lt;/code&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;INSTALLED_APPS = [
    'rest_framework',
]

REST_FRAMEWORK = {
    'DEFAULT_AUTHENTICATION_CLASSES': (
        'rest_framework_simplejwt.authentication.JWTAuthentication',
    ),
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Core JWT Views
&lt;/h2&gt;

&lt;p&gt;DRF SimpleJWT gives you these out of the box:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from rest_framework_simplejwt.views import (
    TokenObtainPairView,
    TokenRefreshView,
)

urlpatterns = [
    path("api/token/", TokenObtainPairView.as_view(), name="token_obtain_pair"),
    path("api/token/refresh/", TokenRefreshView.as_view(), name="token_refresh"),
]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But I prefer customizing &lt;code&gt;TokenObtainPairSerializer&lt;/code&gt; to include user data in the token response.&lt;/p&gt;




&lt;h2&gt;
  
  
  Custom Serializer Example
&lt;/h2&gt;

&lt;p&gt;Let’s enrich token responses:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from rest_framework_simplejwt.serializers import TokenObtainPairSerializer

class CustomTokenObtainPairSerializer(TokenObtainPairSerializer):
    @classmethod
    def get_token(cls, user):
        token = super().get_token(user)
        token['username'] = user.username
        token['role'] = user.role  # assuming custom field
        return token

    def validate(self, attrs):
        data = super().validate(attrs)
        data['user'] = {
            'username': self.user.username,
            'email': self.user.email
        }
        return data
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then wire into views:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from rest_framework_simplejwt.views import TokenObtainPairView

class CustomTokenObtainPairView(TokenObtainPairView):
    serializer_class = CustomTokenObtainPairSerializer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Auth-Protected Views
&lt;/h2&gt;

&lt;p&gt;Using &lt;code&gt;IsAuthenticated&lt;/code&gt; in any DRF view:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from rest_framework.permissions import IsAuthenticated

class ProfileView(APIView):
    permission_classes = [IsAuthenticated]

    def get(self, request):
        return Response({"user": request.user.username})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The frontend just sends the token in the &lt;code&gt;Authorization&lt;/code&gt; header:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Authorization: Bearer &amp;lt;your_jwt_token&amp;gt;&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;




&lt;h2&gt;
  
  
  Teaching JWT Auth: My Favorite Metaphors
&lt;/h2&gt;

&lt;p&gt;When explaining JWT to students, I use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Passport Analogy:&lt;/strong&gt; Token carries your identity; the server doesn’t need to remember you.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Sticker System:&lt;/strong&gt; Each JWT is like a sticker pack with claims; don’t trade stickers with strangers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Renewable Visa:&lt;/strong&gt; Refresh tokens = long-term travel permits.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal is to demystify headers, expiry, and token rotation.&lt;/p&gt;




&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;JWT turned my Django APIs into elegant, frontend-friendly systems. Stateless auth brings clarity, speed, and trust and when structured right, it’s modular, secure, and a joy to maintain.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>coding</category>
      <category>django</category>
    </item>
    <item>
      <title>Modularity or Madness? Structuring Django Apps for Sanity and Reuse</title>
      <dc:creator>Zabby</dc:creator>
      <pubDate>Mon, 04 Aug 2025 17:59:41 +0000</pubDate>
      <link>https://dev.to/zabby/modularity-or-madness-structuring-django-apps-for-sanity-and-reuse-43h1</link>
      <guid>https://dev.to/zabby/modularity-or-madness-structuring-django-apps-for-sanity-and-reuse-43h1</guid>
      <description>&lt;h2&gt;
  
  
  Context: The Chaos of a Growing Codebase.
&lt;/h2&gt;

&lt;p&gt;When I first started building with Django, I made the classic mistake: one monolithic &lt;code&gt;views.py&lt;/code&gt;, bloated &lt;code&gt;models.py&lt;/code&gt;, and templates spilling out like soup. As my apps grew, so did my frustration.&lt;/p&gt;

&lt;p&gt;So I began treating my Django projects like Lego sets. Every piece should click into place and be swappable without breaking everything else.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Modular Philosophy
&lt;/h2&gt;

&lt;p&gt;Here’s the guiding approach I now use for &lt;strong&gt;every Django project&lt;/strong&gt;:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Separate Concerns by App
&lt;/h3&gt;

&lt;p&gt;Example structure for a productivity suite:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;myproject/
├── users/          # handles auth &amp;amp; profiles
├── inbox/          # minimalist inbox assistant
├── expenses/       # expense tracking
├── jokes/          # humor module
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Each app should answer ONE question.&lt;/strong&gt; Avoid mixing views from multiple domains into one app. Think like an API designer, even if you’re building HTML.&lt;/p&gt;




&lt;h3&gt;
  
  
  2. Views: Break Them Down
&lt;/h3&gt;

&lt;p&gt;I split views by functionality within each app:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;expenses/
├── views/
│   ├── list.py
│   ├── create.py
│   ├── stats.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then wire them into &lt;code&gt;views/__init__.py&lt;/code&gt; for import ease.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why it works:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Easier to test each view file&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Keeps logical flow visible&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Lets me teach students incrementally.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  3. Models: Keep It Clean and Thoughtful
&lt;/h3&gt;

&lt;p&gt;Each model lives in &lt;code&gt;models.py&lt;/code&gt;, but I often abstract logic out:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Expense(models.Model):
    ...
    def formatted_amount(self):
        return f"${self.amount:.2f}"

# Or abstract to a utils file:
def format_amount(amount):
    return f"${amount:.2f}"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Rule of thumb:&lt;/strong&gt; Business logic lives in separate helpers unless it absolutely belongs in the model.&lt;/p&gt;




&lt;h3&gt;
  
  
  4. Forms and Serializers Deserve Their Own Files
&lt;/h3&gt;

&lt;p&gt;Organizing by type helps scaling:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;expenses/
├── forms/
│   ├── expense_form.py
├── serializers/
│   ├── expense_serializer.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It’s easier to debug or refactor without wondering where that nested validation rule lives.&lt;/p&gt;




&lt;h3&gt;
  
  
  5. URLs That Scale
&lt;/h3&gt;

&lt;p&gt;Per-app &lt;code&gt;urls.py&lt;/code&gt; should map clearly to views, and I often namespace them:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app_name = "expenses"

urlpatterns = [
    path("", views.list_expenses, name="list"),
    path("create/", views.create_expense, name="create"),
]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This makes reverse lookups readable and prevents collisions.&lt;/p&gt;




&lt;h3&gt;
  
  
  6. Apps.py and Meta Metadata
&lt;/h3&gt;

&lt;p&gt;Don’t underestimate the value of &lt;code&gt;apps.py&lt;/code&gt; and model Meta options:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Expense(models.Model):
    class Meta:
        ordering = ['-date']
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This kind of subtle config makes your apps feel polished to users even if it’s just one line.&lt;/p&gt;




&lt;h2&gt;
  
  
  Teaching Modularity
&lt;/h2&gt;

&lt;p&gt;When I scaffold projects for students or collaborators, here’s what I do:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Prefix commits with the app name:&lt;/strong&gt; &lt;code&gt;expenses: add ExpenseForm for new entry UI&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Include README-per-app:&lt;/strong&gt; Explain what each app does, and why it exists.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use docstrings and comments as breadcrumbs:&lt;/strong&gt; Guide future developers with insight, not just syntax.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Modularity isn’t just about clean code it’s about mental clarity, team velocity, and student empowerment. A well-structured Django repo teaches back. You build it once, but it teaches many.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>From CRUD to Craft: My First Django Build.</title>
      <dc:creator>Zabby</dc:creator>
      <pubDate>Mon, 04 Aug 2025 13:23:35 +0000</pubDate>
      <link>https://dev.to/zabby/from-crud-to-craft-my-first-django-build-40en</link>
      <guid>https://dev.to/zabby/from-crud-to-craft-my-first-django-build-40en</guid>
      <description>&lt;h3&gt;
  
  
  How Django taught me more than just CRUD and gave me a framework for thinking like a builder.
&lt;/h3&gt;

&lt;h2&gt;
  
  
  The Beginning
&lt;/h2&gt;

&lt;p&gt;When I first ran &lt;code&gt;django-admin startproject&lt;/code&gt;, I had no idea I was entering a full-blown ecosystem. I thought I’d be stitching together a few forms and models turns out I was architecting a universe.&lt;/p&gt;

&lt;p&gt;Here’s how I got from zero to a functional Django app and why CRUD was just the appetizer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step-by-Step Build
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Setting Up the Skeleton
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;django-admin startproject expense_tracker
cd expense_tracker
python manage.py startapp transactions
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Key decisions:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I chose a project name that reflected real utility “Expense Tracker” because I wanted my learning to feel practical.&lt;/li&gt;
&lt;li&gt;Started with a single app for clean scope.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Building Models First
&lt;/h3&gt;

&lt;p&gt;Inside &lt;code&gt;transactions/models.py&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from django.db import models

class Expense(models.Model):
    name = models.CharField(max_length=100)
    amount = models.DecimalField(max_digits=10, decimal_places=2)
    date = models.DateField()

    def __str__(self):
        return f"{self.name}: {self.amount}"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;What I learned:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Django’s ORM makes database tables feel intuitive.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Modeling isn’t just technical it’s philosophical. What does an “expense” mean in my world?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Migrating and Admin Setup
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python manage.py makemigrations
python manage.py migrate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then in &lt;code&gt;transactions/admin.py&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from django.contrib import admin
from .models import Expense

admin.site.register(Expense)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Suddenly I had a beautiful admin panel. It felt like cheating in the best way.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Views, Forms, and Templates
&lt;/h3&gt;

&lt;p&gt;Function-based views were my go-to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def add_expense(request):
    if request.method == "POST":
        form = ExpenseForm(request.POST)
        if form.is_valid():
            form.save()
            return redirect("list_expenses")
    else:
        form = ExpenseForm()
    return render(request, "add.html", {"form": form})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Aha moments:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;POST vs GET finally made sense once I wired them into views.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Forms gave me a crash course in validation and user experience&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5. URLs and App Routing
&lt;/h3&gt;

&lt;p&gt;In &lt;code&gt;transactions/urls.py&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from django.urls import path
from . import views

urlpatterns = [
    path("add/", views.add_expense, name="add_expense"),
    path("", views.list_expenses, name="list_expenses"),
]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then I included this in the main project’s &lt;code&gt;urls.py&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;path("expenses/", include("transactions.urls")),
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Modular routing hit home here it felt like Django was teaching me how to design scalable software.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lessons From My First Django App
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The admin panel is more than a dashboard it’s a real tool for feedback and iteration.&lt;/li&gt;
&lt;li&gt;Views and forms are where UX and logic shake hands.&lt;/li&gt;
&lt;li&gt;Modular thinking starts early, even in urls.py.&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Day 5: What MVC &amp; MVT Finally Clicked for Me</title>
      <dc:creator>Zabby</dc:creator>
      <pubDate>Tue, 01 Jul 2025 15:48:32 +0000</pubDate>
      <link>https://dev.to/zabby/day-5-what-mvc-vs-mvt-finally-clicked-for-me-129</link>
      <guid>https://dev.to/zabby/day-5-what-mvc-vs-mvt-finally-clicked-for-me-129</guid>
      <description>&lt;p&gt;Today felt like solving one of those architecture riddles I kept brushing past. For the first time, I clearly understood how Django’s &lt;strong&gt;MVT (Model–View–Template)&lt;/strong&gt; compares to the more commonly discussed &lt;strong&gt;MVC (Model–View–Controller)&lt;/strong&gt; pattern. &lt;br&gt;
Spoiler: it’s not as different as it sounds but Django definitely does things its own way.&lt;/p&gt;

&lt;p&gt;--&lt;/p&gt;
&lt;h2&gt;
  
  
  What is MVC?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Model&lt;/strong&gt; – Handles business logic and database structure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;View&lt;/strong&gt; – The UI: what the user sees (HTML, CSS).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Controller&lt;/strong&gt; – Logic that connects user input, the model, and the view&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Classic, clean, and logical.&lt;/p&gt;
&lt;h2&gt;
  
  
  Django’s MVT — The Same but Different
&lt;/h2&gt;

&lt;p&gt;Django swaps out some names and bakes a few decisions into the framework for you. Here's Django's version:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Model&lt;/strong&gt; – Still your database structure and logic, powered by Django ORM&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;View&lt;/strong&gt; – Unlike MVC, this is your Python function or class that handles requests and responses&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Template&lt;/strong&gt; – Where your HTML and front end presentation lives&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In Django:&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;View&lt;/strong&gt; is the Controller&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;Template&lt;/strong&gt; is the View&lt;/p&gt;

&lt;p&gt;And the &lt;strong&gt;Model&lt;/strong&gt; stays the same&lt;/p&gt;
&lt;h2&gt;
  
  
  Visualizing the Architecture
&lt;/h2&gt;

&lt;p&gt;Here's a side-by-side comparison I found helpful:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;MVC                        Django MVT
--------------------      --------------------
Model       →  Model       (unchanged)
View        →  Template    (the UI)
Controller  →  View        (Python logic)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And here's a diagram that makes it even clearer:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm2ngli2vcdfs3292wtka.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm2ngli2vcdfs3292wtka.png" alt="Image description" width="800" height="452"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This really helped me lock in Django's flow: &lt;strong&gt;Request → View (logic) → Model (if needed) → Template (response)&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  My “Aha” Moment
&lt;/h2&gt;

&lt;p&gt;Here’s what made it click. I wrote this Django view:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def home(request):
    return render(request, 'home.html', {'msg': 'Welcome to Day 5!'})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then connected it to &lt;code&gt;home.html&lt;/code&gt;, where I rendered that &lt;code&gt;msg&lt;/code&gt; variable. That’s when it hit me:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The &lt;strong&gt;View&lt;/strong&gt; here is controlling the flow it’s the Controller.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The &lt;strong&gt;Template&lt;/strong&gt; is responsible only for display just like MVC's View.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Suddenly, MVT made total sense.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Mattered for Me
&lt;/h2&gt;

&lt;p&gt;I used to misplace logic doing too much in templates or confusing Django’s terminology. Now:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;I know where business logic belongs (views and models)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I respect Django’s separation of concerns&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I debug faster, because I understand what each layer is responsible for&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I Built on Day 5
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Created function-based views with context data&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Connected views to templates using urls.py&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Explored class-based views (will dive deeper soon)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This laid the groundwork for understanding more advanced patterns like mixins, CBVs, and reusable components.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thought
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/Zambagarrah/20-Days-of-Django.git" rel="noopener noreferrer"&gt;🔍 View the source code on GitHub&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;“MVT helped me understand MVC more clearly.”&lt;/p&gt;

&lt;p&gt;Funny how Django’s unique naming convention challenged me then clarified everything I’d half-learned in other frameworks.&lt;/p&gt;

&lt;p&gt;If you’re new to Django or architecture in general, don’t stress. Let the code teach you. The more you build, the clearer it becomes.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>python</category>
      <category>backend</category>
    </item>
    <item>
      <title>Day 4: Building My First Django Project with Linked Apps (And Making It Look Good Too)</title>
      <dc:creator>Zabby</dc:creator>
      <pubDate>Mon, 30 Jun 2025 16:37:35 +0000</pubDate>
      <link>https://dev.to/zabby/day-4-building-my-first-django-project-with-linked-apps-and-making-it-look-good-too-55l3</link>
      <guid>https://dev.to/zabby/day-4-building-my-first-django-project-with-linked-apps-and-making-it-look-good-too-55l3</guid>
      <description>&lt;p&gt;As part of my 20 Days of Django journey, I tackled the challenge of building a project with two interconnected apps &lt;code&gt;library&lt;/code&gt; and &lt;code&gt;members&lt;/code&gt; and styled it up using Bootstrap. Here's how I structured it, step by step.&lt;/p&gt;

&lt;h1&gt;
  
  
  Todays Task
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Use Django’s project + app architecture&lt;/li&gt;
&lt;li&gt;Link two apps: library and members&lt;/li&gt;
&lt;li&gt;Display templates for each&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;✅ Step 1:&lt;/strong&gt; Installed virtualenv (if not already there) using the command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install python3-venv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;✅ Step 2:&lt;/strong&gt; Created a virtual environment in my project folder&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python3 -m venv venv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This created a &lt;code&gt;venv/&lt;/code&gt; folder containing an isolated Python environment complete with its own pip, python, and site-packages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;✅ Step 3:&lt;/strong&gt; Activated the virtual environment&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;source venv/bin/activate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv807ky8wfy4ix49iztej.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv807ky8wfy4ix49iztej.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once activated, my terminal prompt changed (it showed (venv)), and any packages I installed from that point forward were isolated to the project.&lt;br&gt;
To deactivate it run the command: &lt;code&gt;deactivate&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  To Install Django you run the command:
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python -m pip install django             
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx9xl5doaolftgsld01y3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx9xl5doaolftgsld01y3.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  📁 Step One: Starting the Django Project.
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;django-admin startproject community
cd community
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;I saw this structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;community/
    manage.py
    my_project/
        __init__.py
        settings.py
        urls.py
        asgi.py
        wsgi.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  📁 Step 2: Created Django Apps
&lt;/h2&gt;

&lt;p&gt;Installed the required django apps i went with &lt;code&gt;library&lt;/code&gt; &amp;amp; &lt;code&gt;members&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python manage.py startapp library
python manage.py startapp members
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2zquqng6gflmqgormsbi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2zquqng6gflmqgormsbi.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Creating Models That Talk to Each Other
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;library/models.py&lt;/code&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Book(models.Model):
    title = models.CharField(max_length=100)
    author = models.CharField(max_length=100)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;code&gt;members/models.py&lt;/code&gt;:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from library.models import Book

class Member(models.Model):
    name = models.CharField(max_length=100)
    borrowed_book = models.ForeignKey(Book, on_delete=models.CASCADE)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  I ran migrations to apply these changes:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python manage.py makemigrations
python manage.py migrate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  🧠 Step 4: Simple Views
&lt;/h2&gt;

&lt;p&gt;Each app got its own view to send data to the templates.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;library/views.py&lt;/code&gt;:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def book_list(request):
    books = Book.objects.all()
    return render(request, 'library/books.html', {'books': books})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;code&gt;members/views.py&lt;/code&gt;:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def member_list(request):
    members = Member.objects.all()
    return render(request, 'members/members.html', {'members': members})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  🖼️ Step 5: Linking Templates with Style
&lt;/h2&gt;

&lt;p&gt;Both apps got their own templates directory. I used Bootstrap and a light CSS gradient background to make them feel cleaner and more polished.&lt;/p&gt;

&lt;p&gt;Here’s a peek at books.html:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;body style="background: linear-gradient(to bottom right, #f2f2f2, #e6f7ff);"&amp;gt;
  &amp;lt;div class="container mt-5 bg-white p-4 rounded shadow"&amp;gt;
    &amp;lt;h2&amp;gt;📚 Library Books&amp;lt;/h2&amp;gt;
    &amp;lt;ul&amp;gt;
      {% for book in books %}
        &amp;lt;li&amp;gt;{{ book.title }} by {{ book.author }}&amp;lt;/li&amp;gt;
      {% endfor %}
    &amp;lt;/ul&amp;gt;
    &amp;lt;a href="/members/"&amp;gt;View Members&amp;lt;/a&amp;gt;
  &amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Same idea applied to &lt;code&gt;members.html&lt;/code&gt;, with a flipped color scheme to visually separate them.&lt;/p&gt;

&lt;h3&gt;
  
  
  🌐 Step 6: URLs That Connect It All
&lt;/h3&gt;

&lt;p&gt;Each app got its own &lt;code&gt;urls.py&lt;/code&gt;, which I included in the main &lt;code&gt;community/urls.py&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;urlpatterns = [
    path('library/', include('library.urls')),
    path('members/', include('members.urls')),
]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now I could browse:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;/library/&lt;/code&gt; to see the books&lt;/p&gt;

&lt;p&gt;&lt;code&gt;/members/&lt;/code&gt; to view who borrowed what&lt;/p&gt;

&lt;p&gt;Here is the output for the 2 apps&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faltna5902d1ye94vp8bg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faltna5902d1ye94vp8bg.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fujcusrzjqvcacy6cy0c5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fujcusrzjqvcacy6cy0c5.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;💡 What I Learned&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Zambagarrah/20-Days-of-Django.git" rel="noopener noreferrer"&gt;🔍 View the source code on GitHub&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Django's app structure scales cleanly even for a beginner&lt;/li&gt;
&lt;li&gt;Connecting models across apps is smooth once you understand ForeignKey&lt;/li&gt;
&lt;li&gt;Styling with Bootstrap + gradients makes Django feel like more than just a backend toy&lt;/li&gt;
&lt;li&gt;Always create &lt;code&gt;urls.py&lt;/code&gt; for each app before including them in &lt;code&gt;project/urls.py&lt;/code&gt; (yes, I hit that error 😅)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This was my first time combining multiple Django apps into a meaningful, linked experience and styling it to be user-friendly. Now I’m thinking about adding forms for borrowing books, filtering members by book, and maybe even connecting it all to the admin panel with some customization. Day 4 wrapped with a big win, and I'm already hyped for Day 5.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Demystifying Django: How I Learned the Project Structure (Through My Own Debugging Lens)</title>
      <dc:creator>Zabby</dc:creator>
      <pubDate>Mon, 30 Jun 2025 10:48:25 +0000</pubDate>
      <link>https://dev.to/zabby/demystifying-django-how-i-learned-the-project-structure-through-my-own-debugging-lens-2929</link>
      <guid>https://dev.to/zabby/demystifying-django-how-i-learned-the-project-structure-through-my-own-debugging-lens-2929</guid>
      <description>&lt;h2&gt;
  
  
  🧪 Setting Up My Virtual Playground: Virtual Environments on Kali
&lt;/h2&gt;

&lt;p&gt;Before diving deep into Django, I knew I needed to isolate my Python dependencies. I didn’t want one project to break another just because they used different versions of a package. So I set up a virtual environment, which felt like creating a clean slate for Django to thrive.&lt;/p&gt;

&lt;p&gt;Here’s exactly what I did on Kali Linux:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;✅ Step 1:&lt;/strong&gt; Installed virtualenv (if not already there) using the command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install python3-venv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;🗂️ Step 2:&lt;/strong&gt; Created a virtual environment in my project folder&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python3 -m venv venv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This created a &lt;code&gt;venv/&lt;/code&gt; folder containing an isolated Python environment complete with its own pip, python, and site-packages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🚀 Step 3:&lt;/strong&gt; Activated the virtual environment&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;source venv/bin/activate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv807ky8wfy4ix49iztej.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv807ky8wfy4ix49iztej.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once activated, my terminal prompt changed (it showed (venv)), and any packages I installed from that point forward were isolated to the project.&lt;br&gt;
To deactivate it run the command: &lt;code&gt;deactivate&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  To Install Django you run the command:
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python -m pip install django             
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx9xl5doaolftgsld01y3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx9xl5doaolftgsld01y3.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  📁 Step One: The Curious Case of the Double Folder
&lt;/h2&gt;

&lt;p&gt;When I ran:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;django-admin startproject my_project
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I saw this structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;my_project/
    manage.py
    my_project/
        __init__.py
        settings.py
        urls.py
        asgi.py
        wsgi.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At first glance, the repetition felt like a mistake. But then I realized it’s deliberate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;outer folder&lt;/strong&gt; is your project root.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;inner folder&lt;/strong&gt; contains your actual configuration files it's the heart of the system.
Understanding this helped me navigate imports, app registration, and even deployment configurations more confidently.
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhb74cag6x28p3c8atv90.png" alt=" "&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;🧠 The Brains of the Operation:&lt;/strong&gt; &lt;code&gt;settings.py&lt;/code&gt; and Friends
&lt;/h2&gt;

&lt;p&gt;Inside the inner my_project/ folder, I found:&lt;br&gt;
&lt;code&gt;settings.py&lt;/code&gt;: The holy grail of configuration. Middleware, installed apps, static files you name it.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;urls.py&lt;/code&gt;: Like Django’s GPS. Every route begins here.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;asgi.py&lt;/code&gt; and &lt;code&gt;wsgi.py&lt;/code&gt;: I saw them as protocol translators; one for async, one for traditional web servers.&lt;/p&gt;

&lt;p&gt;Once I edited &lt;code&gt;settings.py&lt;/code&gt; to connect my app and saw my static files load correctly, the structure felt alive—not abstract anymore.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5n9jgglv5dqgjpebt8pt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5n9jgglv5dqgjpebt8pt.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  ⚙️ &lt;code&gt;manage.py&lt;/code&gt;: My Swiss Army Knife
&lt;/h2&gt;

&lt;p&gt;I underestimated &lt;code&gt;manage.py&lt;/code&gt; at first. It looked like a throwaway script until I used it to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Start the development server.&lt;/li&gt;
&lt;li&gt;Create apps (startapp).&lt;/li&gt;
&lt;li&gt;Run migrations.&lt;/li&gt;
&lt;li&gt;Open the Django shell.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now, I think of it as Django’s command-line gateway to everything project-related.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl2p98nvod1uhpadfc4qq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl2p98nvod1uhpadfc4qq.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;🧩 Apps:&lt;/strong&gt; Where the Magic (Actually) Happens
&lt;/h2&gt;

&lt;p&gt;When I ran:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python manage.py startapp blog
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I got folders for:&lt;br&gt;
&lt;code&gt;models.py&lt;/code&gt;: My database design sandbox.&lt;br&gt;
&lt;code&gt;views.py&lt;/code&gt;: Where I learned request and response cycles the hard way.&lt;br&gt;
&lt;code&gt;admin.py&lt;/code&gt;: One of Django's most underrated features—customizing the admin interface became a fun side mission.&lt;/p&gt;

&lt;p&gt;Having multiple apps that plug into a single project showed me how Django scales gracefully without becoming a monolith.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;🎨 Templates, Static, and Media:&lt;/strong&gt; The Visual Layer
&lt;/h2&gt;

&lt;p&gt;It finally clicked that templates aren't just HTML they're Django-aware, with &lt;code&gt;{% %}&lt;/code&gt; and &lt;code&gt;{{ }}&lt;/code&gt; blocks for logic and data. Static files gave me some CSS headaches at first, but once I correctly configured &lt;code&gt;STATICFILES_DIRS&lt;/code&gt;, things smoothed out. And media? It’s where user uploads go. Simple, but essential for anything dynamic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🔚 Final Thoughts&lt;/strong&gt;&lt;br&gt;
Learning Django’s project structure wasn’t just about reading docs—it was about navigating errors, debugging misconfigured paths, and rewriting what I misunderstood the first time. Now, when I open a fresh Django project, it feels less like an unknown directory tree and more like a well-organized toolkit.&lt;/p&gt;

&lt;p&gt;If you’re just starting with Django, don’t just copy and paste. Walk through the structure, question everything, and let the architecture teach you how Django thinks.&lt;/p&gt;

</description>
      <category>python</category>
      <category>development</category>
      <category>backend</category>
    </item>
    <item>
      <title>DAY 2: Learning All About Git &amp; Github.</title>
      <dc:creator>Zabby</dc:creator>
      <pubDate>Thu, 26 Jun 2025 07:24:31 +0000</pubDate>
      <link>https://dev.to/zabby/learning-all-about-git-github-3ab6</link>
      <guid>https://dev.to/zabby/learning-all-about-git-github-3ab6</guid>
      <description>&lt;h2&gt;
  
  
  🚀 1. Forking a Repository
&lt;/h2&gt;

&lt;p&gt;Navigate to the repository you want to contribute to on GitHub.&lt;/p&gt;

&lt;p&gt;Click the “Fork” button in the top right corner—this creates a copy under your account.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcb1kobmjoaxfkvrwcuj0.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcb1kobmjoaxfkvrwcuj0.jpeg" alt="Image description" width="800" height="244"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Clone your forked repo with &lt;code&gt;git clone &amp;lt;your-forked-url&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Work on it locally, then push your changes back to your fork.&lt;/p&gt;

&lt;h2&gt;
  
  
  🤝 2. Collaborating on GitHub
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fomi3w6srev9jd6sc04iw.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fomi3w6srev9jd6sc04iw.jpeg" alt="Image description" width="800" height="368"&gt;&lt;/a&gt;&lt;br&gt;
Create issues or comments to discuss tasks or bugs.&lt;/p&gt;

&lt;p&gt;Assign roles or tasks (especially in teams).&lt;/p&gt;

&lt;p&gt;Push branches and create pull requests to contribute your code.&lt;/p&gt;

&lt;p&gt;Review PRs and resolve feedback collaboratively.&lt;/p&gt;

&lt;p&gt;Keep communication transparent through comments and commit messages.&lt;/p&gt;

&lt;h2&gt;
  
  
  🔁 3. Creating a Pull Request (PR)
&lt;/h2&gt;

&lt;p&gt;Create a new branch: &lt;code&gt;git checkout -b feature-branch&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Make your changes and commit them: &lt;code&gt;git add .&lt;/code&gt; and &lt;code&gt;git commit -m "describe changes"&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Push the branch: &lt;code&gt;git push origin feature-branch&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Go to GitHub and click “Compare &amp;amp; pull request”.&lt;/p&gt;

&lt;p&gt;Add a meaningful title and description, then submit it for review.&lt;/p&gt;

&lt;h2&gt;
  
  
  ⚔️ 4. Resolving Merge Conflicts
&lt;/h2&gt;

&lt;p&gt;Pull the latest changes: &lt;code&gt;git pull origin main&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If conflicts appear, open the affected files they’ll be marked with &amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; HEAD.&lt;/p&gt;

&lt;p&gt;Manually resolve which code to keep or merge.&lt;/p&gt;

&lt;p&gt;Add and commit the resolved files.&lt;/p&gt;

&lt;p&gt;Push your branch again: &lt;code&gt;git push&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  🧪 5. Doing a Code Review
&lt;/h2&gt;

&lt;p&gt;Go to the pull request, click “Files Changed”.&lt;/p&gt;

&lt;p&gt;Review the code—check for clarity, performance, security, and readability.&lt;/p&gt;

&lt;p&gt;Leave inline comments or approve/request changes.&lt;/p&gt;

&lt;p&gt;Be respectful and specific—help make the code better, not just different.&lt;/p&gt;

&lt;h2&gt;
  
  
  📋 6. Managing GitHub Issues
&lt;/h2&gt;

&lt;p&gt;Open an issue: title + detailed description.&lt;/p&gt;

&lt;p&gt;Label it (bug, enhancement, etc.).&lt;/p&gt;

&lt;p&gt;Assign it to contributors or yourself.&lt;/p&gt;

&lt;p&gt;Comment updates or progress.&lt;/p&gt;

&lt;p&gt;Close the issue once resolved or linked to a merged PR.&lt;/p&gt;

&lt;h2&gt;
  
  
  🧠 7. Core Git Commands I Learned
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git init # Start version control in a folder.

git clone &amp;lt;url&amp;gt; # Copy a repo to your local machine.

git status # Check current changes.

git add . # Stage all changes.

git commit -m "message" # Save staged changes.

git pull # Get the latest code from a remote.

git push # Upload your commits to GitHub.

git checkout -b branch # Create/switch to a new branch.

git merge branch # Merge another branch into the one you're on.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  📦 8. Pushing Changes to GitHub
&lt;/h2&gt;

&lt;p&gt;Make sure your local branch is up to date: &lt;code&gt;git pull origin main&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Add and commit your changes: &lt;code&gt;git commit -m "message"&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Push to the branch: &lt;code&gt;git push origin your-branch&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Open or update a pull request with context about your changes.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>discuss</category>
      <category>github</category>
      <category>git</category>
    </item>
    <item>
      <title>DAY 1: Set Up Python, Git, Docker, VS Code &amp; Configure Git with GitHub SSH on Kali Linux</title>
      <dc:creator>Zabby</dc:creator>
      <pubDate>Wed, 25 Jun 2025 05:59:01 +0000</pubDate>
      <link>https://dev.to/zabby/setting-up-my-kali-machine-for-my-django-dev-journey-g8p</link>
      <guid>https://dev.to/zabby/setting-up-my-kali-machine-for-my-django-dev-journey-g8p</guid>
      <description>&lt;h2&gt;
  
  
  1. Install Python 3.12
&lt;/h2&gt;

&lt;p&gt;Kali usually ships with Python preinstalled, but I have verified using the following command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python3.12 --version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Install Git 2.47
&lt;/h2&gt;

&lt;p&gt;Here’s how to compile Git 2.47:&lt;/p&gt;

&lt;p&gt;Installed dependencies:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install -y make libssl-dev libghc-zlib-dev libcurl4-gnutls-dev libexpat1-dev gettext unzip
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Download and build Git:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd /usr/src
sudo curl -O https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.47.2.tar.gz
sudo tar -xvzf git-2.47.2.tar.gz
cd git-2.47.2
sudo make prefix=/usr/local all
sudo make prefix=/usr/local install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Verified Installation using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git --version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. Install Visual Studio Code
&lt;/h2&gt;

&lt;p&gt;VS Code offers a .deb package for Debian-based distros like Kali so i downloaded it from the official website using the link "&lt;a href="https://code.visualstudio.com/download" rel="noopener noreferrer"&gt;https://code.visualstudio.com/download&lt;/a&gt;".&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgy7reupso6vhcenlsbai.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgy7reupso6vhcenlsbai.png" alt="Image description" width="800" height="623"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Installed it using the command"&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd Downloads
sudo apt install ./code_1.101.1-1750254731_amd64.deb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&amp;amp; Lanched it using&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;code
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;then added a few extensions to better suit it for my python development.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Install Docker on Kali Linux
&lt;/h2&gt;

&lt;p&gt;Kali already has a package named docker, but it’s not the container engine. You’ll want to install docker.io instead:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install -y docker.io
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Enable and start Docker&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo systemctl enable docker --now
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then I Tested Installation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker --version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwf0m3f5izv3ip2d8gsx4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwf0m3f5izv3ip2d8gsx4.png" alt="Image description" width="800" height="266"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Configure Git with GitHub SSH
&lt;/h2&gt;

&lt;p&gt;Generate Your SSH Key&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssh-keygen -t ed25519 -C "email"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Replace "email" with the email linked to your GitHub account.&lt;/li&gt;
&lt;li&gt;When prompted, just press Enter to accept the default file location.&lt;/li&gt;
&lt;li&gt;You can add a passphrase for extra security.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Add the Key to the SSH Agent &amp;amp; your private key&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add Your Public Key to GitHub&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat ~/.ssh/id_ed25519.pub
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Copy the entire output.&lt;/li&gt;
&lt;li&gt;Paste your key and save.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Test your Setup&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssh -T git@github.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Configure Git Settings&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git config --global user.name "Your Full Name"
git config --global user.email "your_email@example.com"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  At the end you should have installed
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Python.&lt;/li&gt;
&lt;li&gt;Git( &amp;amp; Configured it with GitHub SSH).&lt;/li&gt;
&lt;li&gt;Docker Engine.&lt;/li&gt;
&lt;li&gt;VS Code.
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhefuq8i95kx6fd6mio8r.png" alt="Image description" width="800" height="115"&gt; &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Enjoy!!&lt;/p&gt;

</description>
      <category>python</category>
      <category>linux</category>
      <category>git</category>
      <category>github</category>
    </item>
  </channel>
</rss>
