use request_media_debug_view from django_yunohost_integration

This commit is contained in:
JensDiemer 2022-04-15 16:34:31 +02:00
parent 1a93d38e0c
commit 848f45d16a

View file

@ -4,25 +4,15 @@ from django.contrib import admin
from django.urls import path from django.urls import path
# def debug_view(request): # from django_yunohost_integration.views import request_media_debug_view
# """ debug request.META """
# if not request.user.is_authenticated:
# from django.shortcuts import redirect
# return redirect('admin:index')
#
# import pprint
# meta = pprint.pformat(request.META)
# html = f'<html><body>request.META: <pre>{meta}</pre></body></html>'
# from django.http import HttpResponse
# return HttpResponse(html)
if settings.PATH_URL: if settings.PATH_URL:
# settings.PATH_URL is the $YNH_APP_ARG_PATH # settings.PATH_URL is the $YNH_APP_ARG_PATH
# Prefix all urls with "PATH_URL": # Prefix all urls with "PATH_URL":
urlpatterns = [ urlpatterns = [
# path(f'{settings.PATH_URL}/debug/', debug_view),
path(f'{settings.PATH_URL}/', admin.site.urls), path(f'{settings.PATH_URL}/', admin.site.urls),
# path(f'{settings.PATH_URL}/debug/', request_media_debug_view),
# TODO: https://github.com/jedie/django-for-runners/issues/25 # TODO: https://github.com/jedie/django-for-runners/issues/25
# MEDIA_URL contains the "PATH_URL" already: # MEDIA_URL contains the "PATH_URL" already: