Commit ca838b6c authored by Michal Čihař's avatar Michal Čihař

Drop some not needed local variables

parent 466cbd6f
......@@ -25,7 +25,6 @@ from django.http import HttpResponseRedirect, HttpResponse
from django.contrib import messages
from django.contrib.auth.decorators import login_required, permission_required
from django.contrib.auth.models import AnonymousUser
from django.db.models import Q
from django.utils import formats
import uuid
......@@ -42,7 +41,6 @@ from accounts.models import Profile, send_notification_email
import weblate
def get_filter_name(rqtype):
'''
Returns name of current filter.
......@@ -98,24 +96,13 @@ def search(translation, request):
)
name = _('Review of translations since %s') % formatted_date
elif search_form.is_valid():
# Search query
search_query = search_form.cleaned_data['q']
# Search type
search_type = search_form.cleaned_data['search']
# Search options
search_source = search_form.cleaned_data['src']
search_target = search_form.cleaned_data['tgt']
search_context = search_form.cleaned_data['ctx']
# Apply search conditions
allunits = translation.unit_set.search(
search_type,
search_query,
search_source,
search_context,
search_target
search_form.cleaned_data['search'],
search_form.cleaned_data['q'],
search_form.cleaned_data['src'],
search_form.cleaned_data['ctx'],
search_form.cleaned_data['tgt'],
)
name = _('Search for "%s"') % search_query
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment