├── core ├── __init__.py ├── migrations │ ├── __init__.py │ └── 0001_initial.py ├── admin.py ├── tests.py ├── urls.py ├── apps.py ├── models.py ├── views.py └── templates │ └── core │ ├── index.html │ ├── base.html │ └── navbar.html ├── htmx_websockets ├── __init__.py ├── asgi.py ├── urls.py ├── wsgi.py └── settings.py ├── .gitignore ├── requirements.txt └── manage.py /core/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /htmx_websockets/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__ 2 | *.pyc 3 | db.sqlite3 4 | notes.txt -------------------------------------------------------------------------------- /core/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /core/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | Django==4.1.6 2 | django-allauth==0.52.0 3 | django-extensions==3.2.1 -------------------------------------------------------------------------------- /core/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from . import views 3 | 4 | urlpatterns = [ 5 | path('', views.index, name='index') 6 | ] -------------------------------------------------------------------------------- /core/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class CoreConfig(AppConfig): 5 | default_auto_field = "django.db.models.BigAutoField" 6 | name = "core" 7 | -------------------------------------------------------------------------------- /core/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from django.contrib.auth.models import AbstractUser 3 | 4 | # Create your models here. 5 | class User(AbstractUser): 6 | pass -------------------------------------------------------------------------------- /core/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render 2 | 3 | # Create your views here. 4 | def index(request): 5 | context = {} 6 | return render(request, 'core/index.html', context) -------------------------------------------------------------------------------- /htmx_websockets/asgi.py: -------------------------------------------------------------------------------- 1 | import os 2 | from django.core.asgi import get_asgi_application 3 | 4 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "htmx_websockets.settings") 5 | 6 | application = get_asgi_application() -------------------------------------------------------------------------------- /htmx_websockets/urls.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from django.urls import path, include 3 | 4 | urlpatterns = [ 5 | path("admin/", admin.site.urls), 6 | path('', include('core.urls')), 7 | path('accounts/', include('allauth.urls')), 8 | ] 9 | -------------------------------------------------------------------------------- /core/templates/core/index.html: -------------------------------------------------------------------------------- 1 | {% extends 'core/base.html' %} 2 | 3 | {% block content %} 4 | 5 |
Here, there be sockets.
9 | 10 |