<?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: obonyodorice</title>
    <description>The latest articles on Forem by obonyodorice (@obonyodorice).</description>
    <link>https://forem.com/obonyodorice</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%2F3289787%2Fd61e3088-a82f-4431-af4e-381d1e4d4ea3.png</url>
      <title>Forem: obonyodorice</title>
      <link>https://forem.com/obonyodorice</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/obonyodorice"/>
    <language>en</language>
    <item>
      <title>Building a Basic Django App: A Hands-On MVT Example with Attachee Data</title>
      <dc:creator>obonyodorice</dc:creator>
      <pubDate>Wed, 02 Jul 2025 14:31:23 +0000</pubDate>
      <link>https://forem.com/obonyodorice/building-a-basic-django-app-a-hands-on-mvt-example-with-attachee-data-4o1o</link>
      <guid>https://forem.com/obonyodorice/building-a-basic-django-app-a-hands-on-mvt-example-with-attachee-data-4o1o</guid>
      <description>&lt;p&gt;As a developer, one of the most rewarding experiences is seeing your data come to life on a web page. Recently, I set out to build a simple Django application to demonstrate the fundamental concepts of the Model-View-Template (MVT) architecture. My goal was straightforward: define a model for student attachee, populate it with some data, retrieve that data using a Django view, and then elegantly display it in an HTML table using Django's templating engine. This exercise perfectly illustrates how Django structures web applications and handles the flow of data from the database to the user's browser.&lt;/p&gt;

&lt;p&gt;Let's break down each step of the process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. The Model: Defining Our Data Structure (The 'M' in MVT)&lt;/strong&gt;&lt;br&gt;
The 'M' in MVT stands for Model. In Django, a Model is a Python class that inherits from &lt;code&gt;django.db.models.Model&lt;/code&gt;. It defines the structure of your data, essentially mapping to a table in your database. Each attribute of the Model class represents a field (a column) in that database table.&lt;/p&gt;

&lt;p&gt;For our attachés application, I needed to store information such as their name, email, phone number, the department they are attached to, and their university. Here's how I defined the &lt;code&gt;Attachee&lt;/code&gt; model in &lt;code&gt;first_app/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 Attache(models.Model):
    name = models.CharField(max_length=100)
    email = models.EmailField(unique=True) 
    phone = models.CharField(max_length=20, blank=True, null=True) 
    department = models.CharField(max_length=100)
    university = models.CharField(max_length=100)
    date_added = models.DateTimeField(auto_now_add=True)

    def __str__(self):

        return f"{self.name} from {self.university}"

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

&lt;/div&gt;



&lt;p&gt;After defining the model, I ran the standard Django commands to create the database table:&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 makemigrations
python manage.py migrate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These commands translate the Python model definition into database schema changes and apply them. Then, I accessed the Django admin (after creating a superuser) to quickly add a few sample &lt;code&gt;Attachee&lt;/code&gt; records to the database for testing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. The View: Retrieving and Preparing Data (The 'V' in MVT)&lt;/strong&gt;&lt;br&gt;
The 'V' in MVT refers to the View. In Django's context, the View is a Python function or class that receives a web request, interacts with the Model to fetch or manipulate data, and then prepares a context dictionary (data) to be passed to a template. It's the brain that orchestrates what data is needed and how it's presented.&lt;/p&gt;

&lt;p&gt;My goal was to display all attachés. So, my view needed to query the &lt;code&gt;Attachee&lt;/code&gt; model and retrieve every record.&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.shortcuts import render
from .models import Attachee

def attache_list(request):
    all_attachees = Attachee.objects.all()

    context = {
        'attachees': all_attachees,
        'page_title': 'List of All Attachees' 
    }

    return render(request, 'myapp/attache_list.html', context)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. The Template: Presenting the Data (The 'T' in MVT)&lt;/strong&gt;&lt;br&gt;
