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: 5 months 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 (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-11-04T13:05:58.000Z (about 6 years ago)
- Last Synced: 2025-06-28T01:03:14.898Z (5 months ago)
- Topics: beginner-project, django-postgresql, django-project, postgresql-database, python3
- Language: JavaScript
- Size: 1.58 MB
- Stars: 2
- Watchers: 1
- 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.