Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
458 B
1
Indexable
Never
from django.contrib import admin
from django import forms
from yogavidya.apps.articles.models import Article 
from yogavidya.apps.articles.forms import ArticleModelForm 
from ckeditor.widgets import CKEditorWidget
 
 
class ArticleAdmin(admin.ModelAdmin):
	content = forms.CharField(widget=CKEditorWidget())
	form = ArticleModelForm
	prepopulated_fields = {'slug': ('title',), }
	class Meta:
		model = Article

 
admin.site.register(Article, ArticleAdmin)