1

I am pretty new to Django and Python. I am using Pycharm as my IDE (may not be relevant to my question). I am working on existing code. The previous programmer has developed the basic framework. He has created admin page. When I run django server using manage.py I use the following url to login:

127.0.0.1:8000/admin/login/?next=/admin/ 

Where can I find the credentials for this page? Is this generic or somewhere in a settings file?

1
  • 1
    it is not in the settings. it needs to be created, as suggested in the answer. Commented Oct 5, 2014 at 17:48

2 Answers 2

5

in your console you can create a user:

python manage.py createsuperuser

https://docs.djangoproject.com/en/dev/ref/django-admin/#django-admin-createsuperuser

Sign up to request clarification or add additional context in comments.

Comments

0
  • I had to log in to the admin view with the same url: 127.0.0.1:8000/admin/login/?next=/admin/ and the view did not had the basic nice looking Django interface what it normally has in 127.0.0.1:8000/admin/

  • After switching the local bootstrap files

<script src="{% static 'public/js/jquery/jquery.min.js' %}"></script> <script src="{% static 'public/js/popper/popper.min.js' %}"></script> <script src="{% static 'public/js/bootstrap/bootstrap.min.js' %}"></script> 
  • to URL based files
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous"> <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script> 
  • You have to do the following in terminal
python3 manage.py collectstatic python3 manage.py makemigrations python3 manage.py migrate 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.