This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db.models.signals import post_syncdb | |
from django.contrib.contenttypes.models import ContentType | |
from django.contrib.auth.models import Permission | |
def add_view_permissions(sender, **kwargs): | |
""" | |
This syncdb hooks takes care of adding a view permission too all our | |
content types. | |
""" | |
# for each of our content types |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db.models.signals import post_syncdb | |
from django.contrib.contenttypes.models import ContentType | |
from django.contrib.auth.models import Permission | |
def add_view_permissions(sender, **kwargs): | |
""" | |
This syncdb hooks takes care of adding a view permission too all our | |
content types. | |
""" | |
# for each of our content types |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Administrador con permisos para consulta(view) | |
Es una clase que extiende de admin.ModelAdmin y se utilizar para integrar | |
el admin con permiso de consulta. | |
Hay que integrarlo con el script que agrega a todos los modelos el permiso | |
de consulta(view): | |
https://gist.github.com/nicpottier/880901 |