2010/1/25 min <[email protected]>:
> Hi, everyone.
>
> In the first place, I will login to access a web page by my "usename"
> When I signed in, how to send my "username" into a parmaeter in the
> views.py

Look here 
http://docs.djangoproject.com/en/dev/topics/auth/#authentication-in-web-requests

Once you've done that...

> @login_required
> def new_page(request):
>
>    #how to get the username?

      user = request.user

>    form = newForm()
>    variables = RequestContext(request, {'form': form})
>    return render_to_response('new_page.html', variables)
>
> thanks
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to