Can't compare offset-naive and offset-aware datetimes when doing a __set__ because of the comparison of types.
Django 1.5.1 uses time-zone-aware datetime objects by default (https://docs.djangoproject.com/en/dev/topics/i18n/timezones/).
You should tell MongoEngine to do the same in the connect call:
mongoengine.connect(db_name, tz_aware=settings.USE_TZ)
Having the same problem here, using django 1.3.3 and pytz.
here is some exact info:
it happens on BaseField class in the __set__ function when the comparison is between a datefield from the instance._data and a datefield with a timezone that comes in with the value variable.
maybe adding a try/except would be a good idea in case something like that happens with other type of fields.
@ncortot thanks it solved my problem.
Fixed in 0.8 branch
Most helpful comment
Django 1.5.1 uses time-zone-aware datetime objects by default (https://docs.djangoproject.com/en/dev/topics/i18n/timezones/).
You should tell MongoEngine to do the same in the
connectcall: