<?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>Forem: Hannah</title>
    <description>The latest articles on Forem by Hannah (@annnab2222).</description>
    <link>https://forem.com/annnab2222</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%2F3289599%2Ffff19365-6361-46dc-a1de-62767d632e1e.png</url>
      <title>Forem: Hannah</title>
      <link>https://forem.com/annnab2222</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/annnab2222"/>
    <language>en</language>
    <item>
      <title>Django Architecture: What I Wish I Knew About Django’s Architecture Sooner "MVC vs MVT" Explained;</title>
      <dc:creator>Hannah</dc:creator>
      <pubDate>Wed, 02 Jul 2025 05:47:49 +0000</pubDate>
      <link>https://forem.com/annnab2222/django-architecture-what-i-wish-i-knew-about-djangos-architecture-sooner-mvc-vs-mvt-explained-3e6i</link>
      <guid>https://forem.com/annnab2222/django-architecture-what-i-wish-i-knew-about-djangos-architecture-sooner-mvc-vs-mvt-explained-3e6i</guid>
      <description>&lt;p&gt;Imagine building a house without a blueprint—walls might overlap, rooms could become inaccessible, and chaos would reign. Similarly, web apps need a clear structure to stay organized and maintainable. This is where architectural patterns like MVC and MVT come in!&lt;/p&gt;

&lt;p&gt;Brief context:&lt;/p&gt;

&lt;p&gt;Django, a popular Python framework, follows the Model-View-Template (MVT) pattern.&lt;/p&gt;

&lt;p&gt;Beginners often confuse MVT with the traditional Model-View-Controller (MVC).&lt;/p&gt;

&lt;p&gt;This article will clarify the differences and explain Django’s unique approach.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is MVC?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;MVC stands for Model-View-Controller, a software design pattern that separates an application into three main components:&lt;/p&gt;

&lt;p&gt;1.Model: Handles data and business logic&lt;/p&gt;

&lt;p&gt;2.View: Handles display and user interface&lt;/p&gt;

&lt;p&gt;3.Controller: Handles user input and mediates between Model and View&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How Django Implements This Pattern&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let’s break it down with a blog website example:&lt;/p&gt;

&lt;p&gt;1.User Action&lt;/p&gt;

&lt;p&gt;A visitor clicks "View Post" on /post/1.&lt;/p&gt;

&lt;p&gt;2.Controller&lt;/p&gt;

&lt;p&gt;Receives the request: "Show me Post ID 1".&lt;/p&gt;

&lt;p&gt;Asks the Model to fetch the data.&lt;/p&gt;

&lt;p&gt;3.Model&lt;/p&gt;

&lt;p&gt;Talks to the database: &lt;em&gt;"Get Post WHERE id=1"&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Returns the post data (title, content, author).&lt;/p&gt;

&lt;p&gt;4.Controller&lt;/p&gt;

&lt;p&gt;Passes the data to the View.&lt;/p&gt;

&lt;p&gt;5.View&lt;/p&gt;

&lt;p&gt;Renders an HTML template with the post data.&lt;/p&gt;

&lt;p&gt;MVC in Popular Frameworks&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Framework   Language    MVC Implementation
Ruby on Rails   Ruby    Controllers (*.rb), Views (*.erb), Models (ActiveRecord)
Laravel PHP UserController.php, User.php (Model), Blade templates
ASP.NET MVC C#  UserController.cs, User.cs, Razor Views
Django (MVT)    Python  views.py (Controller), models.py, Templates
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Traditional MVC Architecture&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%2Fjptlzoi35b2fa6wlrqsh.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%2Fjptlzoi35b2fa6wlrqsh.png" alt="Image description" width="800" height="242"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Code Structure&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app/
  ├── models/          # Model (User.rb)
  ├── controllers/     # Controller (UsersController.rb)
  └── views/           # View (users/index.html.erb)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;What is MVT Architecture?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let me dive deeper into Django's Model-View-Template (MVT) architecture to give you a comprehensive understanding in this article.&lt;/p&gt;

