This repository contains the example code from our workshop at Djangocon 2022 in Porto. Also available are:
- The slides
- The workshop description
Install the example code like so:
git clone https://github.com/runekaagaard/hypergen-djangocon-2022.git cd hypergen-djangocon-2022 python3 -m venv venv source venv/bin/activate pip install Django==4.1.1 django-hypergen==0.9.10 python manage.py migrate python manage.py runserver
Then navigate to http://127.0.0.1:8000 that logs you in automatically, then redirects to the free
liveview.
- booking/models.py
- The Doctor and Timeslot models.
- booking/urls.py
- The
autourls()
function that creates urls for all liveviews and actions automatically. - booking/views.py
- Skeleton of liveviews, actions, template functions and base templates where we will build the app.
- booking/views_finished.py
- The finished app, that was build in the 30 minutes long live-coding part.
- djangocon2022/settings.py
- The main settings file.
booking
is added toINSTALLED_APPS
.hypergen.context.context_middleware
is added toMIDDLEWARE
. - djangocon2022/urls.py
- The main urls file. The booking app is added.
/
logs the user in automatically. - booking/pasta.py
- Some stuff we might copy/paste during the presentation.