Skip to content

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

Description

@lggwettmann

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions