djangonaut-space / wagtail-indymeet

Djangonaut Space site
MIT License
13 stars 9 forks source link

Need survey responses in the admin #332

Open RachellCalhoun opened 3 months ago

RachellCalhoun commented 3 months ago

We need to expose UserQuestionResponse and UserSurveyResponse in the django admin.

related to: https://github.com/djangonaut-space/wagtail-indymeet/issues/303

Pradhvan commented 3 months ago

Hey @RachellCalhoun asking a dumb question, I am new to wagtail, by exposing you mean just add them like we generally do in Django


@admin.register(UserQuestionResponse)
class UserQuestionResponseAdmin(admin.ModelAdmin):
    model = UserQuestionResponse

@admin.register(UserSurveyResponse)
class UserSurveyResponse(admin.ModelAdmin):
    model = UserSurveyResponse

Or have them shown in the wagtail admin something like using ModelAdmin and modeladmin_register

from wagtail.contrib.modeladmin.options import ModelAdmin, modeladmin_register 

I did setup the project just now locally and going through some blogs on wagtail Ref: How to Add Django Models to the Wagtail Admin

RachellCalhoun commented 3 months ago

@Pradhvan This is a great question, thanks for asking! We want to add those models to the Django admin, not Wagtail. Let me know if you'd like more clarification. 🙂

Pradhvan commented 3 months ago

@Pradhvan This is a great question, thanks for asking! We want to add those models to the Django admin, not Wagtail. Let me know if you'd like more clarification. 🙂

Thanks @RachellCalhoun, I got it. Just opened a draft PR for the changes.