-
Notifications
You must be signed in to change notification settings - Fork 1
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
Jlc/extende usersupport admin #230
Conversation
a1ebb76
to
7ec0738
Compare
This admin user adds: - national_id from extra_info instance in list_display - search by national_id chore
This reverts commit d69741b.
7ec0738
to
2d14a9e
Compare
eox_nelp/admin/user.py
Outdated
list_display = SupportUserAdmin.list_display[:2] + ('user_national_id',) + SupportUserAdmin.list_display[2:] | ||
search_fields = SupportUserAdmin.search_fields + ('extrainfo__national_id',) | ||
fieldsets = SupportUserAdmin.fieldsets + ( | ||
('Extra info Fields', {'fields': ('user_national_id',)}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you include this in the personal info section ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why you dont want to split to extra info fields. Here could be first_arabic_name, or is_phone_validated.
That fields belongs to extra_info model. So they should go to that table or admin model to check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This kind of classification just makes sense for us, for someone who doesn't know about tables or models this could be more confusing, on the other hand, if the purpose is to facilitate the navigation to extra info table, don't add a national id, add a link to the instance, anyway, if you consider that is too hard or that you have to copy the whole Personal info, to achieve that, please keep this way
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Screencast from 05-11-24 11:48:23.webm
I like the inline option =)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can simplify this file, basically the new model only has effects if eox-support is installed
so if you move this condition if find_spec('eox_support') and 'eox_support.apps.EoxSupportConfig' in settings.INSTALLED_APPS:
to a higher level ( eox_vnelp/admin/init.py) you can remove all those repeated validations from this file.
Just one question, why you didn't include eox-support as requierement?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also moved to init file the if condition.
606b4eb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
feat: add nelpUser admin
This admin user adds:
Testing instructions
After
Screencast.from.31-10-24.16.59.09.webm
Additional information
jira story
Checklist for Merge