{"id":17720218,"url":"https://github.com/gregschmit/django-impression","last_synced_at":"2025-03-14T04:30:42.386Z","repository":{"id":57420457,"uuid":"220716779","full_name":"gregschmit/django-impression","owner":"gregschmit","description":null,"archived":false,"fork":false,"pushed_at":"2019-12-30T06:31:05.000Z","size":108,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-21T18:49:39.032Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gregschmit.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-09T23:27:59.000Z","updated_at":"2019-12-30T06:31:07.000Z","dependencies_parsed_at":"2022-09-16T09:02:34.534Z","dependency_job_id":null,"html_url":"https://github.com/gregschmit/django-impression","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregschmit%2Fdjango-impression","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregschmit%2Fdjango-impression/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregschmit%2Fdjango-impression/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregschmit%2Fdjango-impression/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gregschmit","download_url":"https://codeload.github.com/gregschmit/django-impression/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243526281,"owners_count":20305107,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-25T15:26:31.990Z","updated_at":"2025-03-14T04:30:37.368Z","avatar_url":"https://github.com/gregschmit.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Impression - The CMS For Email\n##############################\n\n.. image:: https://travis-ci.org/gregschmit/django-impression.svg?branch=master\n    :alt: TravisCI\n    :target: https://travis-ci.org/gregschmit/django-impression\n\n.. image:: https://img.shields.io/pypi/v/django-impression\n    :alt: PyPI\n    :target: https://pypi.org/project/django-impression/\n\n.. image:: https://coveralls.io/repos/github/gregschmit/django-impression/badge.svg?branch=master\n    :alt: Coverage\n    :target: https://coveralls.io/github/gregschmit/django-impression?branch=master\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n    :alt: Code Style\n    :target: https://github.com/ambv/black\n\nSource: https://github.com/gregschmit/django-impression\n\nPyPI: https://pypi.org/project/django-impression/\n\nDjango Impression is a reusable Django app that provides you with the ability to edit\nyour email templates in a web interface and configure distribution lists if you don't\nhave them configured on your email provider. It also implements a RESTful API so any\nother web applications you have in your ecosystem can send consistent-looking emails.\n\n**The Problem**: Email lists and templates for Django projects and other web\napplications are often kept in source control, requiring developers to edit code when,\nfor example, your marketing guru wants to tweak the layout of one of your emails. They\nmay not want to sift through your backend code to make such changes. Even if they do,\nyou may want to have your email templates accessible over an API so all of your\norganization's email templates can be centralized.\n\n**The Solution**: Impression provides the ability to separate your email template system\nfrom your source code, by building email templates as model instances. You can still use\nfile-based templates if you would like, and the model templates can even\n``{% extend %}`` those file-based templates. This allows email templates to be modified\nin the admin UI by a wider variety of users; not just those who have access to your\nsource code. Impression also exposes a REST API endpoint for sending emails from other\nweb applications, with easy-to-configure access controls. This makes it easier to\ncentralize your email brand and keep things looking awesome and consistent. You can run\nImpression in an existing project, or you can run it standalone by itself (e.g.,\n``impression.example.com``).\n\nKey Features:\n\n- Email templates are editable by users in the UI.\n- API endpoints allow remote systems to send emails.\n- API requests can contain a JSON for the \"email body\" which allows clean separation\n  between the content (data sent by the remote system) and the presentation (defined by\n  the Impression templates).\n- Impression is protected by a system of semi-trust, where you can apply rate limits on\n  the systems which use Impression, constrain which services/templates each remote\n  system has access to, and control the format of the emails that are sent.\n\n\nArchitectures\n#############\n\nThere are a few ways to integrate Impression into an environment:\n\n- **Standalone:** Impression can be run from a system to serve RESTful requests from\n  your web applications. As long as you use HTTPS, this can be done across the\n  internet. Here are some use cases:\n\n  - You have more than 1 web application operating in your ecosystem and want to\n    centralize your email templating within your organization.\n  - You have a fleet of systems in the hands of customers (semi-trusted users) to whom\n    you cannot provide your SMTP details. You want them to be able to request emails to\n    be sent (e.g., for notification systems).\n\n- **Integrated:** Impression can be mixed in with an existing Django project. A use\n  case could be:\n\n  - A company has a couple people in the marketing department who are wizards with the\n    Bootstrap Email framework; they don't need to have access to the source and they\n    really want to quickly test and push out new designs. Using Impression along with\n    the sleek template editing UI, powered by `CodeMirror \u003chttps://codemirror.net\u003e`_,\n    they can quickly develop email templates and deploy them without involving the\n    development team.\n\n\nInstallation\n############\n\n.. code-block:: shell\n\n    $ pip install django-impression\n\n\nConfiguration\n*************\n\nWhether you are going to run Impression from your existing project locally, or whether\nyou are going to integrate your existing project with a standalone Impression system\naffects how you should configure\nthe settings.\n\nThere are 2 configuration schemes:\n\n- Local: You wish to send emails from a project that has Impression integrated into it.\n- Remote: You wish to send email remotely via the REST API of an Impression instance\n  running in another project. (For our purposes, \"Remote\" means on another system, or\n  even another project running on the same system, in which case you'll use localhost.)\n\nLocal\n-----\n\nAdd ``impression`` to your ``INSTALLED_APPS``, run migrations, and configure some\nsettings:\n\n.. code-block:: python\n\n    # This should be your *actual* email backend.\n    IMPRESSION_EMAIL_BACKEND = \"django.core.mail.backends.smtp.EmailBackend\"\n\n    # this is configured to pass emails to Impression.\n    EMAIL_BACKEND = \"impression.backends.LocalEmailBackend\"\n\nTo hook the API endpoint ``/api/send_message`` into your project for remote systems,\njust add this entry to your URL dispatcher's ``urlpatterns`` list:\n\n.. code-block:: python\n\n    path(\"api/\", include(\"impression.api.urls\")),  # includes the send_message endpoint\n\n\nRemote\n------\n\nFor remote systems that will talk to your Impression server over the REST API, use the\n`Impression Client \u003chttps://github.com/gregschmit/django-impression-client\u003e`_.\n\n\nInstalling as Standalone System\n*******************************\n\nIt's a very good idea to setup a dedicated Django application on a server for your\norganization (then all of your apps can use that system remotely).\n\nTo make things really easy, if you have a Docker or Virtual environment, or just wish to\nspin Impression up on it's own server, you can check out\n`ImpressionOS \u003chttps://github.com/gregschmit/impression_os\u003e`_ to deploy Impression as\na standalone system. That project provides the ability to configure everything about the\nsystem in the Admin UI, and even configure Let's Encrypt certificates to ensure your\nemail API is secure.\n\n\nModel Configuration\n###################\n\nTo get familiar with Impression models, here is a quick guide on which models to visit\nfirst, in order:\n\n1) Email addresses (the ``EmailAddress`` model): You should create email addresses for\n   the email that you will be sending from.\n2) Services (the ``Service`` model): You should create at least one \"default\" service.\n   If you permit users to specify the emails that they send to (only for trusted\n   systems!), then those emails will be created on the fly when those messages are\n   created.\n3) Templates (the ``Template`` model): Go ahead and create a template that adds a\n   footer. Ensure you add ``{{ body }}`` somewhere in the body, and ``{{ subject }}`` in\n   the subject and the subject/body of the email request will be inserted there. You can\n   then hook it into your Service by editing your service and selecting it under the\n   ``template`` field. If you're feeling adventurous, you can use an email template from\n   `Bootstrap \u003chttps://bootstrapemail.com\u003e`_ or\n   `Foundation \u003chttps://foundation.zurb.com/emails.html\u003e`_.\n4) Now you can either send email with Django's ``send_mail``, and remote systems can\n   use ``send_mail`` to reach your Impression server, provided they have followed the\n   configuration instructions above.\n\n\nTests\n#####\n\n.. code-block:: shell\n\n    $ python manage.py test\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregschmit%2Fdjango-impression","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgregschmit%2Fdjango-impression","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregschmit%2Fdjango-impression/lists"}