Merge app and project, use SQLite instead and

This commit is contained in:
Joakim Hellsén 2024-03-15 13:35:00 +01:00
commit 4c16d14e61
No known key found for this signature in database
GPG key ID: D196AE66FEBE1DC9
29 changed files with 221 additions and 454 deletions

View file

@ -1,27 +0,0 @@
from __future__ import annotations
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from django.http import HttpRequest
def add_global_context(request: HttpRequest) -> dict[str, str | int]: # noqa: ARG001
"""Add global context to all templates.
Args:
request: The request object.
Returns:
A dictionary with the global context.
"""
from feeds.stats import get_db_size # noqa: PLC0415
from .models import Feed # noqa: PLC0415
db_size: str = get_db_size()
amount_of_feeds: int = Feed.objects.count()
return {
"db_size": db_size,
"amount_of_feeds": amount_of_feeds,
}