Hello, I am looking for some feedback on a seemingly simple problem. My advertisement board project have 10+ models, one model per item category (Cars, Pets, Apartments and so on). The common fields (title, seller, location etc.) is defined in "MyAbstractModel" and inherited by all other category models.
So far so good until it comes to rendering the items on the front-page template. Right now I just have 10+ blocks with for-loops in the template, listing the 5 latest items in each category. But I want to the user to be able to specify the order of categories in the front page, and also which ones of the categories that should be shown/hidden. And that is where I am lost. I guess I could have a "profile"-model which specifies the order and visibility for each category, and a decent query filter and order_by should do the trick I think. But for the template I do not know, as the properties are different for each category. Maybe with a for-tag iterating the object list, and if there is a way to figure out exactly what type of object it is use some if-tags display the correct category properties maybe? Any advice is welcome, and please feel free to ask if it seems unclear (my thinking sometimes is hard to explain in words). -A -- 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 django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/54341956.90105%40x76.eu. For more options, visit https://groups.google.com/d/optout.