Hello All, I've recently been working through the tutorial for a simple web app in django. I'm having an issue accessing the admin app on the web. Since deploying the app via DigitalOcean I have created a new superuser but when I attempt to log in to /admin I get the following error:
OperationalError at /admin/ attempt to write a readonly database Request Method: POST Request URL: http://192.241.161.80/admin/ Django Version: 1.6.1 Exception Type: OperationalError Exception Value: attempt to write a readonly database Exception Location: /usr/lib/python2.7/dist-packages/django/db/backends/sqlite3/base.py in execute, line 450 Python Executable: /usr/bin/python Python Version: 2.7.6 Python Path: ['/home/django/django_project', '/home/django', '/usr/bin', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages'] Server time: Mon, 18 Apr 2016 22:52:13 +0000
http://dpaste.com/37A7N0Q
Is this a common issue to run into or have I completely misconfigured something? I've read that it isn't practical to use sqlite3, is this the main reason I'm having this issue? Thanks a lot for any and all feedback!
You must be logged in to post. Please login or register an account.
After some debugging, FrOyxx figured out that the django user on the server didn't have write access to the database (since it was created by the root user). To fix:
chown django:django db.sqlite3
-Harrison 9 years ago
You must be logged in to post. Please login or register an account.