<?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: Douglas Cueva</title>
    <description>The latest articles on Forem by Douglas Cueva (@itisdouglas).</description>
    <link>https://forem.com/itisdouglas</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%2F344888%2F58db1f90-0c27-4c27-a9c4-fb097472f68a.jpg</url>
      <title>Forem: Douglas Cueva</title>
      <link>https://forem.com/itisdouglas</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/itisdouglas"/>
    <language>en</language>
    <item>
      <title>From QA to Full-Stack: Building a Decoupled Django/React App for the AroAce Community</title>
      <dc:creator>Douglas Cueva</dc:creator>
      <pubDate>Wed, 03 Dec 2025 05:29:48 +0000</pubDate>
      <link>https://forem.com/itisdouglas/from-qa-to-full-stack-building-a-decoupled-djangoreact-app-for-the-aroace-community-4oec</link>
      <guid>https://forem.com/itisdouglas/from-qa-to-full-stack-building-a-decoupled-djangoreact-app-for-the-aroace-community-4oec</guid>
      <description>&lt;p&gt;Today is December 2nd, 2025.&lt;/p&gt;

&lt;p&gt;I'm embarking on a personal journey of self-discovery. &lt;strong&gt;Project Purple&lt;/strong&gt; is an effort to create a nice social forum that hearkens back to websites like Xanga, LiveJournal, and Myspace, for the asexual and aromantic community.&lt;/p&gt;

&lt;p&gt;This project will require a lot of the skills I've developed over the past few years as a &lt;strong&gt;Software QA Engineer&lt;/strong&gt;, along with the technical knowledge I have on Software Develop. It will also challenge me to create a front-end application using a modern library like &lt;strong&gt;React&lt;/strong&gt;, instead of just templates.&lt;/p&gt;

&lt;p&gt;I began the Purple Project by outlining what I want the website to process from a data perspective. I've established that, for now, I'd like to get the basics worked out before growing with additional features. I created three models:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Profile&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Post&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Comment&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These models contain the basic information I'd like to elaborate on as I create the site.&lt;/p&gt;

&lt;p&gt;One of the things that I've had to learn is how &lt;strong&gt;Django Rest Framework&lt;/strong&gt; works. I quickly learned that there's a difference between how regular Django and the DRF work. I find the &lt;strong&gt;DRF&lt;/strong&gt; to be slightly quicker because you can make all your models under the &lt;strong&gt;api&lt;/strong&gt; folder, instead of having to create a new project/app with Django.&lt;/p&gt;

&lt;p&gt;It's been great revisiting Django after all these years. Their documentation remains undefeated.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.djangoproject.com/en/5.2/ref/models/fields/#django.db.models.DateTimeField" rel="noopener noreferrer"&gt;I found their documentation on the fields for their models very helpful&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;While I've spent a lot of time creating automation libraries using languages like Java, and reviewing code for things like Spring and Spring-Boot, there's something very primal about Django. I've always loved the &lt;strong&gt;batteries included&lt;/strong&gt; philosophy behind it.&lt;/p&gt;

&lt;p&gt;Below is an example of the different fields I've established for the Profile model to have. I've included things like &lt;code&gt;background_color&lt;/code&gt; because the plan is to allow users to have some form of customization to their website, like Myspace or Xanga back in the day.&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;Profile&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;user&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;OneToOneField&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;settings&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;AUTH_USER_MODEL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                                 &lt;span class="n"&gt;on_delete&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="n"&gt;CASCADE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;sexual_orientation&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;50&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;blank&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;null&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;aro_spec_identity&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;50&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;blank&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;null&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;ace_spec_identity&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;50&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;blank&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;null&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;pronouns&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;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;blank&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;null&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;relationship_style&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;50&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;blank&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;null&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;background_color&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;7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;default&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;#FFFFFF&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;accent_color&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;7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;default&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;#000000&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;identity_block_text&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;span class="n"&gt;blank&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;bio&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;span class="n"&gt;birthdate&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;DateField&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;null&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;blank&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;I'm proud of my progress so far. I feel like I've done a lot today, but as the days go on, I'm sure my progress will be slower due to the amount of other areas of DRF I'll have to spend to pouring over in their documentation. &lt;/p&gt;

