Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

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

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 runserver

Then 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.