fix: update form entry references and enhance admin search fields - #28
Merged
Conversation
Contributor
Reviewer's GuideUpdates admin and CMS integration for Fobi forms by pointing CMS plugins to the FormEntry proxy model, improving admin usability (search and raw ID widget), and making minor admin style cleanups, including the corresponding schema migration. ER diagram for FobiFormPluginModel relationship updateerDiagram
unfold_fobi_FormEntryProxy {
int id
string name
string slug
}
unfold_fobi_cms_FobiFormPluginModel {
int id
int form_entry_id
}
unfold_fobi_FormEntryProxy ||--o{ unfold_fobi_cms_FobiFormPluginModel : referenced_by
Class diagram for updated admin and CMS plugin integrationclassDiagram
class FormEntryAdmin {
+list search_fields
+list inlines
+get_urls()
+redirect_to_edit(request, object_id)
+response_change(request, obj)
}
class ProxyOnlyFobiAdminMixin
class FobiFormEntryAdmin
class ModelAdmin
FormEntryAdmin ..|> ProxyOnlyFobiAdminMixin
FormEntryAdmin ..|> FobiFormEntryAdmin
FormEntryAdmin ..|> ModelAdmin
class FormEntryProxy {
+id: int
+name: str
+slug: str
}
class CMSPlugin
class FobiFormPluginModel {
+id: int
+form_entry: ForeignKey
}
class UnfoldCMSPluginBase
class IntegrationProcessor
class FobiFormPlugin {
+raw_id_fields: list
+name: str
+render_template: str
+can_redirect: bool
}
FobiFormPluginModel ..|> CMSPlugin
FobiFormPluginModel --> FormEntryProxy : form_entry
FobiFormPlugin ..|> UnfoldCMSPluginBase
FobiFormPlugin ..|> IntegrationProcessor
FobiFormPlugin --> FobiFormPluginModel : uses_model
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Consider keeping the multi-base admin class definitions and the long f-string assignment split across multiple lines to maintain readability and consistency with the existing style in this module.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider keeping the multi-base admin class definitions and the long f-string assignment split across multiple lines to maintain readability and consistency with the existing style in this module.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
Update admin integrations to reference proxy form entries and improve CMS plugin configuration.
New Features:
Enhancements: