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