<?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: @rinnah</title>
    <description>The latest articles on DEV Community by @rinnah (@rinnahoyugi).</description>
    <link>https://dev.to/rinnahoyugi</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%2F3291791%2F7b054b5e-2a1b-4f68-9d4c-2f2f768d2d55.png</url>
      <title>DEV Community: @rinnah</title>
      <link>https://dev.to/rinnahoyugi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rinnahoyugi"/>
    <language>en</language>
    <item>
      <title>🚀 I Built a Django User Management System in One Day</title>
      <dc:creator>@rinnah</dc:creator>
      <pubDate>Mon, 07 Jul 2025 16:13:07 +0000</pubDate>
      <link>https://dev.to/rinnahoyugi/i-built-a-django-user-management-system-in-one-day-30nk</link>
      <guid>https://dev.to/rinnahoyugi/i-built-a-django-user-management-system-in-one-day-30nk</guid>
      <description>&lt;h1&gt;
  
  
  🚀 I Built a Django User Management System in One Day (And Here's What I Learned)
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;From zero to fully functional — registration, login, profile, verification, and even testing — all before 6PM!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Hi Devs!&lt;br&gt;
I recently had to build a &lt;strong&gt;User Management System&lt;/strong&gt; using Django — with a tight deadline. The task? Build a complete project with &lt;strong&gt;registration&lt;/strong&gt;, &lt;strong&gt;login&lt;/strong&gt;, &lt;strong&gt;mock verification&lt;/strong&gt;, &lt;strong&gt;profile management&lt;/strong&gt;, an &lt;strong&gt;admin panel&lt;/strong&gt;, and even write &lt;strong&gt;unit tests&lt;/strong&gt; — all in a single day. 😅&lt;/p&gt;

&lt;p&gt;So I brewed some strong tea ☕, opened Pycharm, and dove in.&lt;/p&gt;

&lt;p&gt;Here's how it went down (and what you can learn from it too).&lt;/p&gt;


&lt;h2&gt;
  
  
  🛠️ The Tech Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Python 3.11+&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Django 5.x&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SQLite&lt;/strong&gt; (default for development)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;HTML + Bootstrap via Django Crispy Forms&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Git + GitHub&lt;/strong&gt; (with a 10-commit rule!)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Console email backend&lt;/strong&gt; for mocking verification&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  📌 Features I Implemented
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;✅ User Registration&lt;/li&gt;
&lt;li&gt;✅ Login / Logout&lt;/li&gt;
&lt;li&gt;✅ Email Verification (mocked in console)&lt;/li&gt;
&lt;li&gt;✅ Profile View / Edit&lt;/li&gt;
&lt;li&gt;✅ Change Password&lt;/li&gt;
&lt;li&gt;✅ Admin Panel for managing users&lt;/li&gt;
&lt;li&gt;✅ Tests for models and views&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And yes — everything works 🥳&lt;/p&gt;


&lt;h2&gt;
  
  
  📁 Project Structure
&lt;/h2&gt;

&lt;p&gt;My Django project followed 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;user_mgt/
├── accounts/           # Custom user app
│   ├── models.py       # Extended User if needed
│   ├── views.py        # Auth + profile views
│   ├── forms.py        # Crispy-powered forms
│   └── tests.py        # Unit tests
├── user_mgt/
│   └── settings.py     # Configured apps, email, templates
├── templates/
│   └── registration/   # login.html, register.html, etc.
├── static/             # CSS, images, etc.
├── manage.py
└── README.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I didn’t use any fancy custom user model yet, but made the app scalable to add it later.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧱 Step-by-Step Breakdown
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Project Setup 🧰
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;django-admin startproject user_mgt
&lt;span class="nb"&gt;cd &lt;/span&gt;user_mgt
python manage.py startapp accounts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I added &lt;code&gt;accounts&lt;/code&gt;, &lt;code&gt;crispy_forms&lt;/code&gt;, and set up templates and static directories in &lt;code&gt;settings.py&lt;/code&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  2. User Registration 🔐
&lt;/h3&gt;

&lt;p&gt;I created a &lt;code&gt;RegisterForm&lt;/code&gt; that extended &lt;code&gt;UserCreationForm&lt;/code&gt;, then used a class-based view to render it. Thanks to crispy-forms, it looked great with minimal CSS.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;RegisterView&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;View&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;form&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;RegisterForm&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;registration/register.html&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;form&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;form&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;RegisterForm&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;POST&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;is_valid&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
            &lt;span class="n"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;save&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
            &lt;span class="c1"&gt;# send email here (mocked)
&lt;/span&gt;            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;redirect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;login&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;registration/register.html&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;form&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  3. Email Verification (Mocked) 📬
&lt;/h3&gt;

&lt;p&gt;I used Django's built-in console backend:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;EMAIL_BACKEND&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;django.core.mail.backends.console.EmailBackend&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So when a user signs up, it "sends" a verification link in the console — simple, elegant, and demo-ready.&lt;/p&gt;




&lt;h3&gt;
  
  
  4. Profile Management 👤
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Profile View&lt;/strong&gt;: Display user details&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Profile Edit&lt;/strong&gt;: Allow users to update name, email, etc.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Password Change&lt;/strong&gt;: Using Django’s built-in views&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each normal user could only view and edit &lt;em&gt;their&lt;/em&gt; profile — nothing more. Security first. 🔐&lt;/p&gt;




&lt;h3&gt;
  
  
  5. Admin Panel 🛠️
&lt;/h3&gt;

&lt;p&gt;Django’s admin is magic 🪄. I just registered my &lt;code&gt;User&lt;/code&gt; model, customized the display, and boom — I could view and edit all users easily.&lt;/p&gt;




&lt;h3&gt;
  
  
  6. Unit Testing 🧪
&lt;/h3&gt;

&lt;p&gt;I wrote simple tests for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ Model creation&lt;/li&gt;
&lt;li&gt;✅ View rendering for login and registration
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;UserTestCase&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;TestCase&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;test_user_creation&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;User&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;objects&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create_user&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;dee&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;password&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;123asd45&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;assertEqual&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;username&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;dee&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Small but mighty!&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%2Fvd7a2osy0hxo4mh0i8i7.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%2Fvd7a2osy0hxo4mh0i8i7.png" alt=" " width="800" height="423"&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%2Fgud17mw2tg8fxvu89qxh.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%2Fgud17mw2tg8fxvu89qxh.png" alt=" " width="800" height="833"&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%2Fr9qekqj5a0uder7w21qf.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%2Fr9qekqj5a0uder7w21qf.png" alt=" " width="800" height="790"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🤯 Lessons Learned
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Django does a LOT for you.&lt;/strong&gt; From auth to admin to email, it's a full-stack powerhouse.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Crispy Forms = 🔥&lt;/strong&gt; Makes your forms look instantly professional.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;You don't need to reinvent everything&lt;/strong&gt; — use built-in tools first, then customize.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Console email is your friend&lt;/strong&gt; during development.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Writing tests early&lt;/strong&gt; makes you more confident — even if they're simple.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  ✅ Final Deliverables
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;✔️ GitHub repo with &amp;lt;10 commits&lt;/li&gt;
&lt;li&gt;✔️ README with setup + screenshots&lt;/li&gt;
&lt;li&gt;✔️ Working registration, login, profile, and admin&lt;/li&gt;
&lt;li&gt;✔️ Tests added&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  📦 What’s Next?
&lt;/h2&gt;

&lt;p&gt;I’m planning to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Deploy this on &lt;strong&gt;Render&lt;/strong&gt; or &lt;strong&gt;Railway&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Add a &lt;strong&gt;Docker setup&lt;/strong&gt; for easier deployment&lt;/li&gt;
&lt;li&gt;Maybe write a &lt;strong&gt;Part 2&lt;/strong&gt;: Advanced User Roles + Permissions!&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🔗 Check Out the Code
&lt;/h2&gt;

&lt;p&gt;👉 &lt;a href="https://github.com/rinnah-oyugi/User-mgt" rel="noopener noreferrer"&gt;GitHub Repository&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 Final Words
&lt;/h2&gt;

&lt;p&gt;This project pushed me to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Think fast 🧠&lt;/li&gt;
&lt;li&gt;Code clean 🧹&lt;/li&gt;
&lt;li&gt;Write meaningful commits 📝&lt;/li&gt;
&lt;li&gt;And learn a LOT about Django authentication in just one day&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I hope this walkthrough helps you if you're learning Django, or rushing to finish your own project like I was 😅.&lt;/p&gt;




&lt;h3&gt;
  
  
  💬 Questions? Suggestions?
&lt;/h3&gt;

&lt;p&gt;Drop them below or ping me on GitHub — happy to connect and grow together as devs! 🙌&lt;/p&gt;




</description>
    </item>
    <item>
      <title>Day 5: Understanding Django’s MVT vs MVC – Models, Views, Templates &amp; URLs Demystified!</title>
      <dc:creator>@rinnah</dc:creator>
      <pubDate>Tue, 01 Jul 2025 18:10:31 +0000</pubDate>
      <link>https://dev.to/rinnahoyugi/day-5-understanding-djangos-mvt-vs-mvc-models-views-templates-urls-demystified-2gol</link>
      <guid>https://dev.to/rinnahoyugi/day-5-understanding-djangos-mvt-vs-mvc-models-views-templates-urls-demystified-2gol</guid>
      <description>&lt;h2&gt;
  
  
  🎉 Welcome to Day 5 of Django Journey!
&lt;/h2&gt;

&lt;p&gt;Today, we break down the architecture that powers Django apps — the &lt;strong&gt;MVT&lt;/strong&gt; pattern — and compare it to the classic &lt;strong&gt;MVC&lt;/strong&gt;. If you've heard about &lt;strong&gt;Models&lt;/strong&gt;, &lt;strong&gt;Views&lt;/strong&gt;, &lt;strong&gt;Templates&lt;/strong&gt;, and got confused, you're not alone! Let’s untangle that web. 🕸️&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 MVC vs MVT — What’s the Difference?
&lt;/h2&gt;

&lt;p&gt;Before diving into Django specifics, let’s explore what these patterns mean.&lt;/p&gt;

&lt;h3&gt;
  
  
  🧩 MVC (Model-View-Controller)
&lt;/h3&gt;

&lt;p&gt;This pattern separates your application into:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Model&lt;/strong&gt; – The data and database layer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;View&lt;/strong&gt; – The UI or frontend display.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Controller&lt;/strong&gt; – The logic that controls data flow between the Model and View.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Used in frameworks like Laravel, Ruby on Rails, and ASP.NET.&lt;/p&gt;




&lt;h3&gt;
  
  
  🧩 MVT (Model-View-Template) in Django
&lt;/h3&gt;

&lt;p&gt;Django follows MVT, which looks very similar:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Model&lt;/strong&gt; – Represents data (just like MVC).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;View&lt;/strong&gt; – Handles logic and pulls data from the model.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Template&lt;/strong&gt; – The HTML interface shown to users.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But here's the twist:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;In Django, &lt;strong&gt;the View is like the Controller&lt;/strong&gt; in MVC, and &lt;strong&gt;the Template acts as the View&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;📘 Learn more: &lt;a href="https://realpython.com/get-started-with-django-1/#understanding-the-mtv-pattern" rel="noopener noreferrer"&gt;Django vs MVC on Real Python&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🏗️ Let’s Understand Each MVT Component
&lt;/h2&gt;




&lt;h3&gt;
  
  
  🔹 1. Model – Your Data's Structure
&lt;/h3&gt;

&lt;p&gt;The Model defines how data is stored in the database using Django’s ORM (Object Relational Mapping). It avoids writing raw SQL.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;BlogPost&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;models&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Model&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;models&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;CharField&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;max_length&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;content&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;models&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;TextField&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

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

&lt;ul&gt;
&lt;li&gt;Models map directly to database tables.&lt;/li&gt;
&lt;li&gt;Each class = 1 table, each field = 1 column.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;📘 &lt;a href="https://docs.djangoproject.com/en/stable/topics/db/models/" rel="noopener noreferrer"&gt;Django Models Guide&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  🔹 2. View – The Brain 🧠
&lt;/h3&gt;

&lt;p&gt;The View is the middleman. It receives user requests, talks to the model, then selects the template to display.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;python&lt;br&gt;
def home(request):&lt;br&gt;
    posts = BlogPost.objects.all()&lt;br&gt;
    return render(request, 'home.html', {'posts': posts})&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Think of Views as your app’s &lt;strong&gt;logic and decision maker&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;It returns a response, usually HTML.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;📘 &lt;a href="https://docs.djangoproject.com/en/stable/topics/http/views/" rel="noopener noreferrer"&gt;Django Views Explained&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  🔹 3. Template – The Frontend
&lt;/h3&gt;

&lt;p&gt;Templates are what users see — HTML files with dynamic placeholders.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;html&lt;br&gt;
{% for post in posts %}&lt;br&gt;
  &amp;lt;h2&amp;gt;{{ post.title }}&amp;lt;/h2&amp;gt;&lt;br&gt;
  &amp;lt;p&amp;gt;{{ post.content|truncatewords:20 }}&amp;lt;/p&amp;gt;&lt;br&gt;
{% endfor %}&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Templates use Django Template Language (DTL).&lt;/li&gt;
&lt;li&gt;They display data passed by the view.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;📘 &lt;a href="https://docs.djangoproject.com/en/stable/topics/templates/" rel="noopener noreferrer"&gt;Django Templates&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🔹 Bonus: URL Routing
&lt;/h2&gt;

&lt;p&gt;Django uses a URL dispatcher to connect browser paths to views.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;python&lt;br&gt;
path('', views.home, name='home')&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;📘 &lt;a href="https://docs.djangoproject.com/en/stable/topics/http/urls/" rel="noopener noreferrer"&gt;Django URL Patterns&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🧭 The Flow of Data (Visual Recap)
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;plaintext&lt;br&gt;
Browser Request&lt;br&gt;
     ↓&lt;br&gt;
  URLConf (urls.py)&lt;br&gt;
     ↓&lt;br&gt;
     View (views.py)&lt;br&gt;
     ↓&lt;br&gt;
   Model (if needed)&lt;br&gt;
     ↓&lt;br&gt;
  Template (HTML page)&lt;br&gt;
     ↓&lt;br&gt;
Browser Response&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🔐 Admin Panel – MVT in Action
&lt;/h2&gt;

&lt;p&gt;Register a model and get a full-featured admin UI to create, read, update, and delete records!&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;python&lt;br&gt;
admin.site.register(BlogPost)&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Then visit &lt;code&gt;127.0.0.1:8000/admin&lt;/code&gt; after running:&lt;/p&gt;

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

&lt;p&gt;📘 &lt;a href="https://docs.djangoproject.com/en/stable/ref/contrib/admin/" rel="noopener noreferrer"&gt;Django Admin Docs&lt;/a&gt;&lt;/p&gt;




</description>
      <category>django</category>
      <category>python</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Day Four of My Django Bootcamp: Crafting the Structure of My Django Project</title>
      <dc:creator>@rinnah</dc:creator>
      <pubDate>Mon, 30 Jun 2025 18:28:29 +0000</pubDate>
      <link>https://dev.to/rinnahoyugi/day-four-of-my-django-bootcamp-crafting-the-structure-of-my-django-project-2f0k</link>
      <guid>https://dev.to/rinnahoyugi/day-four-of-my-django-bootcamp-crafting-the-structure-of-my-django-project-2f0k</guid>
      <description>&lt;h3&gt;
  
  
  Day Four of My Django Bootcamp: Crafting the Structure of My Django Project
&lt;/h3&gt;

&lt;p&gt;Today is the fourth day of my Django bootcamp, and it has been an exciting journey so far! I focused on creating and structuring my Django project while learning a lot about apps, templates, and URL configurations. Here’s a friendly walkthrough of how I accomplished it using Git Bash as my terminal.&lt;/p&gt;




&lt;h4&gt;
  
  
  &lt;strong&gt;1. Starting the Django Project&lt;/strong&gt; 🚀
&lt;/h4&gt;

&lt;p&gt;The first step was to create a new Django project named &lt;code&gt;dijango&lt;/code&gt;. This project would serve as the foundation for everything else. Using Git Bash, I navigated to my desired directory and set up a virtual environment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir &lt;/span&gt;dijango
&lt;span class="nb"&gt;cd &lt;/span&gt;dijango
python &lt;span class="nt"&gt;-m&lt;/span&gt; venv venv
&lt;span class="nb"&gt;source &lt;/span&gt;venv/bin/activate  &lt;span class="c"&gt;# For Linux/macOS&lt;/span&gt;
venv&lt;span class="se"&gt;\S&lt;/span&gt;cripts&lt;span class="se"&gt;\a&lt;/span&gt;ctivate   &lt;span class="c"&gt;# For Windows&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, I installed Django and created the project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;django
django-admin startproject dijango &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here’s what the structure looked like at this point:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;manage.py&lt;/strong&gt;: The project’s control center.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;dijango/&lt;/strong&gt;: A directory containing core files like &lt;code&gt;settings.py&lt;/code&gt;, &lt;code&gt;urls.py&lt;/code&gt;, and others.&lt;/li&gt;
&lt;/ul&gt;




&lt;h4&gt;
  
  
  &lt;strong&gt;2. Creating Applications&lt;/strong&gt; 🛠️
&lt;/h4&gt;

&lt;p&gt;Django encourages splitting functionality into smaller units called apps. I created two apps, &lt;code&gt;REE1&lt;/code&gt; and &lt;code&gt;REE2&lt;/code&gt;, to separate different functionalities:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python manage.py startapp REE1
python manage.py startapp REE2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each app came with its own files, like &lt;code&gt;views.py&lt;/code&gt; and &lt;code&gt;models.py&lt;/code&gt;. To make Django recognize these apps, I added them to the &lt;code&gt;INSTALLED_APPS&lt;/code&gt; section in &lt;code&gt;settings.py&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;INSTALLED_APPS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;django.contrib.admin&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;django.contrib.auth&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;django.contrib.contenttypes&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;django.contrib.sessions&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;django.contrib.messages&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;django.contrib.staticfiles&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;REE1&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;REE2&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h4&gt;
  
  
  &lt;strong&gt;3. Setting Up Templates&lt;/strong&gt; 🎨
&lt;/h4&gt;

&lt;p&gt;Templates define how the front-end of the app looks. Using Git Bash, I created a &lt;code&gt;templates&lt;/code&gt; directory in the root folder and added subfolders for each app:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir &lt;/span&gt;templates
&lt;span class="nb"&gt;mkdir &lt;/span&gt;templates/REE1
&lt;span class="nb"&gt;mkdir &lt;/span&gt;templates/REE2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In &lt;code&gt;settings.py&lt;/code&gt;, I updated the &lt;code&gt;TEMPLATES&lt;/code&gt; configuration to include the new directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;TEMPLATES&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;BACKEND&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;django.template.backends.django.DjangoTemplates&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;DIRS&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;BASE_DIR&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;templates&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;APP_DIRS&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;OPTIONS&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;context_processors&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
                &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;django.template.context_processors.debug&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;django.template.context_processors.request&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;django.contrib.auth.context_processors.auth&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;django.contrib.messages.context_processors.messages&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="p"&gt;],&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h4&gt;
  
  
  &lt;strong&gt;4. Configuring URLs&lt;/strong&gt; 🌐