The 'T' in MVT stands for Template. This is the presentation layer, typically an HTML file with Django's powerful template language embedded within it. Its job is to display the data received from the view in a user-friendly format. I chose a simple HTML table to showcase the attaché data.&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;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;meta charset="UTF-8"&amp;gt;
    &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&amp;gt;
    &amp;lt;title&amp;gt;{{ page_title }} - Attache Management&amp;lt;/title&amp;gt;
    &amp;lt;style&amp;gt;
        body { font-family: Arial, sans-serif; margin: 20px; }
        table { width: 100%; border-collapse: collapse; margin-top: 20px; }
        th, td { border: 1px solid #ddd; padding: 8px; text-align: left; }
        th { background-color: #f2f2f2; }
        h1 { color: #333; }
        .no-data { text-align: center; color: #888; margin-top: 30px; }
    &amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;h1&amp;gt;{{ page_title }}&amp;lt;/h1&amp;gt;

    {% if attaches %} 
    &amp;lt;table&amp;gt;
        &amp;lt;thead&amp;gt;
            &amp;lt;tr&amp;gt;
                &amp;lt;th&amp;gt;Name&amp;lt;/th&amp;gt;
                &amp;lt;th&amp;gt;Email&amp;lt;/th&amp;gt;
                &amp;lt;th&amp;gt;Phone&amp;lt;/th&amp;gt;
                &amp;lt;th&amp;gt;Department&amp;lt;/th&amp;gt;
                &amp;lt;th&amp;gt;University&amp;lt;/th&amp;gt;
                &amp;lt;th&amp;gt;Date Added&amp;lt;/th&amp;gt;
            &amp;lt;/tr&amp;gt;
        &amp;lt;/thead&amp;gt;
        &amp;lt;tbody&amp;gt;
            {% for attachee in attachees %}
            &amp;lt;tr&amp;gt;
                &amp;lt;td&amp;gt;{{ attachee.name }}&amp;lt;/td&amp;gt; {# Accessing attributes of the current 'attache' object #}
                &amp;lt;td&amp;gt;{{ attachee.email }}&amp;lt;/td&amp;gt;
                &amp;lt;td&amp;gt;{{ attachee.phone|default:"N/A" }}&amp;lt;/td&amp;gt; 
                &amp;lt;td&amp;gt;{{ attachee.department }}&amp;lt;/td&amp;gt;
                &amp;lt;td&amp;gt;{{ attachee.university }}&amp;lt;/td&amp;gt;
                &amp;lt;td&amp;gt;{{ attachee.date_added|date:"F d, Y P" }}&amp;lt;/td&amp;gt; 
            &amp;lt;/tr&amp;gt;
            {% endfor %}
        &amp;lt;/tbody&amp;gt;
    &amp;lt;/table&amp;gt;
    {% else %} 
        &amp;lt;p class="no-data"&amp;gt;No attachee records found.&amp;lt;/p&amp;gt;
    {% endif %}

&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4. The URL: Mapping Requests to Views (The Router)&lt;/strong&gt;&lt;br&gt;
The URL configuration, or &lt;code&gt;URLconf&lt;/code&gt;, acts as the router for our application. It's responsible for mapping specific URL patterns to the correct view functions or classes.&lt;/p&gt;

&lt;p&gt;Since I had configured the project's main &lt;code&gt;urls.py&lt;/code&gt; to include the URLs from my myapp:&lt;/p&gt;

&lt;p&gt;Next, I defined the specific URL pattern within &lt;code&gt;first_app/urls.py&lt;/code&gt; to point to our &lt;code&gt;attachee_list&lt;/code&gt; 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 django.urls import path
from . import views 

urlpatterns = [
    path('attachee_list/', views.attachee_list, name='attachee_list'),
]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;The Final Result: Data on Display&lt;/strong&gt;&lt;br&gt;
With these pieces in place, when I navigated my browser to &lt;code&gt;http://127.0.0.1:8000/first_app/attachee_list/&lt;/code&gt; (assuming Django's development server is running), the following happened:&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;The browser sent an HTTP GET request to &lt;code&gt;/first_app/attachee/&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Django's URL dispatcher in &lt;code&gt;my_project/urls.py&lt;/code&gt; matched &lt;code&gt;first_app/attachee/&lt;/code&gt; and directed the request to &lt;code&gt;first_app.urls.&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;In &lt;code&gt;first_app/urls.py&lt;/code&gt;, the &lt;code&gt;path('attachee_list/')&lt;/code&gt; pattern matched the remaining empty string and called the &lt;code&gt;attachee_list&lt;/code&gt; view function.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;attachee_list&lt;/code&gt; view queried the database &lt;code&gt;(Attachee.objects.all())&lt;/code&gt; to fetch all attaché records.&lt;/li&gt;
&lt;li&gt;It then rendered the &lt;code&gt;first_app/attachee_list.html&lt;/code&gt; template, passing the &lt;code&gt;all_attachee&lt;/code&gt; data in the &lt;code&gt;context&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The template engine iterated over the &lt;code&gt;attachee&lt;/code&gt; data, populated the HTML table rows, and applied any specified filters.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Finally, the rendered HTML was sent back to the browser, displaying a clean, organized table of all our attachee data.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This simple example perfectly encapsulates the power and elegance of Django's MVT architecture. The clear separation of concerns—data definition in the Model, business logic and data preparation in the View, and presentation in the Template—makes the application easy to understand, maintain, and extend. It's a foundational concept that every Django developer masters, paving the way for building more complex and dynamic web applications.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Building a Multi-App Django Project: A Tech Attachee's Journey</title>
      <dc:creator>obonyodorice</dc:creator>
      <pubDate>Mon, 30 Jun 2025 15:01:32 +0000</pubDate>
      <link>https://forem.com/obonyodorice/building-a-multi-app-django-project-a-tech-attaches-journey-2mlp</link>
      <guid>https://forem.com/obonyodorice/building-a-multi-app-django-project-a-tech-attaches-journey-2mlp</guid>
      <description>&lt;p&gt;As a tech attachee, understanding modern web development frameworks is crucial. One of the most powerful and versatile is Django, a high-level Python web framework that encourages rapid development and clean, pragmatic design. My recent task was to demonstrate Django's modularity by creating a single project with two distinct applications, each serving its own unique web page. This article outlines the step-by-step process I followed to achieve this.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Vision: Modularity and Clarity
&lt;/h2&gt;

&lt;p&gt;The core idea behind this exercise was to showcase how Django projects can be broken down into smaller, manageable applications. This approach promotes reusability, simplifies maintenance, and allows different functionalities to live in their own self-contained environments. My goal was to build a &lt;code&gt;my_project&lt;/code&gt; that housed a &lt;code&gt;first_app&lt;/code&gt; and a &lt;code&gt;second_app&lt;/code&gt;, each with a dedicated browser page.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Phase 1: Setting the Foundation&lt;/strong&gt;&lt;br&gt;
The journey began with the fundamental steps of any Django project:&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Installing Django:&lt;/strong&gt; First, ensuring Django was installed in my environment was paramount. A simple &lt;code&gt;pip install django&lt;/code&gt; got the framework ready.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Project Initialization:&lt;/strong&gt;With Django installed, I created the main project directory  using &lt;code&gt;django-admin startproject my_project&lt;/code&gt;. This command laid out the essential project structure, including the core &lt;code&gt;settings.py&lt;/code&gt;and &lt;code&gt;urls.py&lt;/code&gt;files.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;my_project/
├── my_project/
│   ├── __init__.py
│   ├── asgi.py
│   ├── settings.py  
│   ├── urls.py      
│   └── wsgi.py
└── manage.py 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Navigating into the Project:&lt;/strong&gt;I then &lt;code&gt;cd my_project&lt;/code&gt; to move into the newly created project root, ready for the next steps.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Phase 2: Crafting the Applications&lt;/strong&gt;&lt;br&gt;
The next crucial step was to generate the individual applications within my main project. Django's &lt;code&gt;startapp&lt;/code&gt; command makes this straightforward:&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Creating first_app:&lt;/strong&gt; I executed &lt;code&gt;python manage.py startapp first_app&lt;/code&gt;. This command generated the basic directory structure and files for my first independent application.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Creating&lt;/strong&gt; &lt;code&gt;second_app&lt;/code&gt;**: **Following the same pattern, &lt;code&gt;python manage.py startapp second_app&lt;/code&gt; brought my second application into existence.
At this point, my project directory began to take shape, clearly showing the &lt;code&gt;core&lt;/code&gt; folder alongside the &lt;code&gt;first_app&lt;/code&gt; and &lt;code&gt;second_app&lt;/code&gt; directories, all within the main &lt;code&gt;MY_PROJECT&lt;/code&gt; root.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;my_project/
├── my_project/
│   ├── __init__.py
│   ├── asgi.py
│   ├── settings.py
│   ├── urls.py
│   └── wsgi.py
├── first_app/
│   ├── migrations/
│   ├── templates/
│   │   └── first_app/
│   │       └── index.html
│   ├── __init__.py
│   ├── admin.py
│   ├── apps.py
│   ├── models.py
│   ├── tests.py
│   ├── urls.py
│   └── views.py
├── second_app/
│   ├── migrations/
│   ├── templates/
│   │   └── second_app/
│   │       └── home.html
│   ├── __init__.py
│   ├── admin.py
│   ├── apps.py
│   ├── models.py
│   ├── tests.py
│   ├── urls.py
│   └── views.py
└── manage.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt;&lt;br&gt;
&lt;em&gt;So, while the name &lt;code&gt;my_project&lt;/code&gt; is repeated, they represent two different things: one is the top-level directory, and the other is the actual Python package that contains your project's main configuration.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;strong&gt;To avoid the repetition in the folder name, when you initially create a Django project, you can use a slightly different command:&lt;/strong&gt;&lt;/em&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 config .
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(&lt;em&gt;You can name that inner folder anything that is a valid Python package name. Common alternatives you'll see in the Django community include:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;core&lt;/code&gt;: Often used for central or core project settings and utilities.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;project&lt;/code&gt;: A straightforward name indicating it holds the project-level files.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;main&lt;/code&gt;: Another simple and descriptive option.)&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If you run this command from an empty directory, it will create the &lt;code&gt;manage.py&lt;/code&gt; and the &lt;code&gt;config&lt;/code&gt; (inner project folder) directly inside your current directory, avoiding the outer &lt;code&gt;my_project&lt;/code&gt; folder name. However, the default &lt;code&gt;django-admin startproject my_project&lt;/code&gt; is very common and usually doesn't cause issues once you understand the distinction.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Phase 3: Connecting the Pieces (Configuration)&lt;/strong&gt;&lt;br&gt;
A raw project and applications don't work together automatically. They need to be configured:&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Registering Apps in&lt;/strong&gt; &lt;code&gt;settings.py&lt;/code&gt;&lt;strong&gt;:&lt;/strong&gt; I opened &lt;code&gt;my_project/my_project/settings.py&lt;/code&gt;. Under the INSTALLED_APPS list, I added &lt;code&gt;'first_app'&lt;/code&gt; and &lt;code&gt;'second_app'&lt;/code&gt;. This tells Django to recognize and load these applications within the project. I also verified &lt;code&gt;APP_DIRS: True&lt;/code&gt; was set in the &lt;code&gt;TEMPLATES&lt;/code&gt; configuration, ensuring Django would look for &lt;code&gt;templates&lt;/code&gt; inside each app's templates folder.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&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%2F3n8z1wzl0hmvsz6sqlhm.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%2F3n8z1wzl0hmvsz6sqlhm.png" alt="Image description" width="800" height="592"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Routing URLs in Project&lt;/strong&gt; &lt;code&gt;urls.py&lt;/code&gt;&lt;strong&gt;:&lt;/strong&gt; The &lt;code&gt;my_project/my_project/urls.py&lt;/code&gt; file is the project's central traffic controller. I modified it to include the URL patterns of my new applications:
&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# my_project/core/urls.py
from django.urls import path, include

urlpatterns = [
    path('admin/', admin.site.urls),
    path('first-app/', include('first_app.urls')),
    path('second-app/', include('second_app.urls')),
]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This setup ensures that any request starting with &lt;code&gt;/first-app/&lt;/code&gt; is directed to &lt;code&gt;first_app&lt;/code&gt;'s own URL patterns, and similarly for &lt;code&gt;/second-app/&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Phase 4: Building App-Specific Pages&lt;/strong&gt;&lt;br&gt;
Each application needed its own view and template to display a unique page:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;first_app&lt;/code&gt; &lt;strong&gt;Logic and Display:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;I created &lt;strong&gt;my_project/first_app/urls.py&lt;/strong&gt; to define the specific URL for this app (e.g., &lt;code&gt;path('', views.index, name='index'))&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;In &lt;code&gt;my_project/first_app/views.py&lt;/code&gt;, I wrote a simple &lt;code&gt;index&lt;/code&gt; function that renders a template: &lt;code&gt;return render(request, 'first_app/index.html')&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Finally, I created the &lt;code&gt;index.html&lt;/code&gt;file inside &lt;code&gt;my_project/first_app/templates/first_app/&lt;/code&gt;. This HTML included a welcoming message.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&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%2Fkwypx23akisowuvaffgi.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%2Fkwypx23akisowuvaffgi.png" alt="Image description" width="800" height="430"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;second_app&lt;/code&gt; &lt;strong&gt;Logic and Display:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;I followed the same pattern, creating &lt;code&gt;my_project/second_app/urls.py&lt;/code&gt; with a &lt;code&gt;path('', views.home, name='home'&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;The my_project/second_app/views.py contained a &lt;code&gt;home&lt;/code&gt; function to render its template: &lt;code&gt;return render(request, 'second_app/home.html')&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;home.html&lt;/code&gt; file was placed in &lt;code&gt;my_project/second_app/templates/second_app/,&lt;/code&gt; similar to the first app, ensuring clear separation and containing a link back to the first app.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Phase 5: Bringing it All to Life&lt;/strong&gt;&lt;br&gt;
With all the code in place, the final steps were to get the server running:&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Database Migrations:&lt;/strong&gt; Running &lt;code&gt;python manage.py makemigrations&lt;/code&gt; and &lt;code&gt;python manage.py migrate&lt;/code&gt; ensured Django's built-in database setup was complete, even though my apps didn't use models yet.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Starting the Development Server:&lt;/strong&gt;From the &lt;code&gt;my_project&lt;/code&gt; root, &lt;code&gt;python manage.py runserver&lt;/code&gt; launched Django's development server.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  The Outcome: Two Live Applications!
&lt;/h2&gt;

&lt;p&gt;Upon navigating to &lt;code&gt;http://127.0.0.1:8000/first-app/&lt;/code&gt; and &lt;code&gt;http://127.0.0.1:8000/second-app/&lt;/code&gt; in my browser, I was greeted with two distinct web pages, each served by its respective Django application. The navigation links between them worked , confirming the successful integration of components within a single Django project.&lt;/p&gt;

&lt;p&gt;This exercise solidified my understanding of Django's project structure, URL routing(How web addresses work), view logic, and template rendering(how different parts of a website can show their own pages) – essential skills for any aspiring tech attaché. It highlighted how Django empowers developers to build scalable and organized web applications by embracing a modular design.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>My Dive into Version Control: Git &amp; GitHub for Collaborative Coding Author: Dorice</title>
      <dc:creator>obonyodorice</dc:creator>
      <pubDate>Thu, 26 Jun 2025 11:48:13 +0000</pubDate>
      <link>https://forem.com/obonyodorice/my-dive-into-version-control-git-github-for-collaborative-codingauthor-dorice-3l12</link>
      <guid>https://forem.com/obonyodorice/my-dive-into-version-control-git-github-for-collaborative-codingauthor-dorice-3l12</guid>
      <description>&lt;h1&gt;
  
  
  Unlocking Teamwork: My Journey from Code Chaos to Collaborative Confidence with Git &amp;amp; GitHub
&lt;/h1&gt;

&lt;p&gt;Hey there, future coders! Have you ever tried to save your code and ended up with file names like "my_project_final_final_really_final.py"? Or maybe you've worked on a project with a friend and accidentally messed up their work? Yeah, I've been there!&lt;/p&gt;

&lt;p&gt;Learning to manage my code was a huge step for me. That's when I found &lt;strong&gt;Git&lt;/strong&gt; and &lt;strong&gt;GitHub&lt;/strong&gt;. These tools have made my coding life so much easier, whether I'm working alone or with a team. They're like a superhero sidekick for your code!&lt;/p&gt;

&lt;p&gt;In this article, I'm going to explain exactly what I learned about Git and GitHub, and how these cool features like sharing code, fixing mistakes, and working together help me. Let's make your coding smoother!&lt;/p&gt;

&lt;h1&gt;
  
  
  Understanding the Backbone: What is Version Control?(and Why Git is So Cool)
&lt;/h1&gt;

&lt;p&gt;Think of &lt;strong&gt;Version Control&lt;/strong&gt; like a magic journal for your code. Every time you make a change, it writes it down. This means you can:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;- See all changes:&lt;/strong&gt;&lt;br&gt;
 Exactly what changed, who changed it, and when.&lt;br&gt;
&lt;strong&gt;- Go back in time:&lt;/strong&gt;&lt;br&gt;
 If you break something, you can easily go back to an older version that worked.&lt;br&gt;
&lt;strong&gt;- Work together:&lt;/strong&gt;&lt;br&gt;
Multiple people can work on the same project without messing each other up.&lt;br&gt;
Before Git, I used to just save many copies of my files, which got super confusing. Git is special because it's &lt;strong&gt;"Distributed."&lt;/strong&gt; This means everyone working on the project gets a full copy of the entire code history on their own computer. So, if the internet goes out or the main project server has a problem, I still have everything on my laptop! It's like having your own personal backup system for every change.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  GitHub: Where My Code Projects Live Online
&lt;/h1&gt;

&lt;p&gt;Git helps me track my code on my computer, but GitHub is the website where I put my code online. It's like a big online home for all my Git projects.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub is where I:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Store my projects so I can access them from any computer.&lt;/li&gt;
&lt;li&gt;Find and help with other people's open-source code (code that anyone can use and improve).&lt;/li&gt;
&lt;li&gt;Connect with other coders around the world.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&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%2F5x80t9a9vvty036m1ito.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%2F5x80t9a9vvty036m1ito.png" alt="Image description" width="800" height="671"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Cool Git &amp;amp; GitHub Tricks I Use Every Day
&lt;/h1&gt;

&lt;p&gt;Here's how I use some of the best features of Git and GitHub in my coding projects:&lt;/p&gt;

&lt;h1&gt;
  
  
  1. Forking: Making My Own Copy of a Project
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;- What I learned:&lt;/strong&gt;&lt;br&gt;
 "Forking" a project on GitHub means I make my own exact copy of it. This copy lives in my own GitHub account and is completely separate from the original.&lt;br&gt;
&lt;strong&gt;- How I use it:&lt;/strong&gt;&lt;br&gt;
 If I see a cool project online that I want to try improving, or if I want to contribute to someone else's code without touching their main work, I fork it. This gives me a safe space to play around and make my own changes.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/Dorice/your-forked-project.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  2. Teamwork: Coding Together Without Chaos
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;- What I learned:&lt;/strong&gt;&lt;br&gt;
 Git and GitHub make it super easy for many people to work on the same code at the same time without causing problems. They keep track of who changed what and help bring all the different changes together.&lt;br&gt;
&lt;strong&gt;- How I use it:&lt;/strong&gt;&lt;br&gt;
 In a team, everyone works on their own separate "branches" (like separate roads leading to the same destination). Git keeps track of everyone's changes, and GitHub helps us combine them smoothly. It's much better than accidentally overwriting someone else's work!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  3. Pull Requests (PRs): "Hey, Check Out My Work!"
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;- What I learned:&lt;/strong&gt;&lt;br&gt;
 A "Pull Request" is basically me telling the main project owner, "Hey, I've made some changes, and I think they're good! Can you please 'pull' them into the main project?"&lt;br&gt;
&lt;strong&gt;- How I use it:&lt;/strong&gt;&lt;br&gt;
After I finish making my changes on my local computer and send them to my GitHub copy, I go to GitHub and create a Pull Request. This isn't just a message! It's a place where:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I describe what I changed and why.&lt;/li&gt;
&lt;li&gt;I ask others to look at my code (this is called "code review").&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;After you've saved your changes locally and sent them to GitHub:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git push origin my-new-feature
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Then, go to GitHub to create the Pull Request!&lt;/em&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  4. Code Review: Getting Helpful Advice
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;- What I learned:&lt;/strong&gt;&lt;br&gt;
"Code review" is when other smart people look at my code in a Pull Request. They check it for mistakes, suggest better ways to do things, and make sure it fits the project's style.&lt;br&gt;
&lt;strong&gt;- How I use it:&lt;/strong&gt;&lt;br&gt;
This part is awesome for learning! Before my code officially becomes part of the main project, my teammates give me feedback. They might:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ask me to explain parts of my code.&lt;/li&gt;
&lt;li&gt;Suggest a simpler way to write something.&lt;/li&gt;
&lt;li&gt;Even spot tiny errors I missed. This helps me write much better code!&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  5. Merge Conflicts: When Two Changes Collide (and How I Fix Them)
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;- What I learned:&lt;/strong&gt;&lt;br&gt;
 A "merge conflict" happens when two different people change the exact same lines in the same file at the same time. Git gets confused because it doesn't know which change to keep.&lt;br&gt;
&lt;strong&gt;- How I handle them:&lt;/strong&gt;&lt;br&gt;
 When I run into a merge conflict (and trust me, it happens to everyone!), Git will show me which files have problems. I open these files in my code editor (VS Code has built-in tools that really help here!). The editor shows me clearly where the different changes are. I then decide which changes to keep, or I combine them myself. After I fix it, I tell Git I'm done: git add the file, and then git commit the fix. It's a common problem, but easy to learn how to solve!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  6. GitHub Issues: My To-Do List &amp;amp; Bug Tracker
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;- What I learned:&lt;/strong&gt;&lt;br&gt;
 "GitHub Issues" are like digital sticky notes or a to-do list for your project. They're great for keeping track of tasks, bugs, or new ideas.&lt;br&gt;
&lt;strong&gt;- How I use them:&lt;/strong&gt;&lt;br&gt;
 For every project, I use Issues to:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Report bugs:&lt;/strong&gt;Explain any problems I find.&lt;br&gt;
&lt;strong&gt;Suggest features:&lt;/strong&gt; Write down ideas for new things the        project could do.&lt;br&gt;
&lt;strong&gt;Assign tasks:&lt;/strong&gt; Give tasks to myself or other team members.&lt;br&gt;
&lt;strong&gt;Keep organized:&lt;/strong&gt; Use labels (like bug, new feature, urgent) to sort them.&lt;br&gt;
&lt;strong&gt;Track progress:&lt;/strong&gt; I can link my Pull Requests to an Issue, so when my code is added, the Issue automatically closes, showing that task is done!&lt;/p&gt;
&lt;/blockquote&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%2Fuj5i4ho7hplgze4vpdkv.webp" 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%2Fuj5i4ho7hplgze4vpdkv.webp" alt="Image description" width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  7. Basic Git Commands: My Everyday Tools
&lt;/h1&gt;

&lt;p&gt;These are the simple commands I type into my terminal almost every day:&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;git clone [website-address]&lt;/code&gt;: This downloads a copy of a project from GitHub to my computer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;git status&lt;/code&gt;: Shows me what changes I've made on my computer, what's ready to be saved, and what's new.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;git add [file-name]&lt;/code&gt; or &lt;code&gt;git add .&lt;/code&gt;: This prepares my changes (a specific file or all changes) to be saved.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;git commit -m "A short message about my changes"&lt;/code&gt;: This saves the prepared changes to my project's history on my computer. I always write a clear message so I remember what I did!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;git branch [new-branch-name]&lt;/code&gt;: Makes a new separate line of work for me.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;git checkout [branch-name]&lt;/code&gt;: Switches me to a different line of work.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;git pull origin [branch-name]&lt;/code&gt;: Gets the latest changes from the online project (GitHub) and brings them to my computer. Important: I always do this before starting new work!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;git push origin [branch-name]&lt;/code&gt;: This sends my saved changes from my computer up to the online project (GitHub).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  8. Pushing Changes to GitHub: Sending My Work Online
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;- What I learned&lt;/strong&gt;&lt;br&gt;
: The &lt;code&gt;git push&lt;/code&gt; command is how I send all the changes I've saved on my computer up to my project on GitHub.&lt;br&gt;
&lt;strong&gt;- How I use it:&lt;/strong&gt;&lt;br&gt;
 Once I'm happy with my changes (after adding and committing them), I type &lt;code&gt;git push origin my-feature-branch&lt;/code&gt; to upload them. This makes my work visible to my team and also acts as a safe backup online.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git push origin my-new-feature-branch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Wrapping Up: Your Path to Super Coding!
&lt;/h1&gt;

&lt;p&gt;Learning Git and GitHub might seem like a lot at first, but trust me, it's totally worth it! It's given me a clean, safe, and super easy way to manage my coding projects and work with others. From making sure my code is always backed up to easily sharing new features and fixing bugs, these tools are now a must-have for me.&lt;/p&gt;

&lt;p&gt;Don't be scared of things like merge conflicts – they're just little puzzles you'll learn to solve!&lt;/p&gt;

&lt;p&gt;If you want to practice, the &lt;a href="https://dev.tourl"&gt;GitHub Skills&lt;/a&gt; website is an amazing place to start. They have fun, hands-on lessons that will help you learn by doing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Go out there, build awesome stuff, and code with confidence! Happy coding!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>versioncontrol</category>
      <category>coding</category>
    </item>
    <item>
      <title>My Journey to a Seamless Python Dev Environment (and How You Can Too!) Author:"DevDorice"</title>
      <dc:creator>obonyodorice</dc:creator>
      <pubDate>Tue, 24 Jun 2025 20:37:12 +0000</pubDate>
      <link>https://forem.com/obonyodorice/kickstart-your-python-dev-workflow-git-docker-wsl-github-ssh-1ed1</link>
      <guid>https://forem.com/obonyodorice/kickstart-your-python-dev-workflow-git-docker-wsl-github-ssh-1ed1</guid>
      <description>

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;Hey everyone! I recently went through the process of setting up my Python development environment, and honestly, it can feel a bit overwhelming with all the tools out there. But I've found a flow that really works for me, integrating Git, Docker, WSL (since I'm on Windows), and a super-smooth SSH connection to GitHub. I want to share exactly how I did it, step-by-step, so you can set up your own efficient workspace too!.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prerequisites&lt;/strong&gt;&lt;br&gt;
Before we dive in, here's what you'll need:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;-&lt;u&gt; A Computer:&lt;/u&gt;&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Running Windows 10 or higher (for WSL instructions) or a macOS/Linux distribution&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;-&lt;u&gt; An Internet Connection:&lt;/u&gt;&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;To download the necessary software.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;-&lt;u&gt; Basic Computer Skills:&lt;/u&gt;&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Familiarity with navigating your operating system and using a terminal or command prompt.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;-&lt;u&gt; A GitHub Account (Optional but Recommended):&lt;/u&gt;&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you plan to host your code on GitHub. You can sign up for free at &lt;a href="https://github.com/join" rel="noopener noreferrer"&gt;https://github.com/join&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let's dive into how I got everything configured.&lt;br&gt;
&lt;strong&gt;1. Picking My Tools: Editor, Python, &amp;amp; Git&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Code Editor&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Choose one and install it.&lt;/p&gt;

&lt;p&gt;PyCharm Community Edition(Recommended for Python):&lt;br&gt;
Download from:&lt;br&gt;
&lt;/p&gt;


&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://www.jetbrains.com/pycharm/download/,
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;VS Code (Versatile):&lt;br&gt;
Download from:&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://code.visualstudio.com/download.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;I chose VS Code and Downloaded. Sometimes I need something lighter or for other languages, and that's where VS Code shines. It's incredibly versatile and customizable.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Install Git for version control.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;I Downloaded Git:&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://git-scm.com/downloads
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Follow the installer instructions.&lt;br&gt;
Verify Installation: Open the terminal and run:&lt;br&gt;
&lt;code&gt;git --version&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Installing Python 3.10+: My Language of Choice&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Download Python: I downloaded the latest Python from&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://www.python.org/downloads/ 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;During installation, I ensure I check the "Add Python to PATH" option.&lt;/p&gt;
&lt;/blockquote&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%2Fvnspsvhu36vt4sbvt0od.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%2Fvnspsvhu36vt4sbvt0od.png" alt="Image description" width="672" height="417"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Verify Installation in the terminal with &lt;code&gt;python --version&lt;/code&gt; and &lt;code&gt;git --version&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;4. Setting Up WSL: My Linux Playground on Windows&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;How I installed it:&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;I opened PowerShell as Administrator.&lt;br&gt;
Execute the installation command: &lt;code&gt;wsl --install&lt;/code&gt;&lt;br&gt;
My computer needed a restart after that, so I let it do its thing.&lt;br&gt;
After restart, I follow the prompts to set up the Linux username and password.&lt;br&gt;
I then set up the Linux environment.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;5.Installing Docker Desktop:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;How I installed it:&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;I downloaded Docker Desktop from&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

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

&lt;/div&gt;



&lt;p&gt;It uses WSL2 for great performance.&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%2Fm167mrz0786ptgsbj9lw.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%2Fm167mrz0786ptgsbj9lw.png" alt="Image description" width="800" height="473"&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;After installation, I opened my terminal (or my WSL terminal) and ran: &lt;code&gt;docker --version&lt;/code&gt; to check it was ready.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;6. Configuring Git with GitHub SSH:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Checking for existing keys:&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;I first checked if I already had SSH keys lying around. I ran:&lt;br&gt;
&lt;code&gt;ls -al ~/.ssh&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If I saw files like &lt;em&gt;id_ed25519.pub&lt;/em&gt; or &lt;em&gt;id_rsa.pub&lt;/em&gt;, I would have skipped to next step. But, I generated a new one for a fresh setup.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Generating a new SSH key (if I didn't have one):&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;This command creates a new, strong SSH key. I made sure to replace &lt;em&gt;"&lt;a href="mailto:your_email@example.com"&gt;your_email@example.com&lt;/a&gt;"&lt;/em&gt; with the email linked to my GitHub account.&lt;br&gt;
ie... &lt;em&gt;ssh-keygen -t ed25519 -C "&lt;a href="mailto:your_email@example.com"&gt;your_email@example.com&lt;/a&gt;"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;When it asked for a file location, I just pressed Enter to accept the default (&lt;em&gt;~/.ssh/id_ed25519)&lt;/em&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Copying my public SSH key:&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;I needed to get my public key so I could paste it into GitHub. I displayed it with:&lt;br&gt;
&lt;code&gt;cat ~/.ssh/id_ed25519.pub&lt;/code&gt; &lt;/p&gt;

&lt;p&gt;Then, I carefully copied the entire output &lt;strong&gt;(starting from ssh-ed25519 or ssh-rsa all the way to my email address&lt;/strong&gt;)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Adding the SSH key to my GitHub account:&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;I went to [&lt;a href="https://github.com/settings/keys" rel="noopener noreferrer"&gt;https://github.com/settings/keys&lt;/a&gt;] and logged into my GitHub account.&lt;/p&gt;

&lt;p&gt;I clicked on the "New SSH key" (or "Add SSH key") button.&lt;br&gt;
I gave it a meaningful Title.&lt;br&gt;
Then, I pasted my copied public key into the "Key" field.&lt;/p&gt;

&lt;p&gt;Finally, I clicked "Add SSH key". GitHub might ask for password one last time to confirm.&lt;/p&gt;
&lt;/blockquote&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%2Fchzg6yr9hh3jo0a6e28m.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%2Fchzg6yr9hh3jo0a6e28m.png" alt="Image description" width="800" height="589"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;That's the rundown of how I set up my Python development environment! It might seem like a few steps, but each one contributes to a smoother and more efficient coding experience. With your chosen editor, Python ready to go, Git for version control, WSL and Docker for consistent environments, and secure SSH access to GitHub, you're well-equipped to tackle any Python project. ~~Happy ~~coding!&lt;/p&gt;

</description>
      <category>devsetup</category>
      <category>github</category>
      <category>docker</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
