Skip to content

Commit

Permalink
Adiciona edição de campo na listagem do DJango Admin
Browse files Browse the repository at this point in the history
  • Loading branch information
brnocesar committed Nov 8, 2020
1 parent ad40637 commit c1eddb8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/receitas/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
from .models import Receita

class IndexReceita(admin.ModelAdmin):
list_display = ('id', 'nome', 'categoria', 'tempo_preparo')
list_display = ('id', 'nome', 'categoria', 'tempo_preparo', 'publicada', 'pessoa')
list_display_links = ('id', 'nome')
search_fields = ('nome',)
list_filter = ('categoria',)
list_editable = ('publicada',)
list_per_page = 10

admin.site.register(Receita, IndexReceita)

0 comments on commit c1eddb8

Please sign in to comment.