Re: Creating an Archive

2008-09-14 Thread djandrow
I solved this problem, for those who come after me, you can use: Entry.objects.dates('entry_date', 'month', order='DESC') where entry is the name of the table/model and entry_date is the name of the date field. This returns a list of months with objects in. Thanks for everyone's help, Andrew

Re: Creating an Archive

2008-09-12 Thread James Matthews
I would make a script that ran through my database and flagged this as archived (this should be a boolean flag) On Fri, Sep 12, 2008 at 1:33 PM, djandrow <[EMAIL PROTECTED]> wrote: > > Do i need to pass the months into the view using extra_context? > > Andrew > > > --

Re: Creating an Archive

2008-09-12 Thread djandrow
Do i need to pass the months into the view using extra_context? 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

Re: Creating an Archive

2008-09-11 Thread djandrow
Thanks Russ, I'm still abit confused about the first part, I understand it prints 2008-01-01, because its printing the years with entries in them, and 2008 is the only year with entries, but rather than get it to show all the years with entries I want it to show all the months with entries in. I

Re: Creating an Archive

2008-09-11 Thread Russell Keith-Magee
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

Re: Creating an Archive

2008-09-10 Thread djandrow
Can no one help me with either of my questions? I'd really like to this sorted. 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

Creating an Archive

2008-09-09 Thread djandrow
Hello, I currently have a website which I am trying to add an archive to, i currently have the following date based URLs: (r'^$', 'django.views.generic.date_based.archive_index', archive_info), (r'^(?P\d{4})/$', 'django.views.generic.date_based.archive_year', archive_info),

Re: Creating an archive navigation for date_based.archive_month

2007-09-11 Thread Max Romantschuk
> Hope this helps, > Chris It did indeed! I suspected a tag was the way to go, but I hadn't had time to properly introduce myself to writing tags. I shamelessly nicked your code, and now I have what I need: http://max.romantschuk.fi/blog/ (See the left sidebar. Note: DNS just started pointing to

Re: Creating an archive navigation for date_based.archive_month

2007-09-10 Thread Chris Moffitt
Here's how I've done it on my blog. Use this tag (which I pulled from somewhere else on the web)- http://www.satchmoproject.com/trac/browser/satchmoproject.com/satchmo_website/apps/blog/templatetags/month-list.py Here's the template that uses the tag-

Creating an archive navigation for date_based.archive_month

2007-09-10 Thread Max Romantschuk
I'm in the process of porting my site to Django, and I'm wondering how to best implement a monthly archive navigation like in Django's weblog's sidebar: http://www.djangoproject.com/weblog/ I'm using generic views. I basically need the information provided in date_based.archive_year: the months