django-hitcount icon indicating copy to clipboard operation
django-hitcount copied to clipboard

making the object_pk use uuid throws ProgrammingError error.

Open Aneemes opened this issue 1 year ago • 0 comments

I had a project based on django 1.11 which had been using the https://github.com/Pustakalaya/django-hitcount, which is a modification of django-hitcount to support uuid. Since I migrated it to django 3.2.5, I tried doing the modification to the code as before which is on https://github.com/Aneemes/django-hitcount.git, but this one hasn't been reading the ip addresses of hits, its just using the default 10.0.0.1 for every hit. I also tried to make a new custom hitcount model and then gave that in the settings as mentioned here, it throws a programming error: django.db.utils.ProgrammingError: foreign key constraint "hitcount_hit_hitcount_id_b7971910_fk_hitcount_" cannot be implemented DETAIL: Key columns "hitcount_id" and "object_pk" are of incompatible types: uuid and character varying. Doing this might cause loss of previously stored data as well. Python version - 3.6

Aneemes avatar Dec 13 '23 05:12 Aneemes