Skip to content

Conversation

philgyford
Copy link

Some fixes to get this working on Wagtail 2 (I'm using Wagtail 2.4 and Django 2.1).

  • Fix imports that broke from Django 2.0+ (the fixes should still work with older versions of Django)
  • Fix imports that broke from Wagtail 2.0+ (same)
  • Replace broken use of gravatar template tag (which is not included) with xtd_comment_gravtar_url
  • Fix layout of avatars in Wagtail admin (they were too big for current Wagtail)

Also:

  • Allow the use of a custom django-comments-xtd comment model using the COMMENTS_XTD_MODEL setting
  • Use relative dates for the list of comments in Wagtail admin, to be consistent with other admin lists

No longer present from Django 2.0
So it should still work for those using Wagtail < 2.0 as well as those
on Wagtail 2.0+
Instead of importing `django_comments_xtd.models.XtdComment`, use
the `django_comments_xtd.get_model()` method to get the model instead.
The `comments/_list_explore.html` tried to load `gravtar` template
tags which do not exist, unless they're installed/created separately.

Now use the [`xtd_comment_gravatar_url`](https://django-comments-xtd.readthedocs.io/en/latest/templatetags.html?highlight=template%20tags#filter-xtd-comment-gravatar-url) that's
build into django-comments-xtd instead.
To be consistent with other Wagtail admin pages
@philgyford
Copy link
Author

This continues to work with Wagtail 2.5 and Django 2.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant