Code Monkey home page Code Monkey logo

Comments (3)

spookylukey avatar spookylukey commented on May 26, 2024

What specific issue do you have? Why does Message need to have a connection to Site at all? The API it implements (sending of email) doesn't use the Sites framework, so it's difficult to see how this could be implemented, or why it is wanted. See https://docs.djangoproject.com/en/1.6/topics/email/#django.core.mail.send_mail - it doesn't accept a Site instance.

from django-mailer.

ikonitas avatar ikonitas commented on May 26, 2024

I have got multiple sites and I want to specified messages for which site it is.

It gives more flexibility to know from wich site messages are going or filter for specific site.

Implementation is not that difficult just adding fields on models.py check the way django comments or redirects frameworks are done.

Its just enhancement not specific issue.

from django-mailer.

spookylukey avatar spookylukey commented on May 26, 2024

The only way of populating a 'site' field on Message, MessageLog etc. is if you are manually constructing instances of those models yourself. However, that isn't public API. The public API is:

  • setting EMAIL_BACKEND to "mailer.backend.DbBackend"
  • or, changing imports to using from mailer import sendmail

With either of these, it's impossible to pass in the site object. Having a Message.site field is only going to be useful if we made the Message model a public API.

So, on that basis, I don't think this is an enhancement we want to do.

Sorry!

from django-mailer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.