mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-23 15:33:45 +00:00
Rename vars
This commit is contained in:
parent
33279c3eb7
commit
118bb653a4
2 changed files with 12 additions and 12 deletions
|
@ -114,28 +114,28 @@ def classes_for_action_type(action_type):
|
|||
|
||||
class ActionsSearchForm(Form):
|
||||
"""Form used to do an advanced search through the logs."""
|
||||
u = forms.ModelChoiceField(
|
||||
user = forms.ModelChoiceField(
|
||||
label=_("Performed by"),
|
||||
queryset=users.models.User.objects.all(),
|
||||
required=False,
|
||||
)
|
||||
t = forms.MultipleChoiceField(
|
||||
action_type = forms.MultipleChoiceField(
|
||||
label=_("Action type"),
|
||||
required=False,
|
||||
widget=forms.CheckboxSelectMultiple,
|
||||
choices=CHOICES_ACTION_TYPE,
|
||||
initial=[i[0] for i in CHOICES_ACTION_TYPE],
|
||||
)
|
||||
s = forms.DateField(required=False, label=_("Start date"))
|
||||
e = forms.DateField(required=False, label=_("End date"))
|
||||
start_date = forms.DateField(required=False, label=_("Start date"))
|
||||
end_date = forms.DateField(required=False, label=_("End date"))
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(ActionsSearchForm, self).__init__(*args, **kwargs)
|
||||
self.fields["s"].help_text = get_input_formats_help_text(
|
||||
self.fields["s"].input_formats
|
||||
self.fields["start_date"].help_text = get_input_formats_help_text(
|
||||
self.fields["start_date"].input_formats
|
||||
)
|
||||
self.fields["e"].help_text = get_input_formats_help_text(
|
||||
self.fields["e"].input_formats
|
||||
self.fields["end_date"].help_text = get_input_formats_help_text(
|
||||
self.fields["end_date"].input_formats
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -600,10 +600,10 @@ class ActionsSearch:
|
|||
Returns:
|
||||
The QuerySet of Revision objects corresponding to the search.
|
||||
"""
|
||||
user = params.get("u", None)
|
||||
start = params.get("s", None)
|
||||
end = params.get("e", None)
|
||||
action_types = params.get("t", None)
|
||||
user = params.get("user", None)
|
||||
start = params.get("start_date", None)
|
||||
end = params.get("end_date", None)
|
||||
action_types = params.get("action_type", None)
|
||||
|
||||
query = Q()
|
||||
|
||||
|
|
Loading…
Reference in a new issue