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

Implemented preview mode #36

Merged
merged 8 commits into from
Feb 6, 2024
Merged

Implemented preview mode #36

merged 8 commits into from
Feb 6, 2024

Conversation

Bartvaderkin
Copy link
Contributor

@Bartvaderkin Bartvaderkin commented Feb 2, 2024

This adds a link to the change and changelist pages to a view that renders the template with the wrappers. This page also has a form to send the preview to an arbitrary email address.

It also adds an "example" field to the variables configuration to set example data to render in the preview instead of a placeholder.

And to use data from database (like a singleton) use MAIL_EDITOR_DYNAMIC_CONTEXT

Bart van der Schoor added 6 commits February 2, 2024 10:51
- Added support for 'example' field in variable declaration
- Added view to render full mail using 'example' data (or placeholders)
- Also refactored settings module for dynamic Django settings, tuned model admin
@Bartvaderkin Bartvaderkin changed the title Implemented preview mode Implemented browser preview mode Feb 2, 2024
@Bartvaderkin Bartvaderkin changed the title Implemented browser preview mode Implemented preview mode Feb 2, 2024
@alextreme
Copy link
Member

Draft but Steven can take a look at this, looks useful

@Bartvaderkin Bartvaderkin marked this pull request as ready for review February 5, 2024 08:29

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this file still necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not right now, but I kept it for compatibility with existing projects (because everyone runs and updates from git hashes). I plan to remove it when we update this package and make a new official version.

@alextreme alextreme merged commit b1da147 into master Feb 6, 2024
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.

3 participants