I'm new to feincms and trying to write an extension, I wrote a very basic one
from __future__ import absolute_import, unicode_literals
from django.db import models
from django.utils.translation import ugettext_lazy as _
from feincms import extensions
class Extension(extensions.Extension):
def handle_model(self):
self.model.add_to_class('excerpt', models.TextField(
_('excerpt'),
blank=True,
help_text=_('Excerpts are good!')))
def handle_modeladmin(self, modeladmin):
modeladmin.add_extension_options(_('Exceprt'), {
'fields': ('excerpt',),
'classes': ('collapse',),
})
to add a text field excerpt, but now I want to write one a bit more complex. I want to allow a single featured image to be added to a page using a process similar to selecting media for a region but I have zero clue how to go about this. Any guidance with this extension would be appreciated!
Thanks!