Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6382671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:33:12+00:00 2026-05-25T02:33:12+00:00

Ok Here goes. With django-registration i have created a user with passwords etc. I

  • 0

Ok Here goes.

With django-registration i have created a user with passwords etc.
I have named the user Zoro. The registration was a success and it takes me to

“You are now registered. Activation email sent.”

Email activation is turned off. So i go to login page and login. This is done under 127.0.0.1/accounts/login. The login.html template successfully extends the base.html template. And within the base.html template i have a tag {{ user }}, which i want to show the username at the top left.

When i login my urls are extended away from ^/accounts/login to ^/homepage. Know i dont know where the current username is stored, so i cant pass to {{ user }} the curent user’s name in views. So {{ user }} is blank.

But…….If i go back to the login page, the current username is at the top left.

I am new, be gentle.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T02:33:12+00:00Added an answer on May 25, 2026 at 2:33 am

    You have different options to add the {{ user }} to your templates context:

    a) add django.contrib.auth.context_processors.auth to your TEMPLATE_CONTEXT_PROCESSORS setting. This will make a {{ user }} template variable available in all context’s when rendering templates.

    b) do it by hand and add a user variable to pass it to the context in your view. user can be retrieved from request.user

    c) Make sure you are not overwrting {{ user }} somewhere.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a user registration form in my Django application which collects additional data
Ok here goes: I have a SELECT drop down option with US state names
Weird to describe but here goes. I have a table with several rows. One
I'm sure the answer is somehow logical but here goes. I have three big
A slightly archaic question I'm afraid but here goes: I have a program which
Here goes: I have an application that does some processing, writes some result files
Weird question but here goes... I have a webpage and i want to get
Here goes an example of what I have: public class ClassToBeTestedTest { private Mock<IAService>
Here goes newbie question number 5, but I don't have a teacher.. so.. anyhow
Here goes: I have a view that looks like this: public interface IAddressView {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.