&lt;/h4&gt;

&lt;p&gt;URL configurations connect specific views to URLs. Since Django doesn’t create &lt;code&gt;urls.py&lt;/code&gt; files for apps by default, I manually added them for &lt;code&gt;REE1&lt;/code&gt; and &lt;code&gt;REE2&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;For &lt;code&gt;REE1/urls.py&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;django.urls&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;.&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;views&lt;/span&gt;

&lt;span class="n"&gt;urlpatterns&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="nf"&gt;path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;views&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;ree1_index&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For &lt;code&gt;REE2/urls.py&lt;/code&gt;:&lt;br&gt;
jy&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;django.urls&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;.&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;views&lt;/span&gt;

&lt;span class="n"&gt;urlpatterns&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="nf"&gt;path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;''&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;views&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;home&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;ree2_home&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I then updated the main project’s &lt;code&gt;urls.py&lt;/code&gt; to include these app-specific routes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;django.contrib&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;admin&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;django.urls&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;include&lt;/span&gt;

&lt;span class="n"&gt;urlpatterns&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="nf"&gt;path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;admin/&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;admin&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;site&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;urls&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="nf"&gt;path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;ree1/&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;include&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;REE1.urls&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)),&lt;/span&gt;
    &lt;span class="nf"&gt;path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;ree2/&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;include&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;REE2.urls&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)),&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h4&gt;
  
  
  &lt;strong&gt;5. Adding Views and Templates&lt;/strong&gt; 🖼️
