File: views.py

package info (click to toggle)
python-django-pgschemas 1.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 848 kB
  • sloc: python: 3,887; makefile: 33; sh: 10; sql: 2
file content (13 lines) | stat: -rw-r--r-- 369 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
from django.shortcuts import render
from django.urls import reverse


def generic(request):
    context = {
        "path": request.get_full_path(),
        "user": request.user,
        "schema": request.tenant.schema_name,
        "routing": request.tenant.routing,
        "admin_url": reverse("admin:index"),
    }
    return render(request, "index.html", context)