/crudProject

Putting in practice concepts learned about jQuery, Bootstrap, javaScript, Python and Django.

Primary LanguageHTML

Django CRUD

Screenshots

Column A Column B
Home Companies
NewComp InfoComp

About

Putting in practice concepts learned about jQuery, Bootstrap, javaScript, Python and Django.

Installation

  • Clone the repository and enter the folder crudProject:
git clone https://github.com/albertosdneto/crudProject.git
cd crudProject
  • Create a virtual environment with python 3.6.
python3 -m venv venv
  • Activate the virtual environment you have just created:
source venv/bin/activate
  • Upgrade the virtual environment:
pip install --upgrade pip setuptools
  • Install and configure PostgreSQL. On Ubuntu 18.04 do as follow:
sudo apt install postgresql postgresql-contrib libpq-dev python3-dev
  • Create passoword and database. For password I used '123456', but you may change it:
sudo -u postgres psql postgres
\password postgres
create database crudprojectdb;
\q
  • (Optional) Install gui for postgres:
sudo apt install pgadmin3
pip install -r requirements.txt
  • Next to manage.py create the file .env with the content:
DEBUG=True
SECRET_KEY=ARANDOMSECRETKEY
DB_NAME=crudprojectdb
DB_USER=postgres
DB_PASS=123456
  • Migrate database:
python manage.py makemigrations
python manage.py migrate
  • Create Superuser:
python manage.py createsuperuser
  • Run the project:
python manage.py runserver
  • Go to the project url and verify if it is running. Enjoy.