Blog posts order

9 views
Skip to first unread message

Krzysiek Szczuka

unread,
Mar 21, 2011, 7:27:33 AM3/21/11
to djang...@googlegroups.com
Hi

I'm using one LFC installed by easy_install for few sites..
Where and how can I change the ordering of posts in lfc_blog?
I've changed the Meta and _meta of BlogPost model (in settings.py),
but it didn't help

Thanks!
Krzysiek

--
Regards,
Krzysiek Szczuka

Maciej Wisniowski

unread,
Mar 21, 2011, 5:37:39 PM3/21/11
to djang...@googlegroups.com
> I'm using one LFC installed by easy_install for few sites..
> Where and how can I change the ordering of posts in lfc_blog?
> I've changed the Meta and _meta of BlogPost model (in settings.py),
> but it didn't help
Go to /manage/ page and find your blog. At 'Children' tab (or 'Dzieci'
in Polish) you'll see your posts and their ordering. It should be
possigle to reorder your posts there too.

--
Maciej Wi�niowski
http://natcam.pl

Krzysiek Szczuka

unread,
Mar 22, 2011, 2:25:13 AM3/22/11
to djang...@googlegroups.com
W dniu 21 marca 2011 22:37 użytkownik Maciej Wisniowski
<pigl...@gmail.com> napisał:

> Go to /manage/ page and find your blog. At 'Children' tab (or 'Dzieci' in
> Polish) you'll see your posts and their ordering. It should be possigle to
> reorder your posts there too.

Hi Maciej :)

Yes, I've seen that and I'm using it right now..
But I'd like to order that 'automagically' by creation_date or
publication_date DESC, as it usually is in blogs :)

Thanks any way


--
Pozdrawiam,
Krzysiek Szczuka

Kai Diefenbach

unread,
Mar 22, 2011, 2:58:04 AM3/22/11
to djang...@googlegroups.com
Hi,

Am 22.03.2011 um 07:25 schrieb Krzysiek Szczuka:

Yes, I've seen that and I'm using it right now..
But I'd like to order that 'automagically' by creation_date or
publication_date DESC, as it usually is in blogs :)

This is not possible yet, but planned for one of the next releases.

Kai

--
IQ++
Tel: +49 361 / 6636700
Fax: +49 361 / 6636702
Mail: kai.die...@iqpp.de
Web: http://www.iqpp.de
Skype: kai.diefenbach

Maciej Wisniowski

unread,
Mar 22, 2011, 2:36:51 PM3/22/11
to djang...@googlegroups.com
Not sure if this will work properly (not tested!) but you may try
something like that (in models.py):

from lfc.signals import post_content_added
from lfc.views import _update_positions
from lfc_blog.models import BlogEntry


def reorder_objects(sender, instance, **kwargs):
instance.position = 1
instance.save()
_update_positions(instance, take_parent=True)

post_content_added.connect(reorder_objects, sender=BlogEntry)


--
Maciej Wisniowski
http://natcam.pl

W dniu 22.03.2011 07:58, Kai Diefenbach pisze:


> Hi,
>
> Am 22.03.2011 um 07:25 schrieb Krzysiek Szczuka:
>
>> Yes, I've seen that and I'm using it right now..
>> But I'd like to order that 'automagically' by creation_date or
>> publication_date DESC, as it usually is in blogs :)
>
> This is not possible yet, but planned for one of the next releases.
>
> Kai
>
> --
> IQ++
> Tel: +49 361 / 6636700
> Fax: +49 361 / 6636702

> Mail: kai.die...@iqpp.de <mailto:kai.die...@iqpp.de>
> Web: http://www.iqpp.de <http://iqpp.de/>
> Skype: kai.diefenbach
>

Reply all
Reply to author
Forward
0 new messages