Re: How to create a list of months from a date field.

2008-08-31 Thread djandrow

I've added the following to my urls.py, i don't know if they work, my
server only restarts every so often:

 (r'^archive/$', date_based.archive_index, archive_info
{'template_name': 'blog/archive.html'}),
(r'^archive/(?Pd{4})/?$', date_based.archive_year,
archive_info {'template_name': 'blog/archive.html'}),

Do these look about right and how can I can a list of months in
another template, I have a template index html
and a need a list with links for each month something like:

January 2008
Febuary 2008
March 2008

with links to the urls above. I may have misunderstood this whole
thing entirly to be honest.

Regards,

Andrew
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: How to create a list of months from a date field.

2008-08-30 Thread djandrow

I've had alook through http://www.djangoproject.com/documentation/generic_views/
but i'm still not clear on what to do.
I might be being a bit think but could someone explain it to me.

Regards,

Andrew

On Aug 30, 5:59 pm, Dmitry Dzhus <[EMAIL PROTECTED]> wrote:
> djandrow wrote:
> > I understand dynamic urls and templates and things, so i don't need
> > help with that. What i need to know is how can i get a list of months
> > which have entries in them, I'd apperciate any help.
>
> Use generic date-based view (under django.views.generic.date_based.) and
> see `date_list` context variable.
> --
> Happy Hacking.
>
> http://sphinx.net.ru
> む
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: How to create a list of months from a date field.

2008-08-30 Thread Dmitry Dzhus

djandrow wrote:

> I understand dynamic urls and templates and things, so i don't need
> help with that. What i need to know is how can i get a list of months
> which have entries in them, I'd apperciate any help.

Use generic date-based view (under django.views.generic.date_based.) and
see `date_list` context variable.
-- 
Happy Hacking.

http://sphinx.net.ru
む


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



How to create a list of months from a date field.

2008-08-30 Thread djandrow

I'm basically trying to create a standard archive function.

I have the following field in my models:entry_date =
models.DateField(auto_now_add=True)

I understand dynamic urls and templates and things, so i don't need
help with that. What i need to know is how can i get a list of months
which have entries in them, I'd apperciate any help.

Thanks

Andrew
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---