mirror of https://github.com/interlegis/sapl.git
Eduardo Calil
8 years ago
1 changed files with 17 additions and 0 deletions
@ -1,3 +1,20 @@ |
|||
from django.contrib import admin |
|||
from sapl.materia.models import Proposicao |
|||
from sapl.settings import DEBUG |
|||
from sapl.utils import register_all_models_in_admin |
|||
|
|||
register_all_models_in_admin(__name__) |
|||
|
|||
DEBUG = False |
|||
if not DEBUG: |
|||
|
|||
admin.site.unregister(Proposicao) |
|||
|
|||
class ProposicaoAdmin(admin.ModelAdmin): |
|||
def has_change_permission(self, request, obj=None): |
|||
return False |
|||
|
|||
def has_delete_permission(self, request, obj=None): |
|||
return False |
|||
|
|||
admin.site.register(Proposicao, ProposicaoAdmin) |
|||
|
Loading…
Reference in new issue