Created
July 14, 2019 07:28
-
-
Save aballah-chamakh/5c6f7e5b195c209943496c684b003304 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from django.contrib import admin | |
| from .models import Lecture | |
| class LectureAdmin(admin.ModelAdmin): | |
| list_display = ('title','slug','video_url','description_length') | |
| list_display_link = ('slug') | |
| iist_diplay_editable = ('title','video_url') | |
| list_display_filter = ('title') | |
| list_display_search = ('title','description') | |
| def description_length(self,obj) : | |
| return len(self.obj.description) | |
| admin.site.register(Lecture,LectureAdmin) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment