Fakultas Ilmu Komputer UI

Commit 9c28c3c1 authored by Ichlasul Affan's avatar Ichlasul Affan
Browse files

Added missing migrations, added DB_PORT env var, and updated README.md.

parent 24a640a9
Pipeline #56915 passed with stages
in 6 minutes and 52 seconds
......@@ -56,12 +56,11 @@ dependencies prior to building and contributing to the project.
> Python packages from system-level packages. You can install and use
> [`virtualenv`](https://virtualenv.pypa.io/en/stable/) package to create the
> virtual environment for this project.
- PostgreSQL.
To verify your Python is installed. Make sure
the interpreter can be invoked from the shell. For example,
in `bash` shell (macOS or GNU/Linux-based OS):
```bash
$ python3 --version
Python 3.8.2
......@@ -69,6 +68,19 @@ $ pip3 --version
pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)
```
This project uses PostgreSQL as the database. So, add these lines to `.env` to
setup your local database-related environment variables:
```bash
IS_LOCAL=True
DB_NAME=marjinal
DB_USER=postgres
DB_PASSWORD=postgres
DB_HOST=localhost
DB_PORT=5432
```
You can adjust `DB_NAME`, `DB_USER`, `DB_PASSWORD`, `DB_HOST`, and `DB_PORT`
based on your local configuration.
After you clone this repository, let's make sure you installed all requirements, migrate, and collect static.
```bash
pip3 install -r requirements.txt
......
# Generated by Django 3.0.3 on 2020-09-19 13:55
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0012_category_archived_by'),
]
operations = [
migrations.AlterField(
model_name='materi',
name='author',
field=models.CharField(default='Penyusun', max_length=30),
),
migrations.AlterField(
model_name='materi',
name='descriptions',
field=models.TextField(default='Deskripsi'),
),
migrations.AlterField(
model_name='materi',
name='publisher',
field=models.CharField(default='Penerbit', max_length=30),
),
migrations.AlterField(
model_name='materi',
name='title',
field=models.CharField(default='Judul', max_length=50),
),
]
......@@ -97,7 +97,7 @@ if is_local:
"USER": config("DB_USER"),
"PASSWORD": config("DB_PASSWORD"),
"HOST": config("DB_HOST"),
"PORT": "",
"PORT": config("DB_PORT", 5432),
}
}
elif is_heroku:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment