Introduction
In this series of posts, I'll be building my way from fresh graduate of the Django tutorial (months ago) to SaaS application builder extraordinaire. The goal is to take a simple, over-done, unimaginative idea (QR code generator) and build a SaaS application out of it. For educational fun, of course. Complete with user authentication, and monetization strategies without the.... monetization?? I'm going to add "paid" tiers, but no actual payment methods, for now. Unless? Just kidding..... heh.
The purpose of this project is to practice building web applications in Django and write about it along the way. A real "learning in public" kind of project.
So, let's just go ahead and jump into the process. We'll start with a simple project setup. Here is my standard setup process.
I am on a Linux workstation so all of the commands will be in bash.
Creating the project
-
Create the folder
I have a Code/Py folder in my home folder. This is where I like to start my Django projects.
$ cd ~/Code/Py/ $ mkdir QRCodeGen $ cd QRCodeGen/ -
Install Python VirtualEnv, and activate
At the root of this folder, I setup the python virtualenv.
$ python3 -m venv .venv $ source .venv/bin/activate -
Upgrade Setuptools and Pip
As a habit, before I install any packages through pip, I make sure to upgrade both setuptools and pip.
$ pip install --upgrade setuptools pip -
Install DJango
Now we can install the Django package.
$ pip install django -
Create Django Project
This is where people might start to question my process.
The folder that we're in is the project folder, so I don't want to create a nested project folder inside of the project folder. I prefer to use the current folder. I also name the project "config" because that will create the folder that will hold what I consider the config files for the project.
# notice the lone period at the end. $ django-admin startproject config .I'll be honest, I'm not experienced enough to know if this preference will bite me in the long run. I've only created simple, single page apps so far. So go ahead, tell me why I'm wrong here.
-
Lastly for this post, run the dev server.
This is just a quick test to make sure everything has been setup properly so far.
$ ./manage.py runserverThen open your web browser to http://127.0.0.1:8000 or http://localhost:8000. There will be a link in the terminal that you can click, if your terminal supports it. This is what you should see.
This is a very simple setup, and honestly, the end of my comfort zone with Django. I've built some basic apps before but that was YEARS ago. So now I'm jumping back in. There are a few things that I like to do that I purposely skipped over to keep this a very short and simple guide. I'll go over these in future posts as I work my way through this project.
Next, I'll go over creating a simple model for our QR code generator.

Top comments (0)