from django.shortcuts import render
from testapp.forms import LoginForm
import datetime

# Create your views here.
def home_view(request):
    form=LoginForm()
    return render(request,'testapp/home.html',{'form':form})


def date_time_view(request):
    name=request.GET['name']
    response=render(request,'testapp/datetime.html',{'name':name})
    response.set_cookie('name',name)
    return response


def result_view(request):
    name=request.COOKIES['name']
    date_time=datetime.datetime.now()
    my_dict={'name':name,'date_time':date_time}
    return render(request,'testapp/result.html',my_dict)

f5f485bbe1dfce96ab4e53798448a1c4a8ce7641
<mask token>


def home_view(request):
    form = LoginForm()
    return render(request, 'testapp/home.html', {'form': form})


<mask token>

<mask token>


def home_view(request):
    form = LoginForm()
    return render(request, 'testapp/home.html', {'form': form})


def date_time_view(request):
    name = request.GET['name']
    response = render(request, 'testapp/datetime.html', {'name': name})
    response.set_cookie('name', name)
    return response


<mask token>

<mask token>


def home_view(request):
    form = LoginForm()
    return render(request, 'testapp/home.html', {'form': form})


def date_time_view(request):
    name = request.GET['name']
    response = render(request, 'testapp/datetime.html', {'name': name})
    response.set_cookie('name', name)
    return response


def result_view(request):
    name = request.COOKIES['name']
    date_time = datetime.datetime.now()
    my_dict = {'name': name, 'date_time': date_time}
    return render(request, 'testapp/result.html', my_dict)

from django.shortcuts import render
from testapp.forms import LoginForm
import datetime


def home_view(request):
    form = LoginForm()
    return render(request, 'testapp/home.html', {'form': form})


def date_time_view(request):
    name = request.GET['name']
    response = render(request, 'testapp/datetime.html', {'name': name})
    response.set_cookie('name', name)
    return response


def result_view(request):
    name = request.COOKIES['name']
    date_time = datetime.datetime.now()
    my_dict = {'name': name, 'date_time': date_time}
    return render(request, 'testapp/result.html', my_dict)

from django.shortcuts import render
from testapp.forms import LoginForm
import datetime

# Create your views here.
def home_view(request):
    form=LoginForm()
    return render(request,'testapp/home.html',{'form':form})


def date_time_view(request):
    name=request.GET['name']
    response=render(request,'testapp/datetime.html',{'name':name})
    response.set_cookie('name',name)
    return response


def result_view(request):
    name=request.COOKIES['name']
    date_time=datetime.datetime.now()
    my_dict={'name':name,'date_time':date_time}
    return render(request,'testapp/result.html',my_dict)
