django-fluent / django-fluent-contents

A widget engine to display various content on Django pages
http://django-fluent.org/
Apache License 2.0
149 stars 39 forks source link

How to use this on the predefined model ? #87

Closed guganselvaraj closed 7 years ago

guganselvaraj commented 7 years ago

I want to view a "doc" file in the browser, which is already been stored in the document model in my custom django application. How to do this using django-fluent-contents ? Im a fresher to django ! i followed all the steps that are given but somehow not able to get it ! please throw some light on this !?

vdboor commented 7 years ago

You can create a plugin that holds a ForeignKey to the model in your Django project. Something like this:

class DocumentItem(ContentItem):
    document = models.ForeignKey(Document)