我正在寻找有关如何正确配置数据库权限以保护 Django 应用程序的链接或答案?需要明确的是,我专门寻找处理数据库授权的 Material ,而不是 Django 框架本身内的权限。
最佳答案
来自 django 文档:
https://docs.djangoproject.com/en/dev/topics/install/
If you plan to use Django’s manage.py syncdb command to automatically create database tables for your models (after first installing Django and creating a project), you’ll need to ensure that Django has permission to create and alter tables in the database you’re using; if you plan to manually create the tables, you can simply grant Django SELECT, INSERT, UPDATE and DELETE permissions. On some databases, Django will need ALTER TABLE privileges during syncdb but won’t issue ALTER TABLE statements on a table once syncdb has created it. After creating a database user with these permissions, you’ll specify the details in your project’s settings file, see DATABASES for details.
关于database - 如何为 Django 应用程序配置数据库权限?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2322759/