&lt;p&gt;I plan to spend a lot of time in the backend, and even more time in the frontend. I have little to know experience with React, but have had a rotation of Youtube videos playing in the background. I understand why it's such an appealing library.&lt;/p&gt;

&lt;p&gt;I'll keep updating these logs every time with progress, problems, and frustrations, until this project sees a beta release in about 6 months time. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/itisDouglas/project-purple/tree/main" rel="noopener noreferrer"&gt;Here's the Github for the project&lt;/a&gt;&lt;/p&gt;

</description>
      <category>django</category>
      <category>drf</category>
      <category>socialmedia</category>
      <category>devlog</category>
    </item>
    <item>
      <title>Continuing with Django 4.0</title>
      <dc:creator>Douglas Cueva</dc:creator>
      <pubDate>Thu, 26 May 2022 15:03:01 +0000</pubDate>
      <link>https://forem.com/itisdouglas/continuing-with-django-40-4dbb</link>
      <guid>https://forem.com/itisdouglas/continuing-with-django-40-4dbb</guid>
      <description>&lt;p&gt;If you've &lt;a href="https://dev.to/itisdouglas/starting-with-django-40-158a"&gt;completed the first part of this tutorial series&lt;/a&gt; you'll have learned how to get a Django project up and running.&lt;/p&gt;

&lt;p&gt;In this next part, I'll be showing you how to wire up a Django app so you can produce the words "Hello, World!" on your web browser. In that journey, you'll get to see a little bit of Django's ecosystem.&lt;/p&gt;

&lt;p&gt;I can't stress this enough, Django takes some time to get used to, but it's worth it. Much of its architecture is built to facilitate rapid deployment of a web application. &lt;/p&gt;

&lt;h2&gt;
  
  
  Projects versus Apps
&lt;/h2&gt;

&lt;p&gt;In the previous tutorial, Django created a project for you called "hello_world". If you navigate into this folder, you will see many Python files that are used to configure different aspects of a project.&lt;/p&gt;

&lt;p&gt;A note about Projects and Apps in the Django ecosystem.&lt;/p&gt;

&lt;p&gt;Apps are components that can use the configuration of a Project.&lt;/p&gt;

&lt;p&gt;Apps are separate from Projects, but the former refers to the latter when needed.&lt;/p&gt;

&lt;p&gt;A Django app, for example, could have the functionality of a blog, forum, or wiki, while the project handles the way it is served up via a URL.&lt;/p&gt;

&lt;p&gt;Django really embraces the design philosophy of separation of concerns.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating an app
&lt;/h2&gt;

&lt;p&gt;Before creating an app, make sure that your virtual environment is activated by running the following command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;pipenv shell&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You will know it's activated if the name of the directory, &lt;em&gt;hello-world-project&lt;/em&gt;, appears in parenthesis in your terminal.&lt;/p&gt;

&lt;p&gt;Make sure you're in the directory where you can see the &lt;em&gt;manage.py&lt;/em&gt; file.&lt;/p&gt;

&lt;p&gt;Once there, run the following command to create a Django app:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;python3 manage.py startapp greet&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The terminal will take a couple seconds before it returns control to you, but once done, if you type in the command &lt;code&gt;ls&lt;/code&gt; to list the directories, there should be a new folder called &lt;em&gt;greet&lt;/em&gt;. This is your Django app. &lt;/p&gt;

&lt;h2&gt;
  
  
  Configuring an app
&lt;/h2&gt;

&lt;p&gt;If you haven't done so already, &lt;code&gt;cd&lt;/code&gt; into the greet directory. There should be a list of various Python files. This should look similar if you took a peak into the hello_world project folder.&lt;/p&gt;