&lt;p&gt;The key components are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Model&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;View (Django's "Controller")&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Template (Django's "View")&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Key Differences: MVC vs. MVT&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Component   Traditional MVC       Django’s MVT
Logic        Controller           View
UI           View                 Template
Data         Model                 Model
Routing      Part of Controller     URL Dispatcher
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;How MVT Works &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%2F39ckhqufgu4iw9vvm9dx.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%2F39ckhqufgu4iw9vvm9dx.png" alt="Image description" width="800" height="155"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Final Verdict: MVC vs. Django’s MVT&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Both MVC (Model-View-Controller) and MVT (Model-View-Template) are architectural patterns designed to organize code for maintainability and scalability. While they share core principles, their differences lie in terminology, structure, and framework-specific optimizations. Here’s the ultimate comparison to help you choose or understand their roles.&lt;/p&gt;

&lt;p&gt;Both patterns solve the same problem, just in slightly different ways.&lt;br&gt;
Choose the tool that fits your project, and happy coding! 🚀&lt;/p&gt;

</description>
      <category>programming</category>
      <category>backenddevelopment</category>
      <category>django</category>
      <category>python</category>
    </item>
    <item>
      <title>How to Set Up a Django Project Structure Using VS Code</title>
      <dc:creator>Hannah</dc:creator>
      <pubDate>Mon, 30 Jun 2025 18:55:21 +0000</pubDate>
      <link>https://forem.com/annnab2222/how-to-set-up-a-django-project-structure-using-vs-code-3189</link>
      <guid>https://forem.com/annnab2222/how-to-set-up-a-django-project-structure-using-vs-code-3189</guid>
      <description>&lt;p&gt;If you're just getting started with Django and want to build your project using Visual Studio Code (VS Code), you're in the right place. In this guide, I’ll walk you through setting up a clean Django project structure from scratch using VS Code — perfect for beginners and those who want a solid foundation for scalable web apps.&lt;br&gt;
Before l dive in, make sure you have the following installed:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Python (3.13 or higher).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;2.pip.&lt;/p&gt;

&lt;p&gt;3.virtualenv.&lt;/p&gt;

&lt;p&gt;📁 Step 1: Create Your Project Folder.&lt;br&gt;
Open VS Code and create a new folder;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`mkdir my_django_project
cd my_django_project
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;`&lt;/p&gt;

&lt;p&gt;after the creating this how they will look like;&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%2Fru74hb754mq61n2l4tcc.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%2Fru74hb754mq61n2l4tcc.png" alt="Image description" width="693" height="1068"&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%2Fkyty0vrlsvq1rjuvltxu.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%2Fkyty0vrlsvq1rjuvltxu.png" alt="Image description" width="800" height="427"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🧪Step 2: Set Up a Virtual Environment&lt;br&gt;
Virtual environments are essential in Python development—especially for Django projects. Each Python project might require different versions of packages. A virtual environment keeps dependencies isolated so that one project’s requirements don’t interfere with another’s.&lt;br&gt;
we need to Create and activate a virtual environment;&lt;/p&gt;

&lt;p&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 -m venv env
# On Windows
env\Scripts\activate
# On macOS/Linux
source env/bin/activate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&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%2Fygx5an9olex1z989w7su.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%2Fygx5an9olex1z989w7su.png" alt="Image description" width="800" height="123"&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%2Fvch4t2qkll0sgakh1ovt.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%2Fvch4t2qkll0sgakh1ovt.png" alt="Image description" width="280" height="407"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;📦Step 3: Install Django.&lt;br&gt;
Once your virtual environment is activated, the next step is to install Django — the powerful web framework that will power your project.&lt;br&gt;
Install Django using pip;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
pip install django&lt;br&gt;
&lt;code&gt;&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&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%2F1w1k3sr6f2g859u3riw1.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%2F1w1k3sr6f2g859u3riw1.png" alt="Image description" width="800" height="120"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After install it look like this;&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%2Fb2m8gatvb4dqw3adtxt0.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%2Fb2m8gatvb4dqw3adtxt0.png" alt="Image description" width="800" height="127"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;then after that run the server &lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;br&gt;
&lt;/code&gt;python manage.py runserver&lt;code&gt;&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;then it click the link and it brings success of install of django &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%2Fmfscs0lcskd3yvx95zsi.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%2Fmfscs0lcskd3yvx95zsi.png" alt="Image description" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🚀Step 4: Start a New Django Project&lt;/p&gt;

&lt;p&gt;Now create your Django project&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%2Fdck5iv3hzrhkjkzqhl1s.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%2Fdck5iv3hzrhkjkzqhl1s.png" alt="Image description" width="693" height="1068"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;use the command;&lt;/p&gt;

