Django admin form fields not showing

Question:

Created a class in the models.py file:

class Useful(models.Model):
    pub_date = models.DateTimeField(default=datetime.datetime.now, verbose_name=u'Дата публикации')
    slug = models.CharField(max_length=50, verbose_name=u'URL')
    title = models.CharField(max_length=300, verbose_name=u'Заголовок')
    text = RichTextField(config_name='htmld')
    short = RichTextField(config_name='htmld', verbose_name=u'Коротко', blank=True, null=True)

    def __unicode__(self):
        return self.title

    class Meta:
        verbose_name=u'статью'
        verbose_name_plural=u'полезная информация'

Registered in the admin.py file:

class UsefulAdmin(FrontendEditableAdminMixin, admin.ModelAdmin):
    list_display = ('title', 'pub_date', 'short')
    fields = ['pub_date', 'slug', 'title', 'text', 'short']
    prepopulated_fields = {"slug": ("title",)}

    # Specify name of sortable property
    sortable = 'order'

admin.site.register(Useful, UsefulAdmin)

A section Useful information has appeared in the admin panel, but I cannot add a new entry. There are no fields. Tell me what could be the problem?

Answer:

Try to remove inheritance from FrontendEditableAdminMixin

Scroll to Top