&lt;p&gt;Below is a rundown about what each file does.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;File&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;apps.py&lt;/td&gt;
&lt;td&gt;conrols settings specific to the app&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;models.py&lt;/td&gt;
&lt;td&gt;database functionality&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;admin.py&lt;/td&gt;
&lt;td&gt;defines an admin interface related to the app&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;urls.py&lt;/td&gt;
&lt;td&gt;provides url routing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;views.py&lt;/td&gt;
&lt;td&gt;logic and control flow for handling requests&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;test.py&lt;/td&gt;
&lt;td&gt;used for writing unit tests&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;migrations folder&lt;/td&gt;
&lt;td&gt;Django uses this for database migrations&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;As you can see, Django is perfect for implementing websites that make use of the MVC architecture (Model View Controller). &lt;/p&gt;

&lt;p&gt;To configure the greet app, you'll begin by defining the View for the project.&lt;/p&gt;

&lt;h3&gt;
  
  
  Views
&lt;/h3&gt;

&lt;p&gt;What's a View? Well, it basically handles HTTP requests and responses. &lt;/p&gt;

&lt;p&gt;In Django this functionality is left to the &lt;em&gt;views.py&lt;/em&gt; file. Open that file with your favorite text editor (I use Vim because it makes me feel like a ninja), and type the following:&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 django.views.generic import TemplateView

# Create your views here.

class HomePageView(TemplateView):

   template_name = "home.html"


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

&lt;/div&gt;



&lt;p&gt;Here's a quick summary of what you've written.&lt;/p&gt;

&lt;p&gt;The first import, &lt;em&gt;render&lt;/em&gt;, is something that Django provides for you. The next import is the TemplateView class, which is needed to render a template from the templates directory that you will make in the next few steps.&lt;/p&gt;

&lt;p&gt;Next, you instantiated the TemplateView class, as a HomePageView class, and provided the template name "home.html".&lt;/p&gt;

&lt;p&gt;The home.html still hasn't been created yet.&lt;/p&gt;

&lt;h3&gt;
  
  
  Urls
&lt;/h3&gt;

&lt;p&gt;The next step to properly configure your greet app is to create the url pattern that the hello_world project will need to use the &lt;em&gt;home.html&lt;/em&gt; file you'll create in the next few steps.&lt;/p&gt;

&lt;p&gt;To do so, you'll have to manually create the urls.py file. To do this, you can run the following command on your terminal:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;touch urls.py&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This should create an empty Python file called urls.py. Now, open that file and type the following:&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 .views import HomePageView



