mirror of
https://github.com/YunoHost-Apps/django_example_ynh.git
synced 2024-09-03 18:26:21 +02:00
15 lines
387 B
Python
15 lines
387 B
Python
import pprint
|
|
|
|
from django.http import HttpResponse
|
|
from django.shortcuts import redirect
|
|
|
|
|
|
def request_media_debug_view(request):
|
|
""" debug request.META """
|
|
if not request.user.is_authenticated:
|
|
return redirect('admin:index')
|
|
|
|
meta = pprint.pformat(request.META)
|
|
html = f'<html><body>request.META: <pre>{meta}</pre></body></html>'
|
|
|
|
return HttpResponse(html)
|