Django project looking for “attribute '_session_cache'”

前端 未结 4 793
暗喜
暗喜 2020-12-20 14:58

So I have a Django project that doesn\'t use a database (the \'DATABASES\' setting is commented out). I chose to use Django as there\'s a chance I will need the database fun

4条回答
  •  既然无缘
    2020-12-20 15:55

    Here is what worked for me. Since there is no databases in your application. Admin page looks for the database be it default. So first lets create the default databases.

    Shut down your servers and run

    python manage.py makemigrations
    python manage.py migrate
    

    Now create the admin or superuser for your application. Fill username and password.

    python manage.py createsuperuser
    

    Now restart your server and go the admin page

    python manage.py runserver
    

提交回复
热议问题