urlpatterns = [

    path('', HomePageView.as_view(), name="home"),

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

&lt;/div&gt;



&lt;p&gt;A few things to note here&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  the first argument is a regex pattern to be used that will link to this page&lt;/li&gt;
&lt;li&gt;  the second argument is our class based view created in the &lt;a href="http://views.py" rel="noopener noreferrer"&gt;views.py&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  the third argument is optional and we're giving it the shortcut name &lt;em&gt;home&lt;/em&gt; so we can easily refer to it when using Django templates&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Alright, you've made it this far. It's time to move onto the hello_world project, where you'll be connecting the configurations you've made to the greet app.&lt;/p&gt;

&lt;h2&gt;
  
  
  Configuring a project
&lt;/h2&gt;

&lt;p&gt;Configuring a Django project can be confusing. Things change. I remember a few years ago when you had to use the Python &lt;code&gt;os&lt;/code&gt; module in Django to find the templates directory. &lt;/p&gt;

&lt;p&gt;In Django 4.X that isn't necessary and that's primarily why I created this tutorial series: to have a reference, out in the wild, on how to configure a templates folder.&lt;/p&gt;

&lt;h3&gt;
  
  
  Project urls.py
&lt;/h3&gt;

&lt;p&gt;To begin configuring the hello_world project, create a gateway to your recently created urls.py file in you greet app. &lt;/p&gt;

&lt;p&gt;Navigate to your hello_world project folder and open the &lt;em&gt;urls.py&lt;/em&gt; file in your favorite text editor (again, I use Vim because it makes me feel great).&lt;/p&gt;

&lt;p&gt;There's a lot going on in this file. You can spend time reading up on it later. For now, type the following into the file.&lt;br&gt;
&lt;/p&gt;

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

from django.urls import path, include



urlpatterns = [

    path('admin/', admin.site.urls),

    path('', include('greet.urls'))

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

&lt;/div&gt;



&lt;p&gt;A few things to take note here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  first argument uses regex (regular expressions) to find the URL&lt;/li&gt;
&lt;li&gt;  include method allows for your &lt;a href="http://urls.py" rel="noopener noreferrer"&gt;urls.py&lt;/a&gt; within your story app to be wired up and used.&lt;/li&gt;
&lt;li&gt; &lt;em&gt;greet.urls&lt;/em&gt; is basically this: greet (folder) -&amp;gt; urls.py (file)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Understanding how the project links to your app is important. If you need to go back, do so; you'll have less migraines later.&lt;/p&gt;

&lt;h3&gt;
  
  
  Settings.py
&lt;/h3&gt;

&lt;p&gt;This is the nucleus of your Django project. Everything needs to be declared here. &lt;/p&gt;

&lt;p&gt;When you open this file for the first time, you will be overwhelmed with the amount of configuration that can be done. Again, you can read up on what can be done here at the Django Project's website.&lt;/p&gt;

&lt;p&gt;What are you going to be doing here?&lt;/p&gt;

&lt;p&gt;First, you're going to add the greet app to the list of applications Django uses.&lt;/p&gt;

&lt;p&gt;Last, you'll be configuring the path for the templates folder that you will create later.&lt;/p&gt;

&lt;p&gt;Begin by adding the following line, &lt;code&gt;greet.apps.GreetConfig&lt;/code&gt; under &lt;code&gt;INSTALLED_APPS&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;INSTALLED_APPS = [

    'django.contrib.admin',

    'django.contrib.auth',

    'django.contrib.contenttypes',

    'django.contrib.sessions',

    'django.contrib.messages',

    'django.contrib.staticfiles',



    'greet.apps.GreetConfig',

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

&lt;/div&gt;



&lt;p&gt;What is this? This is a call to a file in your &lt;em&gt;greet&lt;/em&gt; app folder called &lt;em&gt;apps.py&lt;/em&gt;. In that file you'll see there's a class called GreetConfig, that's instantiating AppConfig from django.apps.&lt;/p&gt;

&lt;p&gt;Next, under &lt;code&gt;TEMPLATES&lt;/code&gt;, establish the path the templates directory under &lt;code&gt;'DIRS'&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;TEMPLATES = [

    {   

        'BACKEND': 'django.template.backends.django.DjangoTemplates',

        'DIRS': [BASE_DIR / 'templates'],

        'APP_DIRS': True,

        'OPTIONS': {

            'context_processors': [

                'django.template.context_processors.debug',

                'django.template.context_processors.request',               

                'django.contrib.auth.context_processors.auth',              

                'django.contrib.messages.context_processors.messages',  

            ],

        },

    },

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

&lt;/div&gt;



&lt;p&gt;You're almost done!&lt;/p&gt;

&lt;p&gt;What did you just write? &lt;code&gt;BASE_DIR / 'templates'&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This is telling Django to look for a folder called templates in the area where your manage.py file is. There is much debate on where to create your templates folder, but I've gone with the &lt;em&gt;single-project level&lt;/em&gt; approach to make things easy.&lt;/p&gt;

&lt;h3&gt;
  
  
  Templates
&lt;/h3&gt;

&lt;p&gt;The templates folder will hold your HTML files.&lt;/p&gt;

&lt;p&gt;To properly create this folder, make sure you're at the directory level where you can see the &lt;em&gt;manage.py&lt;/em&gt; file. Then, type the following into your terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mkdir templates 
touch templates/home.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, navigate into the templates folder, and open the home.html file in your favorite text editor (I use Vim because it makes me feel productive).&lt;/p&gt;

&lt;p&gt;Type the following into the home.html file.&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;p&amp;gt;Hello, world!&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Save your changes and head back to the directory level where the manage.py file is.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hello, world!
&lt;/h2&gt;

&lt;p&gt;You've made it this far. Give yourself a pat on the back.&lt;/p&gt;

&lt;p&gt;Before producing the words "Hello, world!" on your browser, there's something that needs to be done first.&lt;/p&gt;

&lt;p&gt;Remember the 18 migrations that needed to be done when you first created this app? Well, you're going to run a migration to eliminate that warning from appearing.&lt;/p&gt;

&lt;p&gt;Make sure you're in the directory level where the manage.py file is and run the following in your terminal.&lt;/p&gt;

&lt;p&gt;`python3 manage.py migrate&lt;/p&gt;

&lt;p&gt;Next, type the following:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;python3 manage.py makemigrations&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Your terminal should say that there are no changes detected.&lt;/p&gt;

&lt;p&gt;And finally, type this into your terminal:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;python3 manage.py runserver&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Navigate to your local server at &lt;a href="http://127.0.0.1:8000" rel="noopener noreferrer"&gt;http://127.0.0.1:8000&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Felicitaciones! Congrats!&lt;/p&gt;

&lt;p&gt;Your browser should say "Hello, world!"&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;You've gone through the various steps of configuring a Django app and a Django project. You also made a templates folder, and an html file, to produce the words "Hello, world!" on your local server.&lt;/p&gt;

&lt;p&gt;What's next? &lt;/p&gt;

&lt;p&gt;There's much this tutorial didn't cover, like models. There's also much to write about how to use templates.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.djangoproject.com" rel="noopener noreferrer"&gt;You can also read more about Django on their website&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://wsvincent.com" rel="noopener noreferrer"&gt;Why not give William Vincent's blog a read&lt;/a&gt;? He goes more in depth with Django, and is an authoritative voice in the community.&lt;/p&gt;

&lt;p&gt;One of my favorite things to do is &lt;a href="https://github.com/wsvincent/awesome-django" rel="noopener noreferrer"&gt;to check out the latest Awesome Django projects&lt;/a&gt;&lt;/p&gt;

</description>
      <category>django</category>
      <category>python</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Starting with Django 4.0</title>
      <dc:creator>Douglas Cueva</dc:creator>
      <pubDate>Mon, 23 May 2022 17:38:38 +0000</pubDate>
      <link>https://forem.com/itisdouglas/starting-with-django-40-158a</link>
      <guid>https://forem.com/itisdouglas/starting-with-django-40-158a</guid>
      <description>&lt;h2&gt;
  
  
  Starting with Django 4.0
&lt;/h2&gt;

&lt;p&gt;Django can be intimidating for first timers. Trust me, I know this because I've spent a lot of time trying to learn it as best as I can by reading books. Thankfully, I know enough to help you get started.&lt;/p&gt;

&lt;p&gt;This first tutorial will deal with getting Django set up, along with a virtual environment. Part two this tutorial series will configure Django to create a "Hello, world!" message.&lt;/p&gt;

&lt;p&gt;Django is available for most systems, but this tutorial was written on a Mac. Regardless of this, the initial steps to get started with Django are the same:&lt;/p&gt;

&lt;p&gt;1) Set up a virtual environment (this tutorial uses pipenv)&lt;br&gt;
2) Activate the virtual environment&lt;br&gt;
3) Install Django&lt;br&gt;
4) Run Django for the first time&lt;/p&gt;

&lt;p&gt;This tutorial is made for beginners. Anybody with intermediate experience with Django will find this boring.&lt;/p&gt;

&lt;h2&gt;
  
  
  Virtual Environment
&lt;/h2&gt;

&lt;p&gt;Always use a virtual environment like pipenv whenever you're beginning a Django project. This helps isolating an environment in case you have a specific version of Django (or other Python module) you want to use.&lt;/p&gt;

&lt;p&gt;Establish a folder for this tutorial. I've called mine &lt;em&gt;hello-world-project&lt;/em&gt;. Navigate to that folder and run the following in your command line:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;pip install --user pipenv&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This will install pipenv if you don't have it.&lt;/p&gt;

&lt;p&gt;After your terminal shows you the installation is done run the following command in order to activate the shell.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;pipenv shell&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Your terminal should display the name of the directory you're in within parenthesis. This means that you've successfully activated the virtual environment. &lt;/p&gt;

&lt;p&gt;To exit at any moment, type the word &lt;em&gt;exit&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Next, install Django using pipenv.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;pipenv install django&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Once the terminal's indicated that you've successfully installed Django!&lt;/p&gt;

&lt;h2&gt;
  
  
  Django Runserver
&lt;/h2&gt;

&lt;p&gt;The next step in this process is to create a Django project called &lt;em&gt;hello-world&lt;/em&gt; and then run it on the local server. &lt;/p&gt;

&lt;p&gt;Back in the terminal, type the following:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;django-admin startproject hello_world .&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Notice the period after "hello_world". It's important to include this.&lt;/p&gt;

&lt;p&gt;The terminal should quickly go back to your control. Type in the shell command &lt;code&gt;ls&lt;/code&gt; and there should be a &lt;em&gt;hello_world&lt;/em&gt; directory containing your recently created Django project, a file called &lt;em&gt;manage.py&lt;/em&gt;, and then the Pipfiles that contain the information on your virtual environment.&lt;/p&gt;

&lt;p&gt;This tutorial won't go in depth about what this just yet. If you're curious about what all this is the Django Foundation goes into this in depth. In later tutorials I will provide summaries of how Django project is structured but for now just follow along.&lt;/p&gt;

&lt;p&gt;Alright, I'm a big believer in small victories to reinforce learning, and luckily, Django provides just that. Run the following command in your terminal:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;python3 manage.py runserver&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Ignore the 18 migrations message for the moment. Those will be dealt with in the second tutorial.&lt;/p&gt;

&lt;p&gt;You should see a prompt that says that there's a development server at: &lt;a href="http://127.0.0.1:8000" rel="noopener noreferrer"&gt;http://127.0.0.1:8000&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Navigate to that and Django's greeting page should appear for you.&lt;/p&gt;

&lt;p&gt;Success! If you've made it this far then you can rest assured that Django works properly.&lt;/p&gt;

&lt;p&gt;Part two of this tutorial will expand on this foundation and create a basic "Hello, world!" html page to appear.&lt;/p&gt;

</description>
      <category>django</category>
      <category>beginners</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Starting out with Vim</title>
      <dc:creator>Douglas Cueva</dc:creator>
      <pubDate>Tue, 01 Jun 2021 02:49:04 +0000</pubDate>
      <link>https://forem.com/itisdouglas/starting-out-with-vim-9ip</link>
      <guid>https://forem.com/itisdouglas/starting-out-with-vim-9ip</guid>
      <description>&lt;h1&gt;
  
  
  Vim
&lt;/h1&gt;

&lt;p&gt;Probably one of the most notorious text editors is &lt;a href="https://www.vim.org" rel="noopener noreferrer"&gt;Vim&lt;/a&gt;. As someone that's used to text editors like VS Code, Vim presents the opportunity to feel like a ninja when editing code. &lt;/p&gt;

&lt;p&gt;If you're not familiar with Vim, the text editor, but have heard about it, then this is the post for you. &lt;/p&gt;

&lt;p&gt;Over the past week, I've taken a LinkedIn course about Vim and have begun using it in my projects and have found it to be enjoyable, so, I'd like to share what I've learned.&lt;/p&gt;

&lt;p&gt;This tutorial will get you started slowly, so as not to scare you away from this text editor. &lt;/p&gt;

&lt;p&gt;There is a lot to learn, and a lot of Vim is memorizing commands so you can do what you want, but I believe that easing into things and finding a real-world use to apply what you've learned is most helpful.&lt;/p&gt;

&lt;p&gt;So, by the end of this post you will have:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Edited and saved a text file using Vim.&lt;/li&gt;
&lt;li&gt;Quit Vim&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Vim's Philosophy
&lt;/h3&gt;

&lt;p&gt;I would sum up Vim's philosophy like this: the text editor at your fingertips.&lt;/p&gt;

&lt;h3&gt;
  
  
  Assumptions
&lt;/h3&gt;

&lt;p&gt;This tutorial assumes you have some proficiency with the command line, shell, or terminal.&lt;/p&gt;

&lt;p&gt;I also assume you've downloaded and installed Vim. &lt;a href="https://www.vim.org/download.php" rel="noopener noreferrer"&gt;Check out Vim's website for how to install it on your operating system.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For this tutorial, I'm using the &lt;a href="https://fishshell.com" rel="noopener noreferrer"&gt;Fish shell command line&lt;/a&gt;, but this should work with zsh, bash.&lt;/p&gt;

&lt;p&gt;My computer is running macOS Big Sur 11.4&lt;/p&gt;

&lt;h1&gt;
  
  
  Normal Mode and Insert Mode
&lt;/h1&gt;

&lt;p&gt;Since Vim is an editor that opens up within your bash terminal, you might be wondering how viewing a file versus editing one work. Well, Vim has various modes that let you switch between viewing a file and editing one.&lt;/p&gt;

&lt;p&gt;To demonstrate, create a file in an empty folder (that way it's easy to locate in your terminal), called &lt;em&gt;text.txt&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;You can create this file the old fashion way, if you'd like, by right-clicking and select "New File", or using the touch command on your terminal. There is a way to create any file and automatically open it with Vim from the command line, but I will go over that in another tutorial.&lt;/p&gt;

&lt;p&gt;Now, you'll want to open up your command line, or terminal, and change into this folder you created. I've named mine Vim, and it's on my desktop. &lt;/p&gt;

&lt;p&gt;Within the Vim directory you'll see the newly created &lt;em&gt;text.txt&lt;/em&gt; file, which is an empty text file.&lt;/p&gt;

&lt;p&gt;Alright, we're going to open this text file using Vim. To do so, type the following command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;
vim text.txt

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

&lt;/div&gt;



&lt;p&gt;You'll be dropped into the Vim text editor within seconds.&lt;/p&gt;

&lt;p&gt;You've done it. You've begun using Vim! &lt;/p&gt;

&lt;p&gt;Since this file is empty, you won't see anything, but most of the time you'll be working with files that have content. We'll be adding our content here, but only do so much as to get you comfortable with using Vim.&lt;/p&gt;

&lt;p&gt;Now, when Vim opens up a file, it opens it in View mode. In View mode, you can navigate a file, use regex to find certain words, and many other things.&lt;/p&gt;

&lt;p&gt;Since we don't have much in this file, we're going to add content so we can learn some basic navigation skills with Vim.&lt;/p&gt;

&lt;p&gt;Let's get out of view mode and go into &lt;em&gt;insert&lt;/em&gt; mode. &lt;/p&gt;

&lt;p&gt;In insert mode you can delete words, add words, and more. &lt;/p&gt;

&lt;p&gt;We're going to add some words to this document. To do this, press the letter "i" on your keyboard.&lt;/p&gt;

&lt;p&gt;If you notice on the bottom left, the word "insert" appears in all caps. This means you're in insert mode. &lt;/p&gt;

&lt;p&gt;Go ahead and type something. &lt;/p&gt;

&lt;p&gt;I wrote the following in my text file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Hola, mi nombre es Douglas
y a mi me gustan las pupusas.

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

&lt;/div&gt;



&lt;h1&gt;
  
  
  Saving a file with :w
&lt;/h1&gt;

&lt;p&gt;Now we want to save this file. Let's exit insert mode and go back into view mode where we can save the file. To do this press the &lt;strong&gt;escape key&lt;/strong&gt; on the top left of your keyboard, or &lt;strong&gt;ctrl + c&lt;/strong&gt; if you don't have an escape key. &lt;/p&gt;

&lt;p&gt;The bottom left of your screen shouldn't say insert anymore. It should be empty. This is how you know you're in View mode.&lt;/p&gt;

&lt;p&gt;Now we can save the file. Type the following command and then press enter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;
:w

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

&lt;/div&gt;



&lt;p&gt;This command saves the file (or 'writes' it). There are similar commands that will close out a file after you've saved it (:wq) but for our purposes this command is enough.&lt;/p&gt;

&lt;p&gt;Now would be a good time to navigate your file. Since we're in View mode we can easily do this by pressing the h key, which moves you to your left. &lt;/p&gt;

&lt;p&gt;If you have two lines of text, as I do, you can move up with the j key. Move back down with the k key, and then move right with the l key. Try it out.&lt;/p&gt;

&lt;p&gt;You can point and click to get to where you want, but the point of Vim is to avoid the mouse and use what's directly available at your fingertips. There's a great website that helps you get used to moving around with Vim called &lt;a href="https://vim-adventures.com" rel="noopener noreferrer"&gt;Vim Adventure&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Quitting Vim with :q
&lt;/h1&gt;

&lt;p&gt;We've done enough with this file and we want to exit the file and the Vim editor. &lt;/p&gt;

&lt;p&gt;To do so, we must remain in View mode and enter a command similar to saving this file. &lt;/p&gt;

&lt;p&gt;Go ahead and type the following command and press enter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;
:q

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

&lt;/div&gt;



&lt;p&gt;Congratulations, you've exited Vim! &lt;/p&gt;

&lt;p&gt;If you haven't seen the funny memes about trying to exit Vim you can do so now with the assurance that you know how to exit Vim.&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;Getting to know Vim and being comfortable with it takes time so, start small. &lt;/p&gt;

&lt;p&gt;I've used it while learning Hugo, the static website generator, editing the configuration files and markdown files. &lt;/p&gt;

&lt;p&gt;I haven't used it for large projects yet because I want the basics to feel natural, but my knowledge is compounding because I need more from it.&lt;/p&gt;

&lt;p&gt;I hope this tutorial inspires you to check it out and know a little bit about it.&lt;/p&gt;

&lt;h1&gt;
  
  
  Recommendations
&lt;/h1&gt;

&lt;p&gt;If you want more, check out the book &lt;a href="https://www.amazon.com/Mastering-Vim-Quickly-WTF-time/dp/1983325740/ref=sr_1_4?dchild=1&amp;amp;keywords=mastering+vim&amp;amp;qid=1622393118&amp;amp;sr=8-4" rel="noopener noreferrer"&gt;Mastering Vim Quickly&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I also recommend the website &lt;a href="https://www.amazon.com/Mastering-Vim-Quickly-WTF-time/dp/1983325740/ref=sr_1_4?dchild=1&amp;amp;keywords=mastering+vim&amp;amp;qid=1622393118&amp;amp;sr=8-4" rel="noopener noreferrer"&gt;Vim Adventures&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I enjoy reading the wiki page of anything existence, and you can find &lt;a href="https://en.wikipedia.org/wiki/Vim_(text_editor)" rel="noopener noreferrer"&gt;Vim's wiki page here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Lastly, check out their &lt;a href="https://www.vim.org" rel="noopener noreferrer"&gt;website to see what they're all about and the cool charity work they do&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>vim</category>
      <category>editor</category>
      <category>text</category>
      <category>basics</category>
    </item>
  </channel>
</rss>
