Fakultas Ilmu Komputer UI

Commit df036e88 authored by Nabila Febri Viola's avatar Nabila Febri Viola
Browse files

[REFACTOR] Customize artikel admin

parent 4e995df1
from django.contrib import admin
from django.conf import settings
from edukasi.models import Artikel
@admin.register(Artikel)
class ArtikelAdmin(admin.ModelAdmin):
pass
list_display = ('title', 'posted_at')
search_fields = ('posted_at', 'title')
fields = ('posted_at', 'title', 'featured_image', 'content')
readonly_fields = ('posted_at',)
class Media:
js = [settings.MEDIA_URL+'/js/artikel_custom_admin.js', ]
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment