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

Register UserQuestionResponse and UserSurveyResponse in the admin. #352

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

Pradhvan
Copy link

Add UserQuestionResponse and UserSurveyResponse in home/admin.py

Closes #332

@Pradhvan Pradhvan marked this pull request as ready for review March 29, 2024 08:50
@Pradhvan
Copy link
Author

Pradhvan commented Mar 29, 2024

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):
Copy link
Member

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
Copy link
Member

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 👍

@sarahboyce
Copy link
Member

Thank you for picking this up!

Would love some screenshots ❤️
I think both of these shouldn't be edittable and we maybe shouldn't be able to add entries

@tim-schilling
Copy link
Member

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.

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

Successfully merging this pull request may close these issues.

Need survey responses in the admin
3 participants