&lt;p&gt;`&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 &amp;lt;project_name&amp;gt;`

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;&lt;br&gt;
Your folder structure should now look like this:&lt;br&gt;
&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;my_django_project/
├── config/
│   ├── __init__.py
│   ├── asgi.py
│   ├── settings.py
│   ├── urls.py
│   └── wsgi.py
├── manage.py
└── env/

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;`&lt;/p&gt;

&lt;p&gt;Step 5: Create a Django App&lt;/p&gt;

&lt;p&gt;Installed the required django apps l used command to create the apps which they were two apps;&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%2F2fevfll1s2p89xzqq37b.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%2F2fevfll1s2p89xzqq37b.png" alt="Image description" width="800" height="62"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now your structure will look like this ;&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%2Fzznyksog49ibi61wdaci.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%2Fzznyksog49ibi61wdaci.png" alt="Image description" width="525" height="1080"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;but for the second app this how structure will look like;&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%2Fhjp1ghz3hfxcbcaaoehz.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%2Fhjp1ghz3hfxcbcaaoehz.png" alt="Image description" width="364" height="363"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🧱Step 6:Creating Models&lt;/p&gt;

&lt;p&gt;Each app will have its own views and templates. Here’s how to link them and display two templates from each.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;br&gt;
`blog/&lt;br&gt;
└── templates/&lt;br&gt;
    └── blog/&lt;br&gt;
        ├── home.html&lt;br&gt;
        └── about.html&lt;/p&gt;

&lt;p&gt;portfolio/&lt;br&gt;
└── templates/&lt;br&gt;
    └── portfolio/&lt;br&gt;
        ├── home.html&lt;br&gt;
        └── projects.html&lt;code&gt;&lt;br&gt;
&lt;/code&gt;``&lt;/p&gt;

