Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dmpe/django-minisite

Another django attempt - simple CRUD app
https://github.com/dmpe/django-minisite

api django heroku prototype

Last synced: 7 days ago
JSON representation

Another django attempt - simple CRUD app

Awesome Lists containing this project

README

        

# Django prototype for finance website

[![Open in Gitpod Web IDE](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/dmpe/django-minisite)

A simple CRUD app building for prototyping purposes while at work, using Django 3+.

Basically, a user can create a DB entry and update it afterwards. Nothing spectacular to see here. :kissing:

![homepage](images/django-minisite.png)

## Run Django migrations

```shell
heroku run python3 manage.py makemigrations
heroku run python3 manage.py migrate
```

Or if it doesn't work:

```shell
heroku run bash
python3 manage.py makemigrations
python3 manage.py migrate
```

## Static (JS, CSS) files handling

On production server, there is no access to the internet, hence static resources must be concatenated served within app.

```shell
cd webpack_js_css
sudo npm install
gulp # works only if all packages from package.json were installed
```

## Local Setup of PostgreSQL

1.

1.5. Install optionally `sudo apt install pgadmin4` due to a great GUI for PG.

Launch with `pgadmin4`.

2. You must change DB password, so execute

```shell
sudo -u postgres psql postgres

alter user postgres with password 'postgres';
```

3. In pgadmin4, create a new DB called `django`

4. Run django migrations, see above.

## Setup on gitpod.io

1. Launch gitpod from here

2. `createdb -h localhost -p 5432 -U gitpod django`

3. see `gitpod.yml`