Monitoringi¶
Założenia¶
Moduł stanowi komponent, który agreguje sprawy związane z różnymi urzędami, które odnoszą się do zbiernia informacji tej samej kategorii. Zatem monitoringiem będzie np. zainteresowanie wysoką opłaty za śmieci w Polsce. Na tej postawie system tworzy liczne sprawy dla każdego urzędu, który ma być objęty badaniem.
Architektura¶
Model¶
- class feder.monitorings.models.Monitoring(id, created, modified, name, slug, user, description, subject, hide_new_cases, template, use_llm, responses_chat_context, normalized_response_template, results, email_footer, notify_alert, is_public, domain)[source]¶
- Parameters:
id (AutoField) – Id
created (AutoCreatedField) – Utworzony
modified (AutoLastModifiedField) – Zmodyfikowany
name (CharField) – Nazwa
slug (AutoSlugField) – Adres url
user_id (ForeignKey to
feder.users.models.User
) – Użytkownik / użytkowniczkadescription (TextField) – Opis
subject (CharField) – Temat
hide_new_cases (BooleanField) – Czy ukrywać nowe sprawy przy przypisywaniu?
template (TextField) – Użyj {{EMAIL}} aby umieścić adres odpowiedzi
use_llm (BooleanField) – Użyj LLM do oceny odpowiedzi
responses_chat_context (JSONField) – Kontekst odpowiedzi w monitoringu dla czatu AI
normalized_response_template (JSONField) – Znormalizowany szablon odpowiedzi
results (TextField) – Wyniki monitoringu i otrzymanych odpowiedzi
email_footer (TextField) – Podpis w stopce e-maili, w tym w odpowiedziach na e-maile
notify_alert (BooleanField) – Powiadom o nowych alertach osoby, które mogą je widzieć
is_public (BooleanField) – Czy publicznie widoczny?
domain_id (ForeignKey to
feder.domains.models.Domain
) – Domena użyta do wysłania wiadomości
- exception DoesNotExist¶
- exception MultipleObjectsReturned¶
- class feder.monitorings.models.MonitoringGroupObjectPermission(id, permission, group, content_object)[source]¶
- Parameters:
id (AutoField) – Id
permission_id (ForeignKey to
django.contrib.auth.models.Permission
) – Permissiongroup_id (ForeignKey to
django.contrib.auth.models.Group
) – Groupcontent_object_id (ForeignKey to
feder.monitorings.models.Monitoring
) – Content object
- exception DoesNotExist¶
- exception MultipleObjectsReturned¶
- class feder.monitorings.models.MonitoringQuerySet(model=None, query=None, using=None, hints=None)[source]¶
- with_case_confirmation_received_count()[source]¶
function to annotate with case count when case.confirmation_received field is True
- class feder.monitorings.models.MonitoringUserObjectPermission(id, permission, user, content_object)[source]¶
- Parameters:
id (AutoField) – Id
permission_id (ForeignKey to
django.contrib.auth.models.Permission
) – Permissionuser_id (ForeignKey to
feder.users.models.User
) – Usercontent_object_id (ForeignKey to
feder.monitorings.models.Monitoring
) – Content object
- exception DoesNotExist¶
- exception MultipleObjectsReturned¶
Panel administracyjny¶
Widoki¶
- class feder.monitorings.views.DraftListMonitoringView(**kwargs)[source]¶
- Parameters:
url_name –
monitorings:drafts
url_name –
monitorings:drafts
- get_object_list(obj)[source]¶
A method to return object list to additional list. This should be overriden.
- Parameters:
obj – The object the view is displaying.
- Returns:
A list of object to paginated
- Return type:
QuerySet
- Raises:
ImproperlyConfigured – The method was not overrided.
- 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.
- model¶
alias of
Monitoring
- class feder.monitorings.views.LetterListMonitoringView(**kwargs)[source]¶
- Parameters:
url_name –
monitorings:letters
url_name –
monitorings:letters
- get_object_list(obj)[source]¶
A method to return object list to additional list. This should be overriden.
- Parameters:
obj – The object the view is displaying.
- Returns:
A list of object to paginated
- Return type:
QuerySet
- Raises:
ImproperlyConfigured – The method was not overrided.
- 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.
- model¶
alias of
Monitoring
- class feder.monitorings.views.MassMessageView(**kwargs)[source]¶
- Parameters:
url_name –
monitorings:mass-message
- form_class¶
alias of
MassMessageForm
- class feder.monitorings.views.MonitoringAssignView(**kwargs)[source]¶
- Parameters:
url_name –
monitorings:assign
- get_filterset_kwargs(filterset_class)[source]¶
Returns the keyword arguments for instantiating the filterset.
- 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
Institution
- class feder.monitorings.views.MonitoringAutocomplete(**kwargs)[source]¶
- Parameters:
url_name –
monitorings:autocomplete
- class feder.monitorings.views.MonitoringCasesAjaxDatatableView(**kwargs)[source]¶
View to provide table list of all Monitoring Cases with ajax data.
- Parameters:
url_name –
monitorings:monitoring_cases_table_ajax_data
- class feder.monitorings.views.MonitoringCasesTableView(**kwargs)[source]¶
View for displaying template with table of Monitoring Cases.
- Parameters:
url_name –
monitorings:monitoring_cases_table
- model¶
alias of
Monitoring
- class feder.monitorings.views.MonitoringChatView(**kwargs)[source]¶
-
- 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.
- model¶
alias of
Monitoring
- class feder.monitorings.views.MonitoringCreateView(**kwargs)[source]¶
- Parameters:
url_name –
monitorings:create
- form_class¶
alias of
MonitoringForm
- model¶
alias of
Monitoring
- class feder.monitorings.views.MonitoringDeleteView(*args, **kwargs)[source]¶
- Parameters:
url_name –
monitorings:delete
- model¶
alias of
Monitoring
- class feder.monitorings.views.MonitoringDetailView(**kwargs)[source]¶
- Parameters:
url_name –
monitorings:details
url_name –
monitorings:details
- get_object_list(obj)[source]¶
A method to return object list to additional list. This should be overriden.
- Parameters:
obj – The object the view is displaying.
- Returns:
A list of object to paginated
- Return type:
QuerySet
- Raises:
ImproperlyConfigured – The method was not overrided.
- 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.
- model¶
alias of
Monitoring
- class feder.monitorings.views.MonitoringListView(**kwargs)[source]¶
- Parameters:
url_name –
monitorings: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
Monitoring
- class feder.monitorings.views.MonitoringPermissionView(**kwargs)[source]¶
- Parameters:
url_name –
monitorings:perm
- model¶
alias of
Monitoring
- class feder.monitorings.views.MonitoringReportView(**kwargs)[source]¶
- Parameters:
url_name –
monitorings:report
url_name –
monitorings:report
- 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.
- class feder.monitorings.views.MonitoringResponsesReportView(**kwargs)[source]¶
- Parameters:
url_name –
monitorings:responses_report
- class feder.monitorings.views.MonitoringResultsUpdateView(**kwargs)[source]¶
- Parameters:
url_name –
monitorings:results_update
- form_class¶
alias of
MonitoringResultsForm
- model¶
alias of
Monitoring
- class feder.monitorings.views.MonitoringResultsView(**kwargs)[source]¶
- Parameters:
url_name –
monitorings:results
- 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.
- model¶
alias of
Monitoring
- class feder.monitorings.views.MonitoringTemplateView(**kwargs)[source]¶
- Parameters:
url_name –
monitorings:template
- 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.
- model¶
alias of
Monitoring
- class feder.monitorings.views.MonitoringUpdatePermissionView(**kwargs)[source]¶
- Parameters:
url_name –
monitorings:perm-update
- form_class¶
alias of
SaveTranslatedUserObjectPermissionsForm
- class feder.monitorings.views.MonitoringUpdateView(**kwargs)[source]¶
- Parameters:
url_name –
monitorings:update
- form_class¶
alias of
MonitoringForm
- form_valid(form)[source]¶
Call the super first, so that when overriding get_form_valid_message, we have access to the newly saved object.
- model¶
alias of
Monitoring
- class feder.monitorings.views.MonitoringsAjaxDatatableView(**kwargs)[source]¶
View to provide table list of all Monitorings with ajax data.
- Parameters:
url_name –
monitorings:monitorings_table_ajax_data
- model¶
alias of
Monitoring
- class feder.monitorings.views.MonitoringsTableView(**kwargs)[source]¶
View for displaying template with Monitorings table.
- Parameters:
url_name –
monitorings:table
- class feder.monitorings.views.MultiCaseTagManagement(**kwargs)[source]¶
- Parameters:
url_name –
monitoring-case-tags-update
- class feder.monitorings.views.PermissionWizard(**kwargs)[source]¶
- Parameters:
url_name –
monitorings:perm-add
- done(form_list, form_dict, *args, **kwargs)[source]¶
This method must be overridden by a subclass to process to form data after processing all steps.
- get_context_data(*args, **kwargs)[source]¶
Returns the template context for a step. You can overwrite this method to add more data for all or some steps. This method returns a dictionary containing the rendered form step. Available template context variables are:
all extra data stored in the storage backend
wizard - a dictionary representation of the wizard instance
Example:
class MyWizard(WizardView): def get_context_data(self, form, **kwargs): context = super().get_context_data(form=form, **kwargs) if self.steps.current == 'my_step_name': context.update({'another_var': True}) return context