These are chat archives for django/django

1st
Jan 2016
rishu-18
@rishu-18
Jan 01 2016 09:51
This message was deleted
This message was deleted
This message was deleted
This message was deleted

I want to use django user models fields in my app .. but i am unable to do that .
`from django.shortcuts import render
from chasis.models import Chasis
from django.contrib.auth.models import Group,User
from chasis.forms import LogInForm

def LogIn(request):
user = "User"
if request.method == 'POST':
if request.POST['t1'] == "":
error_email = "Email/Username field is blank"
return render(request,"login.html",{'a':"user",'error_email':error_email})
if request.POST['t2'] == "":
error_password = "Password field is blank"
return render(request,"login.html",{'a':user,'error_password':error_password})
object = User.objects.all()
if request.POST['t1']:
user = request.POST['t1']
print object.first_name , object.email
return render(request,"login.html",{'a':user,'user_name':user_name})
else:
pass`