-
Notifications
You must be signed in to change notification settings - Fork 3
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
Conversation
- 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
c34c8d4
to
80fb746
Compare
Draft but Steven can take a look at this, looks useful |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
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