&lt;/h4&gt;

&lt;p&gt;In Django, views determine what gets displayed for each URL. I created simple views for both apps:&lt;/p&gt;

&lt;p&gt;For &lt;code&gt;REE1/views.py&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;django.shortcuts&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;render&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;index&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;REE1/index.html&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For &lt;code&gt;REE2/views.py&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;django.shortcuts&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;render&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;home&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;REE2/home.html&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, I added basic HTML templates:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;templates/REE1/index.html&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;REE1 Index&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Hello I am Rinnah. Welcome to REE1 app index page.&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;templates/REE2/home.html&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;REE2 Home&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Welcome to REE2!&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  This is the outcome of after testing
&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%2Fcbpl33wb29yxq0nudoep.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%2Fcbpl33wb29yxq0nudoep.png" alt="Image description" width="800" height="430"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Using Git Bash throughout this process made it easy to execute commands and navigate between directories. As I continue exploring Django, I look forward to building more complex projects and honing my skills. If you’re on a similar journey, let’s connect and share our progress!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>python</category>
      <category>learning</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>Beginning My Django Journey: A Dive into Version Control and Collaboration</title>
      <dc:creator>@rinnah</dc:creator>
      <pubDate>Thu, 26 Jun 2025 11:58:15 +0000</pubDate>
      <link>https://dev.to/rinnahoyugi/beginning-my-django-journey-a-dive-into-version-control-and-collaboration-4jn7</link>
      <guid>https://dev.to/rinnahoyugi/beginning-my-django-journey-a-dive-into-version-control-and-collaboration-4jn7</guid>
      <description>&lt;p&gt;Starting my journey into Django development has been both exciting and challenging. One of the key lessons I’ve learned early on is the importance of version control and collaboration tools like Git and GitHub. These tools have become indispensable in helping me understand how to manage code effectively and work with others in a structured way. 🚀&lt;/p&gt;

