vbv/server
Christian Cueni 796db1e83b Remove models, update settings 2022-04-20 14:43:04 +02:00
..
config Remove models, update settings 2022-04-20 14:43:04 +02:00
integration_tests Add rate limit libraries 2022-02-08 16:16:12 +01:00
locale Move django project to `server` directory 2022-02-03 17:33:59 +01:00
log Add log folder 2022-02-08 22:09:48 +01:00
requirements Remove models, update settings 2022-04-20 14:43:04 +02:00
vbv_lernwelt Remove models, update settings 2022-04-20 14:43:04 +02:00
.pylintrc Code formatting 2022-02-03 17:52:21 +01:00
README.md Move django project to `server` directory 2022-02-03 17:33:59 +01:00
example.env Remove models, update settings 2022-04-20 14:43:04 +02:00
gulpfile.js Move django project to `server` directory 2022-02-03 17:33:59 +01:00
manage.py Move django project to `server` directory 2022-02-03 17:33:59 +01:00
package.json Move django project to `server` directory 2022-02-03 17:33:59 +01:00
pytest.ini Add tests 2022-02-03 21:23:30 +01:00
run_tests.sh Add tests 2022-02-03 21:23:30 +01:00
run_tests_coverage.sh Add coverage to python tests 2022-02-08 08:47:07 +01:00
setup.cfg Move django project to `server` directory 2022-02-03 17:33:59 +01:00
tailwind.config.js Move django project to `server` directory 2022-02-03 17:33:59 +01:00

README.md

VBV Lernwelt

Project setup is based on cookiecutter-django project template.

Installation

See .tool-versions file for used django and node version

Create a new PostgreSQL database and role

createdb vbv_lernwelt
createuser vbv_lernwelt

Set the environment variable accordingly

export VBV_DATABASE_URL='postgres://vbv_lernwelt@localhost:5432/vbv_lernwelt'

Set VBV_DJANGO_READ_DOT_ENV_FILE=True to make the config read the example.env file (with direnv!?).

Apply migrations and run async server

python manage.py migrate

# sync server
python manage.py runserver

# or async server
uvicorn config.asgi:application --host 0.0.0.0 --reload

SASS Live-Reloading

# start django server...
# live reloading is hardcoded via proxy to port 8000 -> django server must get started manually
npm run dev

# open site with http://localhost:3000

IntelliJ Configuration

  • In the .idea/vbv_lernwelt.iml file change the module type to "PYTHON_MODULE".
  • Add django facet in "Project Structure".
  • Run configuration with "Python -> server.py" to have async debugging support.