danirus / django-comments-xtd

A pluggable Django comments application with thread support, follow-up notifications, mail confirmation, like/dislike flags, moderation, a ReactJS plugin and Bootstrap 5.3.
https://django-comments-xtd.readthedocs.io
BSD 2-Clause "Simplified" License
594 stars 158 forks source link

Version in static files #221

Closed gassan closed 3 years ago

gassan commented 3 years ago

Hi,

since 2 weeks I am using get_version() function for include static files (vendor-plugin, plugin) and with 2.8.0 it breaks.

version in files -> 2.8.0 print(get_version()) -> 2.8

it would be better either modify get_version() function or choose shorter version in JS files if VERSION[2] == 0.

Otherwise we need to edit templates after every update.

Thanks.

danirus commented 3 years ago

Hi @gassan, get_version should return the patch number too. Thanks for reporting it.

mckinly commented 3 years ago

Hi @danirus, I can fix this if you would like.

To be clear https://github.com/danirus/django-comments-xtd/blob/186d7d5c887d5bb06f1efadce18bd51210424de1/django_comments_xtd/__init__.py#L24 is the function that needs updating, richtig?

danirus commented 3 years ago

Yes, @mckinly, that's the one. Could you create a unit test for that too?

mckinly commented 3 years ago

Yes, @mckinly, that's the one. Could you create a unit test for that too?

absolutely!

mckinly commented 3 years ago

@danirus I have a fix for that function and the associated tests on a branch, however I do not seem to have permission to push my branch.

git push --set-upstream origin issue-221
ERROR: Permission to danirus/django-comments-xtd.git denied to mckinly.
fatal: Could not read from remote repository.

Any suggestions?

gassan commented 3 years ago

You have to push your work to your own (cloned from this one) repository and then send a pull request to author.