Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/runekaagaard/hypergen-djangocon-2022
The example code for our talk at Djangocon Europe 2022 in Porto
https://github.com/runekaagaard/hypergen-djangocon-2022
Last synced: 11 days ago
JSON representation
The example code for our talk at Djangocon Europe 2022 in Porto
- Host: GitHub
- URL: https://github.com/runekaagaard/hypergen-djangocon-2022
- Owner: runekaagaard
- License: mpl-2.0
- Created: 2022-08-21T14:30:05.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-01T16:32:46.000Z (over 2 years ago)
- Last Synced: 2024-11-07T11:48:20.442Z (2 months ago)
- Language: Python
- Homepage: https://runekaagaard.github.io/hypergen-djangocon-2022/
- Size: 638 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
Server-Side is back, baby!
==========================This repository contains the example code from our workshop at Djangocon 2022 in Porto. Also available are:
- The `slides `_
- The `workshop description `_Installation
============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 runserverThen navigate to `http://127.0.0.1:8000 `_ that logs you in automatically, then redirects to the ``free`` liveview.
Interesting files
=================`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.Less interesting files
======================`djangocon2022/settings.py `_
The main settings file. ``booking`` is added to ``INSTALLED_APPS``. ``hypergen.context.context_middleware`` is added to ``MIDDLEWARE``.
`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.