-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to forbid change_permission and delete_permission... #180
Comments
你解决问题了吗?我也想把这个权限给删掉。同用simpleui,还有一个问题就是这个Django APScheduler没有图标的问题,你有尝试过给它们加图标上去吗? Did you solve the problem? I'd like to get rid of that, too. Another problem with simpleui is that this Django APScheduler doesn't have an icon. Have you tried to add an icon to it? |
我认为可能无效的原因是因为,单单的继承是无效的?需要子类 而且,如果简单继承,然后使用 @admin.register(DjangoJob)
class CustomDjangoJobAdmin(DjangoJobAdmin):
pass 会产生 And the reason why I think it might not work is because inheritance alone is not working, right? I need to subclass Also, if you simply inherit, then register with '@admin.register(DjangoJob)', as shown in the following code: @admin.register(DjangoJob)
class CustomDjangoJobAdmin(DjangoJobAdmin):
pass Creates a |
make app load this code from django_apscheduler.admin import DjangoJobAdmin, DjangoJobExecutionAdmin
def always_false(*args, **kwargs):
return False
DjangoJobAdmin.has_add_permission = always_false
DjangoJobAdmin.has_change_permission = always_false
DjangoJobAdmin.has_delete_permission = always_false
DjangoJobExecutionAdmin.has_add_permission = always_false
DjangoJobExecutionAdmin.has_change_permission = always_false
DjangoJobExecutionAdmin.has_delete_permission = always_false |
i hope forbidden ( change, delete,add) permission
admin.py:
extended django-apscheduler/admin.py DjangoJobExecutionAdmin,but not effect,alse i18n also not effect
version:
django_apscheduler==0.6.2
Django==4.1.5
The text was updated successfully, but these errors were encountered: