Mudanza de repo
This commit is contained in:
29
api/record/admin.py
Normal file
29
api/record/admin.py
Normal file
@@ -0,0 +1,29 @@
|
||||
from django.contrib import admin
|
||||
from .models import Document, DocumentType, Fuente
|
||||
|
||||
# Register your models here.
|
||||
|
||||
class DocumentAdmin(admin.ModelAdmin):
|
||||
model = Document
|
||||
list_display = ('id', 'pedimento', 'archivo', 'size', 'extension', 'created_at', 'updated_at')
|
||||
search_fields = ('pedimento.pedimento', 'archivo')
|
||||
list_filter = ('created_at', 'updated_at')
|
||||
|
||||
class DocumentTypeAdmin(admin.ModelAdmin):
|
||||
model = DocumentType
|
||||
list_display = ('id', 'nombre', 'descripcion')
|
||||
search_fields = ('nombre',)
|
||||
ordering = ('nombre',)
|
||||
|
||||
|
||||
class FuenteAdmin(admin.ModelAdmin):
|
||||
model = Fuente
|
||||
list_display = ('id', 'nombre', 'descripcion')
|
||||
search_fields = ('nombre',)
|
||||
ordering = ('nombre',)
|
||||
|
||||
|
||||
|
||||
admin.site.register(Document, DocumentAdmin)
|
||||
admin.site.register(DocumentType, DocumentTypeAdmin)
|
||||
admin.site.register(Fuente, FuenteAdmin)
|
||||
Reference in New Issue
Block a user