mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 23:19:16 +02:00
First round of improvements to channel management:
- use modals - less proeminent button - field styling/labels
This commit is contained in:
parent
f8675c6080
commit
e59cc33378
103 changed files with 3205 additions and 451 deletions
|
@ -1,4 +1,5 @@
|
|||
import html
|
||||
import logging
|
||||
import io
|
||||
import os
|
||||
import re
|
||||
|
@ -20,6 +21,8 @@ from . import utils
|
|||
|
||||
EXCLUDED_PATHS = ["/api", "/federation", "/.well-known"]
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def should_fallback_to_spa(path):
|
||||
if path == "/":
|
||||
|
@ -270,6 +273,17 @@ class ThrottleStatusMiddleware:
|
|||
return response
|
||||
|
||||
|
||||
class VerboseBadRequestsMiddleware:
|
||||
def __init__(self, get_response):
|
||||
self.get_response = get_response
|
||||
|
||||
def __call__(self, request):
|
||||
response = self.get_response(request)
|
||||
if response.status_code == 400:
|
||||
logger.warning("Bad request: %s", response.content)
|
||||
return response
|
||||
|
||||
|
||||
class ProfilerMiddleware:
|
||||
"""
|
||||
from https://github.com/omarish/django-cprofile-middleware/blob/master/django_cprofile_middleware/middleware.py
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue