On Wed, Sep 10, 2008 at 4:31 AM, djandrow <[EMAIL PROTECTED]> wrote:

> I just get 2008-01-01, i guess thats cos I only have entries in 2008
> and the date is formatted wrongly, so my question is how can i get a
> list of months, like you find on any archive links; September 2008,
> October 2008 etc.

Well - the template is printing exactly what you asked it to. You give
it a list of all dates where you have entries, and it prints a single
date - in the default format.

If you want a different list of dates to be printed, then you will
need to pass that list into your view so your template can iterate
over it. Make sure you handle the case where no entries are available,
either by not rendering those dates as links, or making sure that you
have the empty case handled on the view.

As for formatting the date, Django provides filters that can do this:
http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date

> 2. At the moment i've just been testing the generic view in a template
> which does nothing else apart from show archive links, how can I
> incorporate this with my main template (the index page I already have)
> which uses views?

The same way you incorporate any other piece of a Django template -
using {% extends %}

http://docs.djangoproject.com/en/dev/ref/templates/builtins/#extends

Yours
Russ Magee %-)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to