Django community: Django links RSS
This page, updated regularly, aggregates Django links from the Django community.
-
Django Formsets Tutorial - Build dynamic forms with Htmx
This tutorial will cover how to build dynamic forms in Django using Htmx. It will also cover the basic concepts of Django formsets. But most of all, we're going to focus on how to make dynamic forms look and feel good.Project SetupStart by creating a Django project:virtualenv env source env/bin/activate pip install django django-admin startproject djformsThe latest version of Django at the time of this tutorial is 3.2.6Run the migrations:python manage.py migrateModelsFor this project we will work with the same set of models. Create a Django app and register it in the settings:python manage.py startapp booksINSTALLED_APPS = [ ... 'django.contrib.staticfiles', 'books' ]Add it to INSTALLED_APPS in settings.pyInside books/models.py add the following models:from django.db import models class Author(models.Model): name = models.CharField(max_length=50) def __str__(self): return self.name class Book(models.Model): author = models.ForeignKey(Author, on_delete=models.CASCADE) title = models.CharField(max_length=100) number_of_pages = models.PositiveIntegerField(default=1) def __str__(self): return self.title And add the following to books/admin.py:from django.contrib import admin from .models import Author, Book class BookInLineAdmin(admin.TabularInline): model = Book class AuthorAdmin(admin.ModelAdmin): inlines = [BookInLineAdmin] admin.site.register(Author, AuthorAdmin) Using these models we can create an author and add as many books as we want to that author.Run the migrations:python manage.py makemigrations python manage.py migrateHow to use Django FormsetsFormsets are one of the … -
Tutorial Part 2: Implement a Chat Server — Channels 3.0.4 documentation
Why we need channel layer? However if you open a second browser tab to the same room page at http://127.0.0.1:8000/chat/lobby/ and type in a message, the message will not appear in the first tab. For that to work, we need to have multiple instances of the same ChatConsumer be able to talk to each other. Channels provides a channel layer abstraction that enables this kind of communication between consumers. -
Introduction — Channels 3.0.4 documentation
Wow! A fabulous introduction to ASGI. ## Learnings - Think of "Consumers" are like views. - However, unlike views, consumers are async applications. Each consumer initiates a new instance of the application for each client. - Thus there are multiple different applications for each user for each consumer. - These applications are created for each ws connection. Thus multiple tabs will have multiple connections even from the same browser. -
Corvia/django-tenant-users
-
Deploying — Channels 3.0.4 documentation
Wow, we can use WSGI server along with ASGI server. We typically want to do this because we want to serve the rest of the website using uWSGI but also want to use websockets for some parts. You can choose to either use Daphne for all requests - HTTP and WebSocket - or if you are conservative about stability, keep running standard HTTP requests through a WSGI server and use Daphne only for things WSGI cannot do, like HTTP long-polling and WebSockets. If you do split, you’ll need to put something in front of Daphne and your WSGI server to work out what requests to send to each (using HTTP path or domain) - that’s not covered here, just know you can do it. -
django-otp — django-otp 1.0.6 documentation
-
Welcome to django-admin-honeypot’s documentation! — django-admin-honeypot 1.1.0 documentation
-
How to Dockerize Django in 5 minutes
-
django-json-widget · PyPI
-
William Vincent - William Vincent
-
DjangoCon US 2021 Online Conference
RT @djangocon: DjangoCon US 2021 registration is open! Grab your ticket for the free 2 day virtual event October 22-23. #django #djangocon -
DjangoCon US 2018 - Finally Understand Authentication in Django REST Framework by William S. Vincent - YouTube
-
Awesome Django
Built with Django -
Efficient Reloading in Django’s Runserver With Watchman
-
foxmask/django-th: Trigger Happy - The bus for your internet services
-
Dockerizing a Python Django Web Application - Semaphore Tutorial
-
Build reusable components in Django without writing a single line of Python. | slippers
-
GitHub - EmilStenstrom/django-components: A way to create simple reusable template components in Django.
-
GitHub - edelvalle/reactor: Phoenix LiveView but for Django
-
Unicorn
-
GitHub - adamghill/django-unicorn: The magical reactive component framework for Django ✨
-
netbox: Infrastructure resource modeling for network automation. Open source under Apache 2.
-
How to Turn Django Admin Into a Lightweight Dashboard
How to add summary table and charts to Django Admin -
What You Should Know About The Django User Model
The goal of this article is to discuss the caveats of the default Django user model implementation and also to give you some advice on how to address them. It is important to know the limitations of the current implementation so to avoid the most common pitfalls. Something to keep in mind is that the Django user model is heavily based on its initial implementation that is at least 16 years old. Because user and authentication is a core part of the majority of the web applications using Django, most of its quirks persisted on the subsequent releases so to maintain backward compatibility. The good news is that Django offers many ways to override and customize its default implementation so to fit your application needs. But some of those changes must be done right at the beginning of the project, otherwise it would be too much of a hassle to change the database structure after your application is in production. -
Django-Pagedown - Easily add Stack Overflow's "PageDown" Markdown editor to a Django form field