From e06c56e76ee2ef6388bf353233e74c520fa9e748 Mon Sep 17 00:00:00 2001 From: Lyxminxx Date: Sun, 20 Sep 2026 00:39:02 +0200 Subject: [PATCH] Ready for production deployment --- .gitignore | 12 +++ .python-version | 1 + Dockerfile | 25 ++++++ README.md | 0 core/__init__.py | 0 core/admin.py | 12 +++ core/asgi.py | 16 ++++ core/forms.py | 11 +++ core/migrations/0001_initial.py | 36 +++++++++ core/migrations/__init__.py | 0 core/models.py | 35 +++++++++ core/settings.py | 130 ++++++++++++++++++++++++++++++++ core/templates/edit.html | 23 ++++++ core/templates/home.html | 61 +++++++++++++++ core/templates/stats.html | 68 +++++++++++++++++ core/urls.py | 11 +++ core/views.py | 89 ++++++++++++++++++++++ core/wsgi.py | 16 ++++ db.sqlite3 | Bin 0 -> 143360 bytes main.py | 6 ++ manage.py | 22 ++++++ pyproject.toml | 11 +++ uv.lock | 79 +++++++++++++++++++ 23 files changed, 664 insertions(+) create mode 100644 .gitignore create mode 100644 .python-version create mode 100644 Dockerfile create mode 100644 README.md create mode 100644 core/__init__.py create mode 100644 core/admin.py create mode 100644 core/asgi.py create mode 100644 core/forms.py create mode 100644 core/migrations/0001_initial.py create mode 100644 core/migrations/__init__.py create mode 100644 core/models.py create mode 100644 core/settings.py create mode 100644 core/templates/edit.html create mode 100644 core/templates/home.html create mode 100644 core/templates/stats.html create mode 100644 core/urls.py create mode 100644 core/views.py create mode 100644 core/wsgi.py create mode 100644 db.sqlite3 create mode 100644 main.py create mode 100755 manage.py create mode 100644 pyproject.toml create mode 100644 uv.lock diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..43ab33c --- /dev/null +++ b/.gitignore @@ -0,0 +1,12 @@ +# Python-generated files +__pycache__/ +*.py[oc] +build/ +dist/ +wheels/ +*.egg-info + +# Virtual environments +.venv/ +data/ +staticfiles/ diff --git a/.python-version b/.python-version new file mode 100644 index 0000000..6324d40 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.14 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d993b83 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +FROM python:3.14-slim + +# Install uv directly into the container +COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/ + +# Set the working directory +WORKDIR /app + +# Copy your project files +COPY . . + +# Tell uv to sync/install all dependencies into the system environment +RUN uv sync --system --no-dev + +# Collect static files for the admin panel +RUN python manage.py collectstatic --noinput + +# Create the data directory for SQLite +RUN mkdir -p data + +# Expose the port +EXPOSE 8000 + +# Start Gunicorn +CMD ["gunicorn", "--bind", "0.0.0.0:8000", "core.wsgi:application"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/core/__init__.py b/core/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/core/admin.py b/core/admin.py new file mode 100644 index 0000000..315f708 --- /dev/null +++ b/core/admin.py @@ -0,0 +1,12 @@ +from django.contrib import admin +from .models import Transaction, Category + +admin.site.register(Category) + +@admin.register(Transaction) +class TransactionAdmin(admin.ModelAdmin): + list_display = ('date', 'title', 'amount', 'category') + + list_filter = ('category', 'date') + + search_fields = ('title',) diff --git a/core/asgi.py b/core/asgi.py new file mode 100644 index 0000000..a0b44fd --- /dev/null +++ b/core/asgi.py @@ -0,0 +1,16 @@ +""" +ASGI config for core project. + +It exposes the ASGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/6.1/howto/deployment/asgi/ +""" + +import os + +from django.core.asgi import get_asgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') + +application = get_asgi_application() diff --git a/core/forms.py b/core/forms.py new file mode 100644 index 0000000..789e647 --- /dev/null +++ b/core/forms.py @@ -0,0 +1,11 @@ +from django import forms +from .models import Transaction + +class TransactionForm(forms.ModelForm): + class Meta: + model = Transaction + fields = ['title', 'amount', 'category', 'date'] + # This widget forces the browser to show a date picker calendar + widgets = { + 'date': forms.DateInput(attrs={'type': 'date'}), + } diff --git a/core/migrations/0001_initial.py b/core/migrations/0001_initial.py new file mode 100644 index 0000000..63737dd --- /dev/null +++ b/core/migrations/0001_initial.py @@ -0,0 +1,36 @@ +# Generated by Django 6.1.1 on 2026-09-19 22:04 + +import django.db.models.deletion +import django.utils.timezone +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Category', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=255)), + ], + ), + migrations.CreateModel( + name='Transaction', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('title', models.CharField(max_length=255)), + ('amount', models.DecimalField(decimal_places=2, max_digits=10)), + ('date', models.DateField(default=django.utils.timezone.now)), + ('category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='core.category')), + ], + options={ + 'ordering': ['-date'], + }, + ), + ] diff --git a/core/migrations/__init__.py b/core/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/core/models.py b/core/models.py new file mode 100644 index 0000000..72901d3 --- /dev/null +++ b/core/models.py @@ -0,0 +1,35 @@ +from django.db import ( + models, +) +from django.utils import( + timezone +) + +class Transaction(models.Model): + title = models.CharField(max_length=255) + + amount = models.DecimalField(max_digits=10, decimal_places=2) + + date = models.DateField(default=timezone.now) + + category = models.ForeignKey('Category', on_delete=models.SET_NULL, null=True, blank=True) + + class Meta: + ordering = ['-date'] + + @property + def is_income(self): + return self.amount > 0 + + @property + def is_expense(self): + return self.amount < 0 + + def __str__(self): + return f"{self.date} | {self.title}: ${self.amount}" + +class Category(models.Model): + name = models.CharField(max_length=255) + + def __str__(self): + return self.name diff --git a/core/settings.py b/core/settings.py new file mode 100644 index 0000000..fc80819 --- /dev/null +++ b/core/settings.py @@ -0,0 +1,130 @@ +""" +Django settings for core project. + +Generated by 'django-admin startproject' using Django 6.1.1. + +For more information on this file, see +https://docs.djangoproject.com/en/6.1/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/6.1/ref/settings/ +""" + +from pathlib import Path + +# Build paths inside the project like this: BASE_DIR / 'subdir'. +BASE_DIR = Path(__file__).resolve().parent.parent + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/6.1/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'django-insecure-m#==%hz74d192o)4!#_!dpz%$yox@!hkabc9)pggkkiuvc7((q' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = False + +ALLOWED_HOSTS = [] + + +# Application definition + +INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'core', +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'whitenoise.middleware.WhiteNoiseMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'core.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [BASE_DIR / 'core' / 'templates'], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'core.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/6.1/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': BASE_DIR / 'data' / 'db.sqlite3', + } +} + + +# Password validation +# https://docs.djangoproject.com/en/6.1/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + + +# Internationalization +# https://docs.djangoproject.com/en/6.1/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/6.1/howto/static-files/ + +STATIC_URL = 'static/' + + +# Email +# https://docs.djangoproject.com/en/6.1/topics/email/#topic-email-configuration + +MAILERS = { + 'default': { + 'BACKEND': 'django.core.mail.backends.console.EmailBackend', + }, +} +STATIC_ROOT = BASE_DIR / "staticfiles" diff --git a/core/templates/edit.html b/core/templates/edit.html new file mode 100644 index 0000000..19b9cb1 --- /dev/null +++ b/core/templates/edit.html @@ -0,0 +1,23 @@ + + + + Edit Transaction + + + +

