-
Notifications
You must be signed in to change notification settings - Fork 11
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
Register UserQuestionResponse and UserSurveyResponse in the admin. #352
base: develop
Are you sure you want to change the base?
Register UserQuestionResponse and UserSurveyResponse in the admin. #352
Conversation
I have just added models with all the fields and no filters. Please let me know if those are needed here. Will modify the PR. 😃 |
|
||
|
||
@admin.register(UserQuestionResponse) | ||
class UserQuestionResponseAdmin(admin.ModelAdmin): |
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.
Let's add a filter by question but have the question filter be (not working code) f"{survey_name} - {question}"
but maybe trim the length also (please play around with it).
I think we also might want to search or filter by user. 🤔
|
||
@admin.register(UserSurveyResponse) | ||
class UserSurveyResponse(admin.ModelAdmin): | ||
model = UserSurveyResponse |
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.
Add a filter by survey 👍
Thank you for picking this up! Would love some screenshots ❤️ |
Let's go ahead and use raw id fields or autocomplete fields for the user relationships ( if they exist). Dropdowns won't work with more than 500ish results. |
Add
UserQuestionResponse
andUserSurveyResponse
inhome/admin.py
Closes #332