Brennan's Django Showcase
Table of Contents:
- About The Project
- Getting Started
About The Project
View project here!
For more information about specific areas of this project, please refer to my personal notes.
For development, you will need Python 3.6 or higher, pip, venv, and PostgeSQL installed in your environment.
- Basic knowledge of Python and SQL database systems
- Familar with Django framework for front-end and back-end development
- Object-oriented Programming (OOP) paradigm
- Model-View-Controller (MVC) paradigm
- Model-View-ViewMode (MVVM) paradigm
- Knowledge and use of the Command-line Interface (CLI)
Python installation on Ubuntu
On Ubuntu 20.04 and later, Python 3 comes pre-installed. Check first to see if you have the tools required already installed:
$ python3 --version $ pip3 --version
Head over to the official Python website and download the installer
Also, be sure to have
git donwloaded and available in your PATH as well.
You can install Python and pip easily with apt install, just run the following commands:
$ sudo apt install python3 $ sudo apt install python3-pip
There are a few more packages and development tools to install to ensure that we have a robust setup for our programming environment:
$ sudo apt install -y build-essential libssl-dev libffi-dev python3-dev
If you need to update
pip, you can make it using
pip! Cool right? After running the following command, just open again the command line and be happy.
$ python3 -m pip install --upgrade pip
PostgreSQL installation on Ubuntu
Installation of PostgreSQL via CLI:
# Create the file repository configuration: sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' # Import the repository signing key: wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - # Update the package lists: sudo apt-get update # Install the latest version of PostgreSQL. # If you want a specific version, use 'postgresql-12' or similar instead of 'postgresql': sudo apt-get install postgresql
Installation of the pgAdmin GUI:
$ wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list' $ sudo apt-get update $ sudo apt-get install pgadmin4 pgadmin4-apache2 -y
Please note for sake of ease, this project is set to work with the default configurations of PostgreSQL on a local installation.
$ git clone https://github.com/brennanbrown/django-project.git $ cd django-project
Virtual Environment (
While there are a few ways to achieve a programming environment in Python, we’ll be using the venv module here, which is part of the standard Python 3 library. Let’s install venv by typing:
$ sudo apt install python3-venv
Creating and entering a new virtual environment:
$ python3 -m venv env $ . env/bin/activate $ pip install -r requirements.txt
You can ensure that you're in your new virutal Environment if you see
(env) prepend your bash shell:
Running the project
$ python3 manage.py runserver
Once the server has started up, you can visit it at localhost:8000/, or 127.0.0.1:8000/.
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature)
- Commit your Changes (
git commit -m 'Add some AmazingFeature')
- Push to the Branch (
git push origin feature/AmazingFeature)
- Open a Pull Request
Distributed under the MIT License. See
LICENSE for more information.
Project Link: https://github.com/brennanbrown/django-project