I just got started with Django and not before long I was thinking the
same as you. So I wrote this blog post:
http://overtag.dk/wordpress/2008/07/tip-extending-django-flatpages/
It's really simple, but quite a valuable technique, I think. The main
idea is: Instead of extending the original
I need to add some fields to flatpage model. (like header image)
is there a clean way to do this?
I saw it come up before, and one comment was "model subclassing is not
supported." So now that it is supported... I am going to learn that it wont
help me with this problem?
Carl K
Malcom is right, they're not as bad as they sound. :-)
In the case of the two things you mentioned wanting, latest news and a
calendar, the following existing template tags may just hook you up:
James Bennett's get_latest__ is copy-and-paste-able and works very
well. I use a slightly modified
Or you might also want to check out Generic Content Tags:
http://code.google.com/p/django-template-utils/wiki/GenericContentTags
Part of the Django template utils that James put together:
http://code.google.com/p/django-template-utils/
-Michael
On Jun 3, 1:14 pm, Malcolm Tredinnick <[EMAIL
On Sat, 2007-06-02 at 14:54 -0700, [EMAIL PROTECTED] wrote:
> Oh no, that can not be! I just read this "Writing your own template
> tags", it is quite complicated. Isn't there another way? Something
> like "While you fetch the text for the flatpage, check the view
> 'random_testemonial' and then
Oh no, that can not be! I just read this "Writing your own template
tags", it is quite complicated. Isn't there another way? Something
like "While you fetch the text for the flatpage, check the view
'random_testemonial' and then go render the template."
If that's really the only way I will
Hi All.
I have got a question about flatpages. Supposed I have a "static" page
that says how great my product is, I could use a flatpage for this. No
Problem. But if I want to have something like a random quote or
testimonial on that page too, is that possible?
As said in the docs
7 matches
Mail list logo