On Tue, 2020-09-08 at 18:01 -0700, Damiano Porta wrote:
> Hello everybody!Can I use Pendolumn (https://pendulum.eustace.io/) as
> default datetime library for my models?

You probably want to  write a custom DateTimeField subclass and
override to_python(). Pendolumn date times claim to be stdlib datetimes
(eg the doc says instance(pendulom_datetime-obj, datetime.datetime) is
True ) so conversion the other way may work fine with the existing
DateTimeField code.

See here: 
https://docs.djangoproject.com/en/3.1/howto/custom-model-fields/#converting-values-to-python-objects

Nb: This is probably a question for the django-users list not the
django-developers list.

-- 
Roger Gammans <rgamm...@gammascience.co.uk>
Gamma Science Ltd. (GB Nr. 07356014 )

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/0874de593ac3d4cdd79a8314dd2af302db31532d.camel%40gammascience.co.uk.

Reply via email to