diff --git a/assets/bigbug-32x32.png b/assets/bigbug-32x32.png new file mode 100644 index 0000000..78e9f61 Binary files /dev/null and b/assets/bigbug-32x32.png differ diff --git a/assets/bigbug-64-64.png b/assets/bigbug-64-64.png new file mode 100644 index 0000000..715da6a Binary files /dev/null and b/assets/bigbug-64-64.png differ diff --git a/assets/blue-32x32.png b/assets/blue-32x32.png new file mode 100644 index 0000000..a4e12f2 Binary files /dev/null and b/assets/blue-32x32.png differ diff --git a/assets/blue-64x64-manual-changes.png b/assets/blue-64x64-manual-changes.png new file mode 100644 index 0000000..d3fa2d4 Binary files /dev/null and b/assets/blue-64x64-manual-changes.png differ diff --git a/assets/blue-64x64.webp b/assets/blue-64x64.webp new file mode 100644 index 0000000..50509f9 Binary files /dev/null and b/assets/blue-64x64.webp differ diff --git a/assets/yello-64x64.png b/assets/yello-64x64.png new file mode 100644 index 0000000..867fedf Binary files /dev/null and b/assets/yello-64x64.png differ diff --git a/assets/yellow-32x32.png b/assets/yellow-32x32.png new file mode 100644 index 0000000..18e5227 Binary files /dev/null and b/assets/yellow-32x32.png differ diff --git a/bugsink/.urls.py.swo b/bugsink/.urls.py.swo new file mode 100644 index 0000000..a987c2f Binary files /dev/null and b/bugsink/.urls.py.swo differ diff --git a/bugsink/settings.py b/bugsink/settings.py index 4e00969..8a5e86c 100644 --- a/bugsink/settings.py +++ b/bugsink/settings.py @@ -113,6 +113,9 @@ USE_TZ = True # https://docs.djangoproject.com/en/4.2/howto/static-files/ STATIC_URL = 'static/' +STATICFILES_DIRS = [ + BASE_DIR / "static", +] # Default primary key field type # https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field diff --git a/bugsink/urls.py b/bugsink/urls.py index d9a5314..cccdda8 100644 --- a/bugsink/urls.py +++ b/bugsink/urls.py @@ -3,7 +3,7 @@ from django.conf import settings from django.contrib import admin from django.urls import include, path -from .views import trigger_error +from .views import trigger_error, favicon urlpatterns = [ @@ -13,6 +13,8 @@ urlpatterns = [ path('issues/', include('issues.urls')), path('admin/', admin.site.urls), + + path("favicon.ico", favicon), ] if settings.DEBUG: diff --git a/bugsink/views.py b/bugsink/views.py index f2fb5fc..70387d4 100644 --- a/bugsink/views.py +++ b/bugsink/views.py @@ -1,2 +1,16 @@ +from django.conf import settings + +from django.views.decorators.http import require_GET +from django.views.decorators.cache import cache_control +from django.http import FileResponse, HttpRequest, HttpResponse + + def trigger_error(request): raise Exception("Exception triggered on purpose to debug error handling") + + +@require_GET +@cache_control(max_age=60 * 60 * 24, immutable=True, public=True) +def favicon(request: HttpRequest) -> HttpResponse: + file = (settings.BASE_DIR / "static" / "favicon.png").open("rb") + return FileResponse(file) diff --git a/static/favicon.png b/static/favicon.png new file mode 100644 index 0000000..d3fa2d4 Binary files /dev/null and b/static/favicon.png differ