I have a Django model whose fields are read-only, populated from a database.
I have found that the admin interface is a great way to visualize my data, but whenever I try using it, I run into a problem: It seems to require write access to the database, which I don't have.
(ie it tries to create tables called auth_user
, django_session
, etc. in the read-only database... I managed to disable the latter but can't disable the former.)
How do I use the admin interface with read-only access?
How do I make a temporary database (hopefully in memory, or on disk if necessary) to make it happy?
I figured out how to do this:
:memory:
as the database) for the internal data
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.