12 lines
301 B
Python
12 lines
301 B
Python
from django.contrib.auth.decorators import login_required
|
|
from django.shortcuts import render
|
|
|
|
|
|
def home(request):
|
|
ctx = {"user": request.user}
|
|
return render(request, "example/home.html", ctx)
|
|
|
|
|
|
@login_required
|
|
def protected_page(request):
|
|
return render(request, "example/protected.html")
|