Friday, March 30, 2012

How can I best create a blog that works similarly to Tumblr?

I know the question is kind of poorly phrased. But here goes, I've been working on a blog software and I want to have five distinct post types (in the same way Tumblr does) but I'm having a hard time figuring out how to create my index view and detail views as they are currently five different models that inherit from the same abstract base model.

Here is my models.py http://dpaste.com/724371/
as well as my views.py http://dpaste.com/724372/
and for safe measure, my urls.py within the app http://dpaste.com/724373/

How can I make this work? The current hack of using chain() isn't really working out because of the fact that it returns a list, not a queryset.
All together I feel like my code is quickly becoming unmaintainable but I would really like to know how to get this working as its early enough in the development to change.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/c_lQ-PD0hXwJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment