Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

What's the difference between notice_type and medium? #97

Open
lggwettmann opened this issue Apr 24, 2020 · 0 comments
Open

What's the difference between notice_type and medium? #97

lggwettmann opened this issue Apr 24, 2020 · 0 comments
Labels

Comments

@lggwettmann
Copy link

lggwettmann commented Apr 24, 2020

Thanks for this package once again and the great work with it.

I have another question about the code. This time about this part of the NoticeSetting-model:

    notice_type = models.ForeignKey(
        NoticeType,
        verbose_name=_("notice type"),
        on_delete=models.CASCADE
    )
    medium = models.CharField(_("medium"), max_length=1, choices=NOTICE_MEDIA)

Medium gets its choice values from load_media_defaults() which basically refers to the PINAX_NOTIFICATION_BACKENDS setting. This setting should contain the same values as the created model instances of NoticeTypes if I'm not mistaken.

So that's why I wonder what medium is supposed to mean or do here that's different from the notice_type field? Is there a difference to notice_type or is it literally just a reference to the same data just once packaged as a tuple in settings, and once as a database entry?

Does it have something to do with the spam sensitivity perhaps? I couldn't find any info on how that works.

Thanks for your help in this matter.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant