Error in compat.py

10 views
Skip to first unread message

Cromulent

unread,
Apr 24, 2012, 12:23:55 PM4/24/12
to Django FeinCMS
I'm getting an error in compat.py on this block:

try:
from django.utils.timezone import now as compatible_now
except ImportError:
# Django < 1.4 comes without timezone support
from datetime.datetime import now as compatible_now

I'm on Django 1.3. So its the 2nd import that isn't working. Basically
datetime.datetime is a class not a module and there is nothing from it
you can import.

What I don't understand is that this worked just fine on my host
(hostgator) over the weekend. But sometime yesterday it stopped
working.

Marc Tamlyn

unread,
Apr 24, 2012, 12:37:38 PM4/24/12
to django-...@googlegroups.com
This code should fix it: 

>>> from datetime import datetime
>>> compatible_now = datetime.now

M


--
You received this message because you are subscribed to the Google Groups "Django FeinCMS" group.
To post to this group, send email to django-...@googlegroups.com.
To unsubscribe from this group, send email to django-feincm...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-feincms?hl=en.


Marc Tamlyn

unread,
Apr 24, 2012, 12:44:03 PM4/24/12
to django-...@googlegroups.com
Hmm. Was looking for this code to fix it in a pull req on github but can't see it. What version of Fein are you on?

M

Cromulent

unread,
Apr 24, 2012, 12:48:11 PM4/24/12
to Django FeinCMS
I've been trying to get elephantblog to work. I ran into an eb page
that said the "next" branch of feincms should be used. I didn't do
that originally so I thought maybe that would fix my problems. It
didn't.

Simon Bächler

unread,
Apr 25, 2012, 2:13:33 AM4/25/12
to django-...@googlegroups.com
I've just updated the docs. Elephantblog requires FeinCMS version 1.5 which is now in the master branch.

Regards
Simon

Matthias Kestenholz

unread,
Apr 25, 2012, 2:29:10 AM4/25/12
to django-...@googlegroups.com
On Tue, Apr 24, 2012 at 18:44, Marc Tamlyn <marc....@gmail.com> wrote:
> Hmm. Was looking for this code to fix it in a pull req on github but can't
> see it. What version of Fein are you on?
>

I fixed this right away (with attribution and everything) but got
distracted by a telephone call before writing this mail, and
completely forgot about it afterwards.

It's fixed here:
https://github.com/feincms/feincms/commit/ea75cb3f5dfca8dce48664f9a996b78a30d8d6f7

But as Simon Bächler wrote, you don't need the next branch of FeinCMS
anymore -- this was the case before the FeinCMS v1.5 release.


Thanks,
Matthias

Reply all
Reply to author
Forward
0 new messages