feature/rbac permisos y roles implementados
This commit is contained in:
@@ -1,18 +1,22 @@
|
||||
from django.contrib import admin
|
||||
|
||||
from .models import Organizacion
|
||||
# Register your models here.
|
||||
|
||||
|
||||
@admin.register(Organizacion)
|
||||
class OrganizacionAdmin(admin.ModelAdmin):
|
||||
list_display = ('id', 'nombre', 'rfc', 'email', 'telefono', 'is_active', 'is_verified', 'inicia', 'vencimiento')
|
||||
list_display = ('nombre', 'rfc', 'email', 'telefono', 'owner', 'is_active', 'is_verified', 'inicio', 'vencimiento')
|
||||
search_fields = ('nombre', 'rfc', 'email')
|
||||
list_filter = ('is_active', 'is_verified')
|
||||
list_filter = ('is_active', 'is_verified', 'is_agente_aduanal')
|
||||
ordering = ('nombre',)
|
||||
|
||||
# class UsuarioOrganizacionAdmin(admin.ModelAdmin):
|
||||
# list_display = ('id', 'email', 'telefono', 'puesto', 'is_active', 'is_verified')
|
||||
# search_fields = ('email', 'telefono', 'puesto')
|
||||
# list_filter = ('is_active', 'is_verified')
|
||||
# ordering = ('email',)
|
||||
|
||||
admin.site.register(Organizacion)
|
||||
# admin.site.register(UsuarioOrganizacion)
|
||||
autocomplete_fields = ('owner',)
|
||||
readonly_fields = ('created_at', 'updated_at')
|
||||
fieldsets = (
|
||||
(None, {'fields': ('nombre', 'rfc', 'titular', 'licencia')}),
|
||||
('Contacto', {'fields': ('email', 'telefono', 'estado', 'ciudad')}),
|
||||
('Administrador maestro', {'fields': ('owner',)}),
|
||||
('Estado', {'fields': ('is_active', 'is_verified', 'is_agente_aduanal', 'apply_auto_download')}),
|
||||
('Vigencia', {'fields': ('inicio', 'vencimiento')}),
|
||||
('Observaciones', {'fields': ('observaciones',)}),
|
||||
('Auditoría', {'fields': ('created_at', 'updated_at')}),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user