You can try to create ModelForm:

class YouModelForm(ModelForm)
    class Meta:
         model = YouModel
         fields = ['featured_image', 'other_fields']

in views.py:

def youfunc(request)
    Youform = YouModelForm()

in template.html:

<script src=
"https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js";
></script>
..................................................... You tags 
...................
.....................................................
            {{ Youform.media }}
            {{ Youform.featured_image  }}

This is not full solving. Tell me do You use Modelform for You Model?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1f3ea564-a42b-436b-b66c-f61ba64e2db1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to