Powiadomienia

Założenia

Moduł stanowi komponent powiadomień do operatora o konieczności podjęcia akcji w systemie. Takie powiadomienia mogą być kierowane m. in. w związku z zgłoszeniem spamu.

Dane testowe

Dla modułu nie możliwe jest w środowisku deweloperskim dynamicznie wygenerowanie generowanych danych testowych.

Todo

Opracować generowanie danych testowych.

Architektura

Model

class feder.alerts.models.Alert(id, created, modified, monitoring, reason, author, solver, status, content_type, object_id)[source]
Parameters:
  • id (AutoField) – Id

  • created (AutoCreatedField) – Utworzony

  • modified (AutoLastModifiedField) – Zmodyfikowany

  • monitoring_id (ForeignKey to feder.monitorings.models.Monitoring) – Monitoring

  • reason (TextField) – Przyczyna

  • author_id (ForeignKey to feder.users.models.User) – Autor

  • solver_id (ForeignKey to feder.users.models.User) – Rozwiązywacz/-ka

  • status (BooleanField) – Status

  • content_type_id (ForeignKey to django.contrib.contenttypes.models.ContentType) – Content type

  • object_id (PositiveIntegerField) – Object id

exception DoesNotExist
exception MultipleObjectsReturned
class feder.alerts.models.AlertQuerySet(model=None, query=None, using=None, hints=None)[source]

Widoki

class feder.alerts.views.AlertCreateView(**kwargs)[source]
Parameters:

url_namealerts:create

form_class

alias of AlertForm

get_context_data(**kwargs)[source]

Insert the form into the context dict.

get_form_kwargs()[source]

Return the keyword arguments for instantiating the form.

model

alias of Alert

class feder.alerts.views.AlertDeleteView(*args, **kwargs)[source]
Parameters:

url_namealerts:delete

get_success_url()[source]

Return the URL to redirect to after processing a valid form.

model

alias of Alert

class feder.alerts.views.AlertDetailView(**kwargs)[source]
Parameters:

url_namealerts:details

model

alias of Alert

class feder.alerts.views.AlertListView(**kwargs)[source]
Parameters:

url_namealerts:list

get_queryset()[source]

Return the list of items for this view.

The return value must be an iterable and may be an instance of QuerySet in which case QuerySet specific behavior will be enabled.

model

alias of Alert

class feder.alerts.views.AlertStatusView(**kwargs)[source]
Parameters:

url_namealerts:status

get_queryset()[source]

Return the QuerySet that will be used to look up the object.

This method is called by the default implementation of get_object() and may not be called if get_object() is overridden.

class feder.alerts.views.AlertUpdateView(**kwargs)[source]
Parameters:

url_namealerts:update

form_class

alias of AlertForm

get_form_valid_message()[source]

Validate that form_valid_message is set and is either a unicode or str object.

model

alias of Alert