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 8836001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:23:31+00:00 2026-06-14T09:23:31+00:00

I did what the django tutorial said, but i still couldn’t log in the

  • 0

I did what the django tutorial said, but i still couldn’t log in the localhost:8000/admin/
using the user I created. I check the database, there is no username ‘admin’.
I created the user by :

from django.contrib.auth.models import User
u = User.objects.get(username__exact='john')
u.set_password('new password')
u.save()

Can anyone helps me ? please.

  • 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-06-14T09:23:32+00:00Added an answer on June 14, 2026 at 9:23 am

    syncdb in general creates/updates the database, so from your statement:

    I check the database, there is no username ‘admin’

    I understand you must have somehow created your database. The first time you run syncdb you will be asked to create a super user. Right there you should insert your credentials.

    However, if you lost this part you could later on use the django shell:

    python manage.py shell
    

    This will open a python shell with your django environment loaded. In that shell create the admin user as follows:

    from django.contrib.auth.models import User
    u = User(username='admin', is_superuser=True, is_staff=True)
    u.set_password('admin')
    u.save()
    

    Note that *is_staff* must be true for your new user to be able to login in the admin area
    and *is_superuser* must also be true for the user to have all permissions.

    Then go to localhost:8000/admin/ and login with your new ‘admin’ user.

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

Sidebar

Related Questions

I am doing the Django tutorial, where I created a model, did syncdb, and
I am following the tutorial on the DJango site, which I previsouly did using
I tried to customize django's admin css....but I'm stuck ....i did find a lot
I'm following a Django tutorial and suddenly when I try to access http://127.0.0.1:8000/admin/ it
I just did the django tutorial and I'm trying to develop an app with
I'm using django-transmeta (couldn't get anything else working better with django 1.2.5) which creates
I'm using Django registration. I did all steps to include the application on my
I was trying to implement the poll app tutorial of Django using djangoappengine. Steps
I'm pretty sure I followed the procedures for this tutorial accurately but I'm still
I'm using django 1.4.1 with mysql and timezones enabled. I did a dump data

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.