|
|
||
|---|---|---|
| .git-crypt | ||
| compose/django | ||
| config | ||
| env | ||
| env_secrets | ||
| locale | ||
| requirements | ||
| vbv_lernwelt | ||
| .dockerignore | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| .pylintrc | ||
| .tool-versions | ||
| README.md | ||
| README_generated.md | ||
| docker-compose-local.yml | ||
| example.env | ||
| gulpfile.js | ||
| manage.py | ||
| package.json | ||
| production.yml | ||
| pytest.ini | ||
| setup.cfg | ||
| tailwind.config.js | ||
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.