Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use tomselect #421

Closed
wants to merge 7 commits into from
Closed

Use tomselect #421

wants to merge 7 commits into from

Conversation

frcroth
Copy link
Contributor

@frcroth frcroth commented Nov 9, 2023

Fixes #411 and fixes #336

@coveralls
Copy link

coveralls commented Nov 9, 2023

Pull Request Test Coverage Report for Build 6817115265

  • 2 of 2 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.02%) to 74.719%

Totals Coverage Status
Change from base Build 6814675352: -0.02%
Covered Lines: 1262
Relevant Lines: 1689

💛 - Coveralls

Copy link
Contributor

@jeriox jeriox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!
Could you use the display name of the user instead of the username as the label field? otherwise we need to change that again with the upcoming keycloak migration as the username will be the UUID from the OIDC sub claim in the future

@frcroth frcroth requested a review from jeriox November 21, 2023 19:21
@@ -22,6 +23,36 @@
from myhpi.core.widgets import AttachmentSelectWidget


class UserProfile(models.Model):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally don't really like the proxy models and generally prefer substituting the user model as a whole. However, this seems to be a bit tricky for existing projects (https://docs.djangoproject.com/en/4.2/topics/auth/customizing/#changing-to-a-custom-user-model-mid-project).

Copy link
Contributor

@jeriox jeriox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

currently blocked as we cannot use first+last name as label

@frcroth
Copy link
Contributor Author

frcroth commented Feb 15, 2024

Also created an issue for that: OmenApps/django-tomselect#7

@jeriox
Copy link
Contributor

jeriox commented Jul 31, 2024

we looked at the code of django-tomselect and it turns out that they pass the label field name to their own js code, where it is templated to access the data in some js object. so calling a function/property on the python model is definetly not possible and using a composite label also seems quite hard. I'd vote to abandon the tomselect plan

@frcroth
Copy link
Contributor Author

frcroth commented Aug 1, 2024

Yes, can be closed if and until there is a response to the issue

@frcroth frcroth closed this Aug 1, 2024
@frcroth
Copy link
Contributor Author

frcroth commented Dec 18, 2024

There has been a response: OmenApps/django-tomselect#7 (comment)

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

Successfully merging this pull request may close these issues.

Use tomselect instead of select2 Use select2 widget for author and moderator of minutes
3 participants