본문으로 바로가기

django admin 패스워드 변경 + 제목(header) 변경

category Python 2019. 12. 11. 16:10
# python manage.py shell

Type "help", "copyright", "credits" or "license" for more information.

(InteractiveConsole)

>>> from django.contrib.auth.models import User

>>> User.objects.filter(is_superuser=True)

[<User: admin>]

>>>

>>>

>>> usr = User.objects.get(username='admin')

>>> usr.set_password('1234!@#')

>>> usr.save()

>>>

 

 

from django.contrib import admin

admin.site.site_header = 'My project'                    # default: "Django Administration"
admin.site.index_title = 'Features area'                 # default: "Site administration"
admin.site.site_title = 'HTML title from adminsitration' # default: "Django site admin"