Closed tyctor closed 5 months ago
Hi @tyctor thank you for the contribution. Can you explain more in detail your use case?
I wonder if your necessity is already covered by the Page detection hook functionality: https://github.com/otto-torino/django-baton?tab=readme-ov-file#page-detection which requires less maintenance, tests and so on...
Let me know, bye!
Hi, @abidibo , thanks for link, I read the documentation carelessly, yes it solves my uses case.
in my opinion, from my point of view as user, is easier to write list of strings into settings, that write javascript code.
but it is only my opinion, maybe i dont see benefits of js solution.
what you think?
Yes, it's easier without doubt. But since the functionality already exists, and also covers more use cases (you can pretend to be in any kind of page type, not just to activate tabs) I would stay with it. Less code means less bugs, less maintenance problems, less tests and so on...
sure, js is more generic
value of ACTIVATE_TABS is list of strings if url contain some of that strings, form tab will be activated on page for example: ACTIVATE_TABS = ["my-page-with-form"] will match url /admin/my-page-with-form/