Editing: {{ transaction.title }}

+
+
+ {% csrf_token %} + {{ form.as_p }} + + Cancel +
+
+ + diff --git a/core/templates/home.html b/core/templates/home.html new file mode 100644 index 0000000..18364c4 --- /dev/null +++ b/core/templates/home.html @@ -0,0 +1,61 @@ + + + + DIME Tracker + + + +

Just another spending tracker

+
+

Total Balance: {{ total_balance|floatformat:2 }} kr

+ View Statistics 📊 +
+
+

Add Transaction

+
+ {% csrf_token %} + {{ form.as_p }} + +
+
+ + + + + + + + + + {% for t in transactions %} + + + + + + + + {% empty %} + + {% endfor %} +
DateTitleCategoryAmountActions
{{ t.date }}{{ t.title }}{{ t.category.name|default:"-" }} + {{ t.amount }} kr + + Edit +
+ {% csrf_token %} + +
+
No transactions yet. Start spending!
+ + diff --git a/core/templates/stats.html b/core/templates/stats.html new file mode 100644 index 0000000..32e5abd --- /dev/null +++ b/core/templates/stats.html @@ -0,0 +1,68 @@ + + + + DIME Statistics + + + + + + +

Spending Statistics

+ +
+ Last 7 Days + Last 30 Days + Last 365 Days + All Time +
+ +
+ +
+ + + + diff --git a/core/urls.py b/core/urls.py new file mode 100644 index 0000000..12708da --- /dev/null +++ b/core/urls.py @@ -0,0 +1,11 @@ +from django.contrib import admin +from django.urls import path +from core import views + +urlpatterns = [ + path('admin/', admin.site.urls), + path('', views.home, name='home'), + path('edit//', views.edit_transaction, name='edit_transaction'), + path('delete//', views.delete_transaction, name='delete_transaction'), + path('stats/', views.stats, name='stats'), # Add this line +] diff --git a/core/views.py b/core/views.py new file mode 100644 index 0000000..1022ccc --- /dev/null +++ b/core/views.py @@ -0,0 +1,89 @@ +from django.shortcuts import render, redirect, get_object_or_404 +from django.db.models import Sum +from .models import Transaction +from .forms import TransactionForm +import json +from datetime import timedelta +from django.utils import timezone +from django.db.models import Sum + + +def home(request): + # 1. Handle form submission + if request.method == 'POST': + form = TransactionForm(request.POST) + if form.is_valid(): + form.save() + return redirect('home') # Refresh the page + else: + form = TransactionForm() + + # 2. Fetch data for the table + transactions = Transaction.objects.all() + + # Calculate total balance (returns 0 if database is empty) + total_balance = transactions.aggregate(Sum('amount'))['amount__sum'] or 0 + + # 3. Send data to the template + context = { + 'form': form, + 'transactions': transactions, + 'total_balance': total_balance, + } + return render(request, 'home.html', context) + +def edit_transaction(request, pk): + transaction = get_object_or_404(Transaction, pk=pk) + + if request.method == 'POST': + form = TransactionForm(request.POST, instance=transaction) + if form.is_valid(): + form.save() + return redirect('home') + else: + form = TransactionForm(instance=transaction) + + return render(request, 'edit.html', {'form': form, 'transaction': transaction}) + +def delete_transaction(request, pk): + transaction = get_object_or_404(Transaction, pk=pk) + if request.method == 'POST': + transaction.delete() + return redirect('home') + +def stats(request): + # 1. Figure out what time period we are looking at + time_filter = request.GET.get('filter', 'all') + now = timezone.now().date() + + # Start with only expenses (numbers less than 0) + expenses = Transaction.objects.filter(amount__lt=0) + + # 2. Filter by date based on the button clicked + if time_filter == 'week': + expenses = expenses.filter(date__gte=now - timedelta(days=7)) + elif time_filter == 'month': + expenses = expenses.filter(date__gte=now - timedelta(days=30)) + elif time_filter == 'year': + expenses = expenses.filter(date__gte=now - timedelta(days=365)) + + # 3. Group by category and sum the amounts + category_data = expenses.values('category__name').annotate(total=Sum('amount')) + + # 4. Format data for Chart.js + labels = [] + data = [] + + for item in category_data: + # If category is null, call it 'Uncategorized' + cat_name = item['category__name'] or 'Uncategorized' + labels.append(cat_name) + # Make the number positive for the chart (so it draws correctly) + data.append(abs(float(item['total']))) + + context = { + 'labels': json.dumps(labels), + 'data': json.dumps(data), + 'current_filter': time_filter, + } + return render(request, 'stats.html', context) diff --git a/core/wsgi.py b/core/wsgi.py new file mode 100644 index 0000000..6ea9106 --- /dev/null +++ b/core/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for core project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/6.1/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') + +application = get_wsgi_application() diff --git a/db.sqlite3 b/db.sqlite3 new file mode 100644 index 0000000000000000000000000000000000000000..30760e453f7d36b3f3f0f53d3c1e1ddad58f411f GIT binary patch literal 143360 zcmeI5du$uYeaCmTe2A9Fu`J0vpDk-8TW2#mNlPx54<*-}PL^famUMof+#J{?xuPiZ zp(82Tx@(Hcxl7ul?H>)2q6OOYj~3_?=nJ?4X@a0Zaeb!<@&KC46>U+Z36Lg8klr6j zo6ZcE+~tybc5VQ~6T9me&grB@&xZk`v*i z9EnUT+O!g$OlXO4JgFXY3qxZwRij$XmrK>%GKHt3$!R4%8IMN7G4)a(E#=OPzFAwN zg+x+%p=MN4n^hXD<}1}&s-zc5gjjUcX zQX7@>gYDFYQ7Pu@c6HPcj)bG(Swb}|HZ&-vExAg0bK@Xp#F7au8JiDKCAUl^O444T zf_||2#1c_jp^JX1=te_P!mfznIRKYfEUsv=E4@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O2q@qaOHmOKt zI-*R6l}RO`sakB_Lv^XXajGjeYyQZ)Tu!eWnVNh)7W&DTM)ho#{&w=T{L=g1|Gc+V zk&>8JVw2H`5{^dZ-AzSWn<8yLMe%7ZJ{gTG2_-r2YATAhDT?l|NKH4qDY&f$o`5V>ZGDY)o^THY$^)3DGKkeNJ-GvOlk=Y-~V^0 z1~e)I0w4eaAOHd&00JNY0w4eaAOHd#39$9QNd8Tr|L_6<5C8!X009sH0T2KI5C8!X z009tqWC;vOGd_OUBCJd(s!UI9DB85j4iY4jktjR=?;)QS=y(792YH=*p1ekH@B#r4 z009sH0T2KI5C8!X009sH0TB2xBH;B%!r=VEYR%`CgcA#;Ou1-uyCfmFn6G9gy%J5m zX=K)Vx+Gy}wotCEDZ_x|9KmY_l00ck) z1V8`;KmY_l00ck)1l~CUCp;eEMAwK|GpaRN{chFzegx?;H&62Mq{t6@t)$bEM>s<> z6+ZjtrIM^~6!QAT(^j&Zn#&*X7lh+3k1*IZ!gc&GVTrJ07x{)jzE8eQzCphC&Q%ba rK>!3m00ck)1V8`;KmY_l00ck)1m1Z9Zb=lS`tJa;OE>=wK-d2Pf-4h% literal 0 HcmV?d00001 diff --git a/main.py b/main.py new file mode 100644 index 0000000..9fef0b6 --- /dev/null +++ b/main.py @@ -0,0 +1,6 @@ +def main(): + print("Hello from jast!") + + +if __name__ == "__main__": + main() diff --git a/manage.py b/manage.py new file mode 100755 index 0000000..f2a662c --- /dev/null +++ b/manage.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python +"""Django's command-line utility for administrative tasks.""" +import os +import sys + + +def main(): + """Run administrative tasks.""" + os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') + try: + from django.core.management import execute_from_command_line + except ImportError as exc: + raise ImportError( + "Couldn't import Django. Are you sure it's installed and " + "available on your PYTHONPATH environment variable? Did you " + "forget to activate a virtual environment?" + ) from exc + execute_from_command_line(sys.argv) + + +if __name__ == '__main__': + main() diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..618555e --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,11 @@ +[project] +name = "jast" +version = "0.1.0" +description = "Add your description here" +readme = "README.md" +requires-python = ">=3.14" +dependencies = [ + "django>=6.1.1", + "gunicorn>=26.2.0", + "whitenoise>=6.12.0", +] diff --git a/uv.lock b/uv.lock new file mode 100644 index 0000000..6605f7f --- /dev/null +++ b/uv.lock @@ -0,0 +1,79 @@ +version = 1 +revision = 3 +requires-python = ">=3.14" + +[[package]] +name = "asgiref" +version = "3.12.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e6/26/3b59f2bdae5f640389becb1f673cded775287f5fc4f816309d9ca9a3f93d/asgiref-3.12.1.tar.gz", hash = "sha256:59dcb51c272ad209d59bed5708a64a333083e86017d7fcdd67498eeab7784340", size = 42378, upload-time = "2026-07-14T09:56:18.087Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c0/1b/54f4ad77cd8a584fa70746c47df988e002cf1ee1eba43364d46f87803647/asgiref-3.12.1-py3-none-any.whl", hash = "sha256:fe386d1c2bff7259ea95929266d12a8cf9a8b5a1c2598402967d8792e7a7c094", size = 25478, upload-time = "2026-07-14T09:56:16.926Z" }, +] + +[[package]] +name = "django" +version = "6.1.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "asgiref" }, + { name = "sqlparse" }, + { name = "tzdata", marker = "sys_platform == 'win32'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/f8/d4/8314b5bdef20832f0ac6ae3b3e4d4924e4759fa3b4af27609dd747e7a6be/django-6.1.1.tar.gz", hash = "sha256:7ab93536d8e677aa14554c56426290c69480bf2ee68d7513d4a22f57d6bfeb84", size = 11284905, upload-time = "2026-09-02T17:20:45.621Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8d/ca/c1040a4fd15754ede7df15fd72fc2e123045b473b253ab5f5284e11c651e/django-6.1.1-py3-none-any.whl", hash = "sha256:585fb82bf15053c42cf52e67c2f1b54a032dca384759315fd6678ab1870d1d72", size = 8419512, upload-time = "2026-09-02T17:20:39.153Z" }, +] + +[[package]] +name = "gunicorn" +version = "26.2.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d9/8a/e4ef6ee11701b6cd64702848415ffb69eeff85cb388a3c6c7fe86f22f3f8/gunicorn-26.2.0.tar.gz", hash = "sha256:62b864895d9ebff0b2f9867ba04fe811c93121596540830c9c916d0769668447", size = 787921, upload-time = "2026-08-24T15:05:59.3Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/fe/85/7522a52e5e2f42faf1a129113ab63e548c42e103e9af395b7bfe65e403e2/gunicorn-26.2.0-py3-none-any.whl", hash = "sha256:bd249d0b3f7972f7432f0a6b6ff3b3ee2d129f70cd1ff6c09a9dd9e29a2b88e3", size = 228389, upload-time = "2026-08-24T15:05:57.67Z" }, +] + +[[package]] +name = "jast" +version = "0.1.0" +source = { virtual = "." } +dependencies = [ + { name = "django" }, + { name = "gunicorn" }, + { name = "whitenoise" }, +] + +[package.metadata] +requires-dist = [ + { name = "django", specifier = ">=6.1.1" }, + { name = "gunicorn", specifier = ">=26.2.0" }, + { name = "whitenoise", specifier = ">=6.12.0" }, +] + +[[package]] +name = "sqlparse" +version = "0.6.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/5f/d3/3f06a1006f2261d1342aefb3c71eed02f5d4ca5bdbecd86ebc12ad38306e/sqlparse-0.6.0.tar.gz", hash = "sha256:113c35c75365ab9cc9c7231d68c6428fb11c085fc8e9eb1ad659b7ddbf6cd2b9", size = 178477, upload-time = "2026-08-13T19:16:06.396Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d9/50/f00935da0ec7cbf325f8dc4f772ae46fbc7b672dd62876e73f0a94adda57/sqlparse-0.6.0-py3-none-any.whl", hash = "sha256:b861c0288ce2fa56209a9a6412d2e066ac664b3873b89c26c9d8415e8e32996f", size = 50070, upload-time = "2026-08-13T19:16:04.062Z" }, +] + +[[package]] +name = "tzdata" +version = "2026.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e4/31/3d74fa778a63b98b7374323befcc0be5ab3bd94afd4096a0124e7379152c/tzdata-2026.4.tar.gz", hash = "sha256:f1b8bd365d8d210c55353f4d7f8d6d8561c0ba50d704b700d195a9424bba0d79", size = 199350, upload-time = "2026-09-12T12:56:03.251Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f9/bc/8737e8d54cf51106118039b83f485a4783112fab49ea9d044b234978a46e/tzdata-2026.4-py2.py3-none-any.whl", hash = "sha256:c2169a8b0a7a5e9674da5a135ccdfb2b3e671b333ed9fed17b41f73c34476e81", size = 347494, upload-time = "2026-09-12T12:56:01.67Z" }, +] + +[[package]] +name = "whitenoise" +version = "6.12.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/cb/2a/55b3f3a4ec326cd077c1c3defeee656b9298372a69229134d930151acd01/whitenoise-6.12.0.tar.gz", hash = "sha256:f723ebb76a112e98816ff80fcea0a6c9b8ecde835f8ddda25df7a30a3c2db6ad", size = 26841, upload-time = "2026-02-27T00:05:42.028Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/db/eb/d5583a11486211f3ebd4b385545ae787f32363d453c19fffd81106c9c138/whitenoise-6.12.0-py3-none-any.whl", hash = "sha256:fc5e8c572e33ebf24795b47b6a7da8da3c00cff2349f5b04c02f28d0cc5a3cc2", size = 20302, upload-time = "2026-02-27T00:05:40.086Z" }, +]