Better Programming

Advice for programmers.

Follow publication

Member-only story

Build a Personal Journal With Django and Python

Esther Vaati
Better Programming
Published in
8 min readOct 25, 2021
Photo by Sincerely Media on Unsplash

In this tutorial, we will design and build a simple personal journal where users can do the following:

  • Add a new journal entry
  • View all journal entries
  • Edit and delete a specific journal entry

UI and UX

Before building any application, you should think about the UI(user interface) and UX( user experience). Think about how users will navigate through the app as well as how it should look like it. The UI doesn’t have to be complex; a simple sketch can give you an idea of what you want to achieve and make the building process faster and easier. For our personal journal app, we should have something like this:

When users first open the application, they will see all their journal entries on the homepage, as you can see above. They also have the option to add a new Journal at a click of a button.

Prerequisites

You should have a basic understanding of Python and Django. You should also be familiar with the command-line tool.

Build a Personal Journal with Django

We will start by creating a virtual environment. A virtual environment is used to install project dependencies.If you are not familiar with virtual environments, see the python docs for a more detailed explanation.

mkdir JOURNALcd journal/python3 -m venv myenv

Activate virtual environment:

source myenv/bin/activate

Create Django project:

django-admin startproject journalapp

Install Django:

python3 -m pip install Django

Database

Django comes with a lightweight SQLite database which is great for simple projects. If you open the settings.py file, you should see the database configurations for sqlite.

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Esther Vaati
Esther Vaati

Written by Esther Vaati

Get practical JavaScript tips and code snippets delivered to your inbox. Join 1000 + developers who write better code. https://practicaljavascript.substack.com/

No responses yet

Write a response