beatonma / django-wm

Automatic Webmention functionality for Django models
https://beatonma.org/webmentions_tester/
GNU General Public License v3.0
12 stars 2 forks source link

Allow `published` to be overridden #24

Closed garrettc closed 2 years ago

garrettc commented 2 years ago

I'm migrating my site over to Wagtail and using django-wm to handle webmentions.

Whilst running the content import I noticed that all the published dates for existing webmentions were set to today, because published is set to auto_now_add=True, which can't be overridden.

There's already a created_at field set in MentionsBaseModel using auto_now_add=True.

This change sets published to timezone.now maintaining existing functionality but allowing the field to be overriden during an import.

beatonma commented 2 years ago

This has been merged and is now available in version 2.2.0. Thank you :)