https://github.com/alexmhack/django_postgresql
using postgresql database with django
https://github.com/alexmhack/django_postgresql
beginner-project django-postgresql django-project postgresql-database python3
Last synced: 21 days ago
JSON representation
using postgresql database with django
- Host: GitHub
- URL: https://github.com/alexmhack/django_postgresql
- Owner: Alexmhack
- Created: 2018-08-08T11:39:39.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-11-04T13:05:58.000Z (over 6 years ago)
- Last Synced: 2026-04-08T02:14:14.038Z (about 1 month ago)
- Topics: beginner-project, django-postgresql, django-project, postgresql-database, python3
- Language: JavaScript
- Size: 1.58 MB
- Stars: 2
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# django_postgresql
using postgresql database with django
# INSTALLATION
Install the postgresql database in your local computer first from the .exe file on the offical site.
Install the postgresql package for python - psycopg2 using pip in virtualenv
# CONFIGURE
Create a new virtualenv and then install all the dependencies for our project there
Create a new django project
Create a new database using the postgresql command line.
CREATE DATABASE blog
Inside our django project settings.py, set the database as the postgresql like so,
```
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'blog',
'USER': 'postgres',
'PASSWORD': 'admin',
'HOST': 'localhost',
'PORT': '',
}
```
# DJANGO USAGE
Just create models and run makemigrations and migrate command, the new database should work fine.