(request: WSGIRequest)
return render(request, "settings.html", context)
Renders the /settings page. Only admin is allowed to see this page.
Renders the /settings page. Only admin is allowed to see this page.
Renders the / settings page . Only admin is allowed to see this page .
def index(request: WSGIRequest) -> HttpResponse:
    """Renders the /settings page. Only admin is allowed to see this page."""
    from core import urls
    from core.settings import library

    context = base.context(request)
    context["urls"] = urls.settings_paths
    library_path = library.get_library_path()
    if os.path.islink(library_path):
        context["local_library"] = os.readlink(library_path)
    else:
        context["local_library"] = "/"
    context["version"] = conf.VERSION
    return render(request, "settings.html", context)
def index ( request : WSGIRequest ) -> HttpResponse : from core import urls from core . settings import library context = base . context ( request ) context [ "urls" ] = urls . settings_paths library_path = library . get_library_path ( ) if os . path . islink ( library_path ) : context [ "local_library" ] = os . readlink ( library_path ) else : context [ "local_library" ] = "/" context [ "version" ] = conf . VERSION return render ( request , "settings.html" , context )