&lt;h2&gt;
  
  
  🍴 Forking
&lt;/h2&gt;

&lt;p&gt;What is forking?&lt;br&gt;
Forking is like creating your own sandbox to play in! 🎮 It lets me copy someone else’s repository and experiment without worrying about breaking the original. The Atlassian Git Tutorials gave me a great head start on understanding this process.&lt;/p&gt;

&lt;h2&gt;
  
  
  🤝 Collaboration
&lt;/h2&gt;

&lt;p&gt;Collaboration is the secret sauce of successful development! 🥗 Platforms like GitHub and GitLab make it easy to work with teammates. By creating branches, I’m learning how to independently develop features while staying aligned with the main project. Tools like pull requests and code reviews ensure smooth integration—a lifesaver when working in groups. 🎉&lt;/p&gt;

&lt;h2&gt;
  
  
  📩 Pull Requests
&lt;/h2&gt;

&lt;p&gt;Pull requests (PRs) are a fantastic way to propose changes. 📝 They let me request feedback and make improvements before merging updates. GitHub Learning Lab has amazing tutorials on mastering PRs.&lt;/p&gt;

&lt;h2&gt;
  
  
  ⚔️ Merge Conflicts
&lt;/h2&gt;

&lt;p&gt;Oh, merge conflicts—the friendly sparring partner of coding. 😅 They happen when two people make changes to the same part of a file. Learning how to resolve these gracefully with guidance from GitHub Docs has been invaluable. It’s a skill that’s now second nature! 🛠️&lt;/p&gt;