&lt;p&gt;`&lt;code&gt;&lt;/code&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%2Fz715og8bzn9fpx6dh9pc.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%2Fz715og8bzn9fpx6dh9pc.png" alt="Image description" width="403" height="1080"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🌐Step 7: Set Up URLs&lt;/p&gt;

&lt;p&gt;In Django, URLs are how you connect your web browser to specific views in your app. Think of them as the road signs that tell Django which view to display when someone visits a certain page. &lt;br&gt;
this how it look like;&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%2Fn6ht7pf6dwnu88idiwry.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%2Fn6ht7pf6dwnu88idiwry.png" alt="Image description" width="800" height="472"&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%2Fx8k642xdbnnww0dyq94f.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%2Fx8k642xdbnnww0dyq94f.png" alt="Image description" width="800" height="466"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 8: Set Up html &lt;/p&gt;

&lt;p&gt;In Django, HTML is used to build the templates that define how your web pages look. These templates are combined with data from your views to create dynamic, interactive websites.&lt;/p&gt;

&lt;p&gt;l added them this how it look liked;&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%2Fdnpkprwfna8klaba5z45.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%2Fdnpkprwfna8klaba5z45.png" alt="Image description" width="800" height="521"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;✅ Final Result&lt;/p&gt;

&lt;p&gt;Now you can run the project and see how it look;&lt;/p&gt;

&lt;p&gt;run using;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;&lt;br&gt;
&lt;/code&gt;python manage.py runserver&lt;code&gt;&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;this how it will look like;&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%2Fzswaksw4k0xcxpu4tabu.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%2Fzswaksw4k0xcxpu4tabu.png" alt="Image description" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this guide, we walked through the full process of setting up a Django project using Visual Studio Code. Here's a quick recap of what we covered:&lt;/p&gt;

&lt;p&gt;✅ Creating a virtual environment to isolate dependencies&lt;/p&gt;

&lt;p&gt;✅ Installing Django and verifying the installation&lt;/p&gt;

&lt;p&gt;✅ Starting a new Django project and creating multiple apps&lt;/p&gt;

&lt;p&gt;✅ Setting up views, templates, and URL routing for each app&lt;/p&gt;

&lt;p&gt;✅ Understanding how HTML works within Django templates&lt;/p&gt;

&lt;p&gt;Django is incredibly powerful once you get the hang of it—and the best way to learn is by building.&lt;/p&gt;

&lt;p&gt;Got questions, stuck somewhere, or want to share what you built? Drop a comment below—I’d love to hear from you and help out!&lt;/p&gt;

&lt;p&gt;happy coding  &lt;/p&gt;

</description>
      <category>django</category>
      <category>python</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>How I Learned Git and GitHub</title>
      <dc:creator>Hannah</dc:creator>
      <pubDate>Thu, 26 Jun 2025 11:13:44 +0000</pubDate>
      <link>https://forem.com/annnab2222/how-i-learned-git-and-github-j12</link>
      <guid>https://forem.com/annnab2222/how-i-learned-git-and-github-j12</guid>
      <description>&lt;p&gt;Halloo welcome to my article day two  of git and github l will take you step-by-step of how to use git and github with your source-code editor.&lt;br&gt;
1.🚀Forking&lt;br&gt;
Repository is like cloning someone else’s project into your own GitHub account. Forking gave me the freedom to experiment with changes without affecting the original code.&lt;br&gt;
Steps:&lt;/p&gt;

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

&lt;p&gt;2.Click the “Fork” button (usually top-right).&lt;/p&gt;

&lt;p&gt;3.Choose your GitHub account as the destination.&lt;/p&gt;

&lt;p&gt;GitHub creates a copy in your account—ready to work on!&lt;br&gt;
After that, you can clone the forked repo;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`git clone https://github.com/your-username/repo-name.git
cd repo-name`

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2.🤝Collaboration&lt;br&gt;
 This a key theme in my learning. through GitHub, I realized that coding doesn’t have to be a solitary journey. I paired with peers, contributed to projects, and received feedback that shaped me into a better developer.&lt;br&gt;
Steps:&lt;/p&gt;

&lt;p&gt;1.Fork or clone a shared repository.&lt;/p&gt;

&lt;p&gt;2.Create a new branch for your feature or fix.&lt;/p&gt;

&lt;p&gt;3.Make changes and commit them.&lt;/p&gt;

&lt;p&gt;4.Push the branch and open a pull request.&lt;/p&gt;

&lt;p&gt;5.Discuss, review, and iterate on code with your team.&lt;br&gt;
 this are Common commands l used when working with others:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git checkout -b feature-branch     # Create a new branch for your work
git add .                          # Stage your changes
git commit -m "Your message"       # Save your changes
git push origin feature-branch     # Share your changes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3.🔄Pull Requests&lt;br&gt;
 This pull requests are form of access other work but I learned that a PR is just a way of proposing changes. After pushing my changes to a fork, I could create a PR to suggest them to the original repository. It became a ritual: describe what I did, request reviews.&lt;br&gt;
Steps:&lt;/p&gt;

&lt;p&gt;1.Push your branch to your fork or the main repo.&lt;/p&gt;

&lt;p&gt;2.Click “Compare &amp;amp; pull request”.&lt;/p&gt;

&lt;p&gt;3.Add a descriptive title and summary of changes.&lt;/p&gt;

&lt;p&gt;4.Assign reviewers (if needed).&lt;/p&gt;

&lt;p&gt;5.Submit the PR and respond to feedback.&lt;br&gt;
go to your repo and click Compare &amp;amp; pull request.&lt;/p&gt;

&lt;p&gt;4.⚔️Merge Conflicts&lt;br&gt;
Merge conflicts—the unwelcome guests that sneak into collaborative projects. I encountered my first merge conflict while contributing to a project under active development.&lt;br&gt;
Steps:&lt;/p&gt;

&lt;p&gt;1.Attempt to merge the conflicting branches.&lt;/p&gt;

&lt;p&gt;2.Git will highlight conflicting files.&lt;/p&gt;

&lt;p&gt;3.Open the files and look for conflict markers (&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;, =======, &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;).&lt;/p&gt;

&lt;p&gt;4.Edit the file to keep the desired changes.&lt;/p&gt;

&lt;p&gt;5.Save, add (git add), and commit the resolved version.&lt;/p&gt;

&lt;p&gt;6.Complete the merge.&lt;br&gt;
Useful commands when dealing with conflicts;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git pull origin main               # Sync your branch with main
# Resolve conflicts manually in code
git add conflicted-file.js         # Mark conflict as resolved
git commit                         # Save the merge resolution
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;5.🧐Code Review&lt;br&gt;
Through code reviews, I gained valuable insights into best practices, efficient design patterns, and bug-spotting skills. Both giving and receiving reviews helped sharpen my critical thinking. I learned to suggest improvements constructively and express gratitude for feedback I received.&lt;br&gt;
Steps:&lt;/p&gt;

&lt;p&gt;1.Review the pull request changes on GitHub.&lt;/p&gt;

&lt;p&gt;2.Add inline comments, suggestions, or questions.&lt;/p&gt;

&lt;p&gt;3.Approve or request changes.&lt;/p&gt;

&lt;p&gt;4.Repeat until the code is ready to merge.&lt;/p&gt;

&lt;p&gt;5.Merge the pull request when approved.&lt;/p&gt;

&lt;p&gt;6.🐞GitHub Issues&lt;br&gt;
GitHub Issues taught me project planning. I used them to track bugs, brainstorm features, and break down tasks. Opening a good issue involves clear descriptions, reproducible steps (if it's a bug), and appropriate tagging.&lt;br&gt;
Steps:&lt;/p&gt;

&lt;p&gt;1.Navigate to the “Issues” tab of a repository.&lt;/p&gt;

&lt;p&gt;2.Click “New Issue”.&lt;/p&gt;

&lt;p&gt;3.Add a clear title and detailed description.&lt;/p&gt;

&lt;p&gt;4.Label, assign, or link the issue if needed.&lt;/p&gt;

&lt;p&gt;5.Submit the issue and update it with progress or comments.&lt;/p&gt;

&lt;p&gt;7.💻Git Commands&lt;br&gt;
From git clone and git commit to git rebase and git stash, the command line became my daily companion. While tools like GitHub Desktop exist, mastering the terminal gave me confidence and deeper understanding. Cheat sheets helped, but consistent practice was the real game-changer.&lt;br&gt;
Steps (basic workflow):&lt;/p&gt;

&lt;p&gt;git clone  – Copy a repo.&lt;/p&gt;

&lt;p&gt;git checkout -b feature-name – Create and switch to a new branch.&lt;/p&gt;

&lt;p&gt;git add . – Stage changes.&lt;/p&gt;

&lt;p&gt;git commit -m "Describe changes" – Save changes locally.&lt;/p&gt;

&lt;p&gt;git pull origin main – Sync with the latest changes.&lt;/p&gt;

&lt;p&gt;git push origin feature-name – Push your work to GitHub.&lt;br&gt;
in command bash;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git init                           # Initialize a new Git repo
git clone repo-url                 # Copy a repo to your local machine
git status                         # Check your current changes
git add filename                   # Stage changes
git commit -m "Message"            # Save the staged changes
git push origin branch-name        # Push to GitHub
git pull origin branch-name        # Get latest updates

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;8.☁️Pushing Changes to GitHub&lt;br&gt;
Git push origin branch-name—the command I now type like muscle memory. Pushing changes is the final stage of my coding cycle. I learned to commit often, write meaningful messages, and push regularly to avoid losing work.&lt;br&gt;
Steps:&lt;/p&gt;

&lt;p&gt;1.Confirm changes are committed with git commit.&lt;/p&gt;

&lt;p&gt;2.Use git push origin  to push.&lt;/p&gt;

&lt;p&gt;3.Visit your GitHub repo to see your updates.&lt;br&gt;
the command bash&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git add .                          # Stage all changes
git commit -m "Descriptive message"
git push origin your-branch-name   # Upload to GitHub
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Learning Git and GitHub transformed my development workflow. The lessons weren’t always easy—I’ve broken things, lost commits, and puzzled over conflicts. But every bump in the road sharpened my skills.&lt;/p&gt;

&lt;p&gt;If you're just starting, take it one concept at a time. Don't fear mistakes—they're the best teachers.&lt;/p&gt;

&lt;p&gt;happy coding 😄&lt;/p&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>webdev</category>
      <category>learning</category>
    </item>
    <item>
      <title>How l started Setting Up a Python &amp; Django Dev</title>
      <dc:creator>Hannah</dc:creator>
      <pubDate>Wed, 25 Jun 2025 07:44:07 +0000</pubDate>
      <link>https://forem.com/annnab2222/how-l-started-setting-up-a-python-django-dev-7i5</link>
      <guid>https://forem.com/annnab2222/how-l-started-setting-up-a-python-django-dev-7i5</guid>
      <description>&lt;p&gt;&lt;strong&gt;Started with Python and Django&lt;/strong&gt;&lt;br&gt;
Hey there am hannah nyambura start with me on my article of django. &lt;br&gt;
 Started with Python and Django requires development from scratch which django learning back end development. This article walks you through the essential tools I installed and configured to get going on the development. The most important to ensure everything was properly installed and ready from version control tools to editors and container platforms.&lt;br&gt;
This are the Tools I Installed &lt;br&gt;
1.Git&lt;br&gt;
2.Python 3.13&lt;br&gt;
3.Vs code &lt;br&gt;
4.WSL (for Linux on Windows)&lt;br&gt;
5.Docker&lt;br&gt;
6.GitHub SSH&lt;br&gt;
I will take you step by step how to install the tool in you computer.&lt;br&gt;
1.Git&lt;br&gt;
Git helps manage project changes and is essential for collaboration.Git  tool for any developer.&lt;/p&gt;

&lt;p&gt;To install Git on Linux:&lt;br&gt;
Go to git-scm.com &lt;br&gt;
Download you version&lt;br&gt;
After that go tho git bash for windows and enters this code,&lt;/p&gt;




&lt;p&gt;&lt;code&gt;Git config __user.name&lt;br&gt;
Git config __user.email&lt;/code&gt;&lt;br&gt;
And your ready to go for git. &lt;br&gt;
2.Python 3.13&lt;br&gt;
Django runs on Python they are like brother's  so the first thing I did was install the latest stable version which was 3.13.3 it matters with our version of pc. The site is &lt;br&gt;
&lt;a href="https://www.python.org/downloads/" rel="noopener noreferrer"&gt;https://www.python.org/downloads/&lt;/a&gt; after that go to python bash check you version if correctly installed.&lt;br&gt;
3.Vs code &lt;br&gt;
Why vs.code it friendly and faster  after installed vs code added exterion of python in my vs code for faster use.&lt;br&gt;
4.WSl &lt;br&gt;
This are for linux but also windows people can use.&lt;br&gt;
How this how frist Steps:&lt;br&gt;
Open PowerShell as Admin and run&lt;br&gt;
&lt;code&gt;wsl --install&lt;/code&gt;&lt;br&gt;
Then Restart your PC&lt;br&gt;
choose your Linux to use Ubuntu &lt;br&gt;
Set up username &amp;amp; password&lt;br&gt;
5.Docker&lt;br&gt;
Docker is kali but used windows to Download docker Desktop docker.com/products/docker-desktop.&lt;br&gt;
Installed then check for the version used.&lt;br&gt;
6.GitHub SSH&lt;br&gt;
I use git and github for the key l take you through how;&lt;br&gt;
1.see if using any key in git or github by using this command &lt;br&gt;
&lt;code&gt;ls ~/.ssh&lt;/code&gt;&lt;br&gt;
If there none then &lt;br&gt;
Generate SSH Key using this command &lt;br&gt;
&lt;code&gt;ssh-keygen -t ed25519 -C "your_email@example.com&lt;/code&gt;"&lt;br&gt;
SSH agent need  start the key &lt;br&gt;
&lt;code&gt;eval "$(ssh-agent -s)" ssh-add ~/.ssh/id_ed25519&lt;/code&gt;&lt;br&gt;
Add the Key to GitHub&lt;br&gt;
&lt;code&gt;cat ~/.ssh/id_ed25519.pub&lt;/code&gt;&lt;br&gt;
Then go to github account go settings SSH and GPG keys New SSH key paste you key and save it &lt;br&gt;
Test you key &lt;br&gt;
&lt;code&gt;ssh -T git@github.com&lt;/code&gt; &lt;br&gt;
successful GitHub will greet you by your username if you followed the steps. &lt;br&gt;
This are the setup gave me everything I needed to start building and Django applications efficiently.l have also started back end also don't let this command or steps make you afraid just follow the steps are you be fine 😌&lt;br&gt;
Feel free to connect and help each other in the setup or any question.&lt;br&gt;
Happy coding 😂&lt;/p&gt;

</description>
      <category>python</category>
      <category>docker</category>
      <category>git</category>
      <category>django</category>
    </item>
  </channel>
</rss>
