Actually use (some) favicon
BIN
assets/bigbug-32x32.png
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
assets/bigbug-64-64.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
assets/blue-32x32.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
assets/blue-64x64-manual-changes.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
assets/blue-64x64.webp
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
assets/yello-64x64.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
assets/yellow-32x32.png
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
bugsink/.urls.py.swo
Normal file
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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)
|
||||
|
||||
BIN
static/favicon.png
Normal file
|
After Width: | Height: | Size: 17 KiB |