Skip to content

Instantly share code, notes, and snippets.

@aballah-chamakh
Last active July 14, 2019 07:50
Show Gist options
  • Select an option

  • Save aballah-chamakh/db5816c89fc44a34797c1fc7c25b4f9f to your computer and use it in GitHub Desktop.

Select an option

Save aballah-chamakh/db5816c89fc44a34797c1fc7c25b4f9f to your computer and use it in GitHub Desktop.
from .models import Lecture,PlayList
class InLineLecture(admin.TabularInline):
model = Lecture
class PlayListAdmin(admin.ModelAdmin):
inlines = [InLineLecture]
list_display = ('title','slug')
admin.site.register(Lecture)
admin.site.register(PlayList,PlayListAdmin)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment