Loading

deck

Martin Eigenmann

This is a live streamed presentation. You will automatically follow the presenter and see the slide they're currently on.

Django Workshop

21.07.2020

Who am I?

Martin Eigenmann

15y in love with computers

python + typescript

working @HSG

Who are you?

{{user.name}}

{{user.experience}}

{{user.languages}}

{{user.goals}}

Schedule

Python

Programming

Django

Todo-App

Python

  • 1990
  • Current stable version is 3.9.6
  • Python is an interpreted, high-level, general-purpose programming language.
  • Python's design philosophy emphasizes code readability with its notable use of significant whitespace
  • Works on Windows, Unix, macOS and Raspberry Pi
  • Used by Instagram, Spotify, Netflix, Uber, Google, ...

Python

Programming

Login with your github account and create a "New repl" with python as programming language

Programming

Start generating some art. Press "start" to run your program.

Programming

Dependencies are managed with pip, pipenv, poetry, ...

 

You can install python on your computer if you like (https://www.python.org/downloads/)

 

We are using replit.com for this workshop to not lose time.

 

python uses white spaces or tabs to group blocks of code (indentation)

Programming

  • Codecademy - https://www.codecademy.com/catalog/language/python
  • Python Cheat Sheet - https://www.pythoncheatsheet.org/
  • The Hitchhiker’s Guide to Python! - https://docs.python-guide.org/
  • Common Python Exceptions - https://www.programiz.com/python-programming/exceptions

 

Django

Django

  • 2005
  • Current stable version is 3.2.5
  • Follows the model-template-view (MVC) architectural pattern
  • The framework emphasizes reusability and "pluggability" of components, less code, low coupling, rapid development, and the principle of don't repeat yourself.
  • Backed by a foundation
  • Used by Instagram, Disqus, The Washington Times, Tsri.ch, ...

 

Django

Model Template View maps to Model View Controller

Apps represent a discrete part of a larger project. (plugable)

Django uses Migrations to maintain DB schema

Programming

https://github.com/eigenmannmartin/workshop

 

Feel free to deviate from that solution.

Setp 0

For the repository

Create a new repl

Setp 0.1

Start application

run python manage.py migrate

run python manage.py createsuperuser

Setp 1

run python manage.py startapp todos

add models and then

run python manage.py makemigrations

python manage.py migrate

Setp 2 - 6

Follow Readme

Setp 5

You can access the api now with postman

Ressources

  Django Project Documentation - https://docs.djangoproject.com/en/3.2/
  Full Stack Python - https://www.fullstackpython.com/django.html

Debug Toolbar - https://django-debug-toolbar.readthedocs.io/en/latest/installation.html
Django REST Framework - https://github.com/encode/django-rest-framework
Django Crispy Forms - https://github.com/django-crispy-forms/django-crispy-forms
Python Social Auth - https://github.com/python-social-auth/social-app-django
Django FeinCMS - https://feincms3.readthedocs.io/en/latest/
Django Push Notifications - https://github.com/jazzband/django-push-notifications

Plugins

Made with Slides.com