Django Python : adding custom permissions to specific users
问题 Models.py class Meta: permissions = ( ("can_add_data","can add a new data"), ) This is the custom permission I've created in Models.py and I've also created these users. Users in Django Admin ie., http://localhost:8000/admin How do I give permission to specific users so that I can use @permission_required('myapp.can_add_data') in views.py and also where do I write the snippet? (in which file) I'm a beginner at this so if there are any mistakes please let me know. 回答1: You can assign