Pardot forms#1673
Open
mwvolo wants to merge 3 commits into
Open
Conversation
| @@ -0,0 +1,57 @@ | |||
| import json | |||
|
|
|||
| from django.utils import timezone | |||
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new Wagtail page type to represent Pardot-backed forms and enables embedding those forms into existing Flex/Root page StreamField sections, along with an API endpoint to accept and persist submissions as Wagtail FormSubmission records.
Changes:
- Introduces
PardotFormPage/PardotFormFieldmodels and exposes form configuration via the Wagtail API. - Adds a
pardot_formStreamField block for embedding selectedPardotFormPageinstances inside section content. - Implements a POST submission endpoint and adds unit tests + migrations.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| pages/views.py | Adds DRF POST endpoint to accept submissions and store them as Wagtail form submissions. |
| pages/models.py | Adds Pardot form models + API serialization and a StreamField embed block; allows Flex pages to contain Pardot form pages. |
| pages/tests.py | Adds tests for new page types, API serialization, and the submission endpoint. |
| pages/migrations/0166_pardotformpage_pardotformfield.py | Creates DB tables for Pardot form pages and fields. |
| pages/migrations/0167_alter_rootpage_body.py | Updates RootPage StreamField definition to include the new pardot_form block in section content. |
| openstax/urls.py | Wires the new submission endpoint into the URLconf. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
i'm just playing around. can we marry the pardot (marketing) forms with the flex pages?
this would certainly need some frontend work