For a project involving many kinds of content (photos, audio, text, polls, etc.) I have been trying to come up with a way to display any kind of content in any place on the front page. What this means is that, through the admin interface, I can specify the object (be it any kind of content) to be placed at a particular location on the front page, and it will be displayed properly.
My question involves where the code should lie that handles the displaying of the widget (which can hold any kind of content). I know that it shouldn't be tied to the model, in that an object shouldn't have a displayMe() method. But should there be some complicated if logic in the template which handles each type case-by-case? Should I use a filter to convert an object into something that can be displayed? a template tag? or should I somehow use a view to handle this? There could be an included template to display each type separately (one for audio, one for text, etc) but from where should they be called and rendered? I am kind of looking for a best practice in this case, because any of the above solutions are likely to work, but I don't know which one would be the most Django. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---