2023-09-26 07:15:28 +00:00
|
|
|
from django.shortcuts import render
|
2023-09-28 09:01:14 +00:00
|
|
|
from .models import User
|
2023-09-26 07:15:28 +00:00
|
|
|
|
2023-09-28 09:01:14 +00:00
|
|
|
|
|
|
|
from django.shortcuts import redirect, render
|
|
|
|
|
|
|
|
def index(request):
|
|
|
|
return redirect("/user")
|
|
|
|
|
|
|
|
|
|
|
|
def user(request):
|
|
|
|
uid = request.user
|
|
|
|
user = User.get(uid)
|
|
|
|
context = { userdata: user }
|
|
|
|
return render(request, "polls/user.html", context)
|