Skip to content

Commit

Permalink
Customiza listagem de receitas no Django Admin
Browse files Browse the repository at this point in the history
  • Loading branch information
brnocesar committed Nov 8, 2020
1 parent e3bca19 commit cb855da
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion apps/receitas/admin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
from django.contrib import admin
from .models import Receita

admin.site.register(Receita)
class IndexReceita(admin.ModelAdmin):
list_display = ('id', 'nome', 'categoria', 'tempo_preparo')
list_display_links = ('id', 'nome')
search_fields = ('nome',)
list_filter = ('categoria',)
list_per_page = 10

admin.site.register(Receita, IndexReceita)

0 comments on commit cb855da

Please sign in to comment.