Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

django admin.py

from django.contrib import admin
from .models import Message, Channel, Profile

@admin.register(Channel)
class ChannelAdmin(admin.ModelAdmin):
    list_display = ('title', 'desc')
    prepopulated_fields = {'slug':('title',) }
Source by docs.djangoproject.com #
 
PREVIOUS NEXT
Tagged: #django
ADD COMMENT
Topic
Name
1+6 =