&lt;h2&gt;
  
  
  🕵️‍♂️ Code Review
&lt;/h2&gt;

&lt;p&gt;Code reviews are like having a personal mentor for every pull request. 👨‍💻👩‍💻 They ensure the code meets project standards and is bug-free. This practice also fosters collaboration and helps beginners like me grow. Check out GitHub’s best practices for code reviews to see why they’re so impactful.&lt;/p&gt;

&lt;h2&gt;
  
  
  🐛 GitHub Issues
&lt;/h2&gt;

&lt;p&gt;GitHub Issues are a project’s to-do list! ✅ They help track bugs, plan features, and manage tasks efficiently. They’re a must-have tool for staying organized and productive. Learn more about managing Issues from GitHub’s resources.&lt;/p&gt;

&lt;h2&gt;
  
  
  🔧 Git Commands
&lt;/h2&gt;

&lt;p&gt;Learning Git commands has been a game-changer for me. 🎮 Here are the ones I use most:&lt;br&gt;
• git clone: Copy a repository to my local machine.&lt;br&gt;
• git add: Stage changes for a commit.&lt;br&gt;
• git commit: Save changes to my local repository.&lt;br&gt;
• git push: Upload commits to a remote repository.&lt;br&gt;
• git pull: Fetch and merge updates from a remote repository.&lt;br&gt;
• git status: Check the state of my repository.&lt;br&gt;
• git branch: Manage branches.&lt;br&gt;
These commands are the bread and butter of version control. 🍞 For anyone just starting, Atlassian’s Git tutorials are super helpful.&lt;/p&gt;

&lt;h2&gt;
  
  
  🚀 Pushing Changes to GitHub
&lt;/h2&gt;

&lt;p&gt;The process of pushing changes is straightforward and satisfying. 😊 After staging and committing with git add and git commit, I use git push to upload my work to GitHub. This ensures my updates are safe and accessible to collaborators. GitHub’s resources made this process a breeze to learn.&lt;/p&gt;

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

&lt;p&gt;Diving into Django has been an incredible learning experience, and mastering version control has made it even more rewarding. Tools like Git and GitHub not only streamline workflows but also open doors to meaningful collaborations. 🌍&lt;br&gt;
If you’re on a similar path, I recommend exploring resources like GitHub Docs, Atlassian Git Tutorials, and GitLab’s guides.&lt;br&gt;
Here’s to more learning and building with Django—happy coding! 🧑‍💻👩‍💻&lt;/p&gt;

</description>
    </item>
    <item>
      <title>My First Dev.to Article</title>
      <dc:creator>@rinnah</dc:creator>
      <pubDate>Tue, 24 Jun 2025 20:16:23 +0000</pubDate>
      <link>https://dev.to/rinnahoyugi/my-first-devto-article-53fl</link>
      <guid>https://dev.to/rinnahoyugi/my-first-devto-article-53fl</guid>
      <description>&lt;p&gt;👋 Hello Dev.to community!&lt;/p&gt;

&lt;p&gt;This is my very first article on Dev.to! I’m excited to start writing and sharing what I learn on my web development journey.&lt;/p&gt;

&lt;p&gt;So far, here’s what I’ve done:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;✅ Installed Git and created a GitHub account &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Went to &lt;a href="https://git-scm.com/" rel="noopener noreferrer"&gt;git-scm.com&lt;/a&gt; and downloaded Git for Windows.
&lt;/li&gt;
&lt;li&gt;Followed the installation prompts.
&lt;/li&gt;
&lt;li&gt;Signed up at &lt;a href="https://github.com/" rel="noopener noreferrer"&gt;github.com&lt;/a&gt; and created an account.
&lt;/li&gt;
&lt;li&gt;Configured Git with:
&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; git config &lt;span class="nt"&gt;--global&lt;/span&gt; user.name &lt;span class="s2"&gt;"rinnah-oyugi"&lt;/span&gt;
 git config &lt;span class="nt"&gt;--global&lt;/span&gt; user.email &lt;span class="s2"&gt;"reeoyugi@gmail.com"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;✅Installed Python&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Downloaded Python from &lt;a href="https://www.python.org/downloads/" rel="noopener noreferrer"&gt;python.org&lt;/a&gt;.
&lt;/li&gt;
&lt;li&gt;Made sure to check the box "Add Python to PATH" during installation.
&lt;/li&gt;
&lt;li&gt;Verified installation by running:
&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; python &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;✅Using PyCharm as my code editor&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Downloaded PyCharm Community Edition from &lt;a href="https://www.jetbrains.com/pycharm/download/" rel="noopener noreferrer"&gt;jetbrains.com&lt;/a&gt;.
&lt;/li&gt;
&lt;li&gt;Installed and set up a basic Python project.
&lt;/li&gt;
&lt;li&gt;Linked it with Git for version control.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;✅Running Ubuntu on Windows through WSL (Windows Subsystem for Linux) &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Enabled WSL by running this in PowerShell (Admin):
&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;wsl&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;--install&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Installed Ubuntu from the Microsoft Store.
&lt;/li&gt;
&lt;li&gt;Set up username and password.
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Updated Ubuntu with:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;apt update &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;apt upgrade
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;✅ Configured Git with GitHub using SSH &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Generated SSH key with:
&lt;/li&gt;
&lt;/ol&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; ssh-keygen &lt;span class="nt"&gt;-t&lt;/span&gt; ed25519 &lt;span class="nt"&gt;-C&lt;/span&gt; &lt;span class="s2"&gt;"reeoyugi@gmail.com"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Added SSH key to the ssh-agent.
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Copied the public key using:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; &lt;span class="nb"&gt;cat&lt;/span&gt; ~/.ssh/id_ed25519.pub
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Pasted it into GitHub → Settings → SSH and GPG keys.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Tested connection:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; ssh &lt;span class="nt"&gt;-T&lt;/span&gt; git@github.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Setting up of Docker &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Installed Docker Desktop from &lt;a href="https://www.docker.com/products/docker-desktop/" rel="noopener noreferrer"&gt;docker.com&lt;/a&gt;.
&lt;/li&gt;
&lt;li&gt;Enabled WSL 2 integration for Ubuntu in Docker settings.
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Verified installation with:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; docker &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Ran my first container using:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; docker run hello-world
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Successfully tested Docker with simple linux containers and docker-compose!&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;🎉 It’s been a great learning experience so far. I’m looking forward to learning even more and sharing my progress with you all.&lt;/p&gt;

&lt;p&gt;Thanks for reading!&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
