Re: [pyblosxom-devel] mtimes do not appear to hide future entries on pyblosxom-1.5rc3
Mark David Dumlao <[email protected]> Mon, 29 Aug 2011 00:48:51 +0800
| Newsgroups | gmane.comp.web.pyblosxom.devel |
|---|---|
| Message-ID | <CAG2nJkMAJaZNLMqQhGfcF=V2H-TG4HadNSyLOuPY4mr2jeUU1Q@mail.gmail.com> |
Hi,
After re-reading the docs and the mailing list, it appears to me that
my understanding regarding future mtimes was wrong.
However, I do think it's a big convenience to write articles dated in
the future, so I looked into writing a callback for filtering mtime.
Is this an okay way to handle future mtimes?
<snip>
import datetime
from datetime import datetime
def cb_prepare(args):
request =3D args["request"]
data =3D request.get_data()
now =3D datetime.now().timetuple()
data["entry_list"] =3D filter(lambda e: not e['timetuple'] > now,
data["entry_list"])
</snip>
On Sun, Aug 28, 2011 at 11:15 PM, Mark David Dumlao <[email protected]> wr=
ote:
> Hi!
> I'm new to pyblosxom and I would like some clarification as to how mtimes=
work.
>
> As best as I understand, entries with an mtime later than today should
> not be displayed, whereas mtimes older than today should be displayed
> by the blog in decreasing order of date.
>
> Is this a correct understanding? If not, how can I help to make this
> happen, and in the meantime, what is the best way for me to write
> entries well in advance of their publish date?
> --
> This email is:=A0 =A0 [x] actionable=A0=A0 [ ] fyi=A0 =A0 =A0 =A0 [x] soc=
ial
> Response needed:=A0 [x] yes=A0 =A0 =A0 =A0 =A0 [ ] up to you=A0 [ ] no
> Time-sensitive:=A0=A0 [ ] immediate=A0 =A0 [x] soon=A0 =A0 =A0=A0 [ ] none
>
-- =
This email is:=A0 =A0 [ ] actionable=A0=A0 [ ] fyi=A0 =A0 =A0 =A0 [ ] social
Response needed:=A0 [ ] yes=A0 =A0 =A0 =A0 =A0 [ ] up to you=A0 [ ] no
Time-sensitive:=A0=A0 [ ] immediate=A0 =A0 [ ] soon=A0 =A0 =A0=A0 [ ] none
---------------------------------------------------------------------------=
---
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management =
Up to 160% more powerful than alternatives and 25% more efficient. =
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev