current setup doesn't work, new or with Wagtail
Hi, very interested in this project, but out of the gate, it didn't work.
Standalone
pip install puput
django-admin startproject mysite .
python manage.py migrate
this works, however, starting the puput instructions from https://puput.readthedocs.io/en/latest/setup.html#standalone-blog-app
Adding this to the end of mysite/settings.py
from puput import PUPUT_APPS
INSTALLED_APPS += PUPUT_APPS
Then trying to run
python manage.py migrate
Yields the error
(puput) jmatthew@PS18-4JXLYW3:~/development/wagtail/puput$ python manage.py migrate
Traceback (most recent call last):
File "/home/jmatthew/development/wagtail/puput/manage.py", line 22, in <module>
main()
File "/home/jmatthew/development/wagtail/puput/manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/home/jmatthew/.local/share/virtualenvs/puput-DYqn5cEE/lib/python3.10/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
utility.execute()
File "/home/jmatthew/.local/share/virtualenvs/puput-DYqn5cEE/lib/python3.10/site-packages/django/core/management/__init__.py", line 416, in execute
django.setup()
File "/home/jmatthew/.local/share/virtualenvs/puput-DYqn5cEE/lib/python3.10/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/jmatthew/.local/share/virtualenvs/puput-DYqn5cEE/lib/python3.10/site-packages/django/apps/registry.py", line 116, in populate
app_config.import_models()
File "/home/jmatthew/.local/share/virtualenvs/puput-DYqn5cEE/lib/python3.10/site-packages/django/apps/config.py", line 269, in import_models
self.models_module = import_module(models_module_name)
File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/home/jmatthew/.local/share/virtualenvs/puput-DYqn5cEE/lib/python3.10/site-packages/wagtail/admin/models.py", line 4, in <module>
from taggit.models import Tag
File "/home/jmatthew/.local/share/virtualenvs/puput-DYqn5cEE/lib/python3.10/site-packages/taggit/models.py", line 185, in <module>
class TaggedItem(GenericTaggedItemBase, TaggedItemBase):
File "/home/jmatthew/.local/share/virtualenvs/puput-DYqn5cEE/lib/python3.10/site-packages/django/db/models/base.py", line 143, in __new__
new_class.add_to_class("_meta", Options(meta, app_label))
File "/home/jmatthew/.local/share/virtualenvs/puput-DYqn5cEE/lib/python3.10/site-packages/django/db/models/base.py", line 371, in add_to_class
value.contribute_to_class(cls, name)
File "/home/jmatthew/.local/share/virtualenvs/puput-DYqn5cEE/lib/python3.10/site-packages/django/db/models/options.py", line 220, in contribute_to_class
raise TypeError(
TypeError: 'class Meta' got invalid attribute(s): index_together
(puput) jmatthew@PS18-4JXLYW3:~/development/wagtail/puput$
Looks like the taggit library is back reved and isn't compatible?
Getting the same issue, came to the same conclusion.
The version of taggit required by this package is quite old and not compatible with Django 5.1 due to: "The model’s Meta.index_together option is removed."
This project depends on Taggit 4.0.0, which uses the offending index_together line. However Taggit 6.0.0 now exists!
It looks like Django 4.2 had some ability to smooth this over but it doesn't do anything for me in this instance - actually raises this exact error!
Further info to add:
and then upon forcing pip to install
django-taggit>5.0.0 to gave me this error/warning:
So despite setup.py specifying taggit>5.0 it apparently also requires taggit <4.1?? Either I'm drunk, Pip's drunk, or something very funky is happening in these requirements. Things seem to be working OK with taggit 6.1.0 however!
So despite setup.py specifying taggit>5.0 it apparently also requires taggit <4.1?? Either I'm drunk, Pip's drunk, or something very funky is happening in these requirements. Things seem to be working OK with taggit 6.1.0 however!
Well, I guess we're drinking the same stuff.
Thanks for the taggit 6.x tip
Hello, Sorry for the late response. The taggit issue has been solved by @amandacastilla at https://github.com/APSL/puput/pull/301