scratch #
staticfiles app #
各个应用的静态文件放到一个地方,方便 serve。
- collectstatic: 将静态文件放到 STATIC_ROOT
- findstatic
- runserver
change superuser password #
https://stackoverflow.com/a/57272959/420734
python manage.py changepassword <username>
from django.contrib.auth import get_user_model
User = get_user_model()
user = User.objects.get(username='admin@example.com')
user.set_password('new password')
user.save()
exit()