Search code examples
pythondjangoemailtemplatesdjango-notification

django-notification changing default template


I'm attempting use django-notification to send an email to the admin every time a user modifies, creates or deletes a database entry. The issue is, while I have created the notice types and confirm they exist, when the actual email is sent, the email sent looks like this:

You have received the following notice from example.com:

Entry has been changed. <--- this line being the email content


To see other notices or change how you receive notifications, please go to http://example.com

Is there a way to remove the first and last lines of that email body? I don't know where this default template is located so I can't change it. Any insight would be greatly appreciated!


Solution

  • You should locate the default installation directory for pip. If you use Linux it should be something like /usr/local/lib/python2.7/dist-packages if you use python2.7. Then locate the django-notification directory and change to the templates directory. And here they are!

    A good idea is to copy the application to your project directory and change it here.

    I simply suggest you take a look at virtualenv which will give you more flexibility for such forks.