i want to get the user who login now ..
how to do this ..
thanks
this is my code :
ps=Position.objects.filter(name=User.username)
updated:
ps=Position.objects.filter(name=request.user.username)
and
return render_to_response(template_name, {
"map_form": map_form,
"map": map,
"group": map, # @@@ this should be the only context var for the map
"is_member": is_member,
"ps":ps
}, context_instance=RequestContext(request))
in the html:
var ps='{{ ps.name }}'
alert(ps)
and it does print nothing ?
why ?