Fakultas Ilmu Komputer UI
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
PMPL
Class Project
DIGIPUS
Commits
9c28c3c1
Commit
9c28c3c1
authored
Sep 19, 2020
by
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
Changes
3
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
9c28c3c1
...
...
@@ -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
...
...
app/migrations/0013_auto_20200919_2055.py
0 → 100644
View file @
9c28c3c1
# 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
),
),
]
digipus/settings.py
View file @
9c28c3c1
...
...
@@ -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
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment