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 ...@@ -25,7 +25,6 @@ from django.http import HttpResponseRedirect, HttpResponse
from django.contrib import messages from django.contrib import messages
from django.contrib.auth.decorators import login_required, permission_required from django.contrib.auth.decorators import login_required, permission_required
from django.contrib.auth.models import AnonymousUser from django.contrib.auth.models import AnonymousUser
from django.db.models import Q
from django.utils import formats from django.utils import formats
import uuid import uuid
...@@ -42,7 +41,6 @@ from accounts.models import Profile, send_notification_email ...@@ -42,7 +41,6 @@ from accounts.models import Profile, send_notification_email
import weblate import weblate
def get_filter_name(rqtype): def get_filter_name(rqtype):
''' '''
Returns name of current filter. Returns name of current filter.
...@@ -98,24 +96,13 @@ def search(translation, request): ...@@ -98,24 +96,13 @@ def search(translation, request):
) )
name = _('Review of translations since %s') % formatted_date name = _('Review of translations since %s') % formatted_date
elif search_form.is_valid(): 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 # Apply search conditions
allunits = translation.unit_set.search( allunits = translation.unit_set.search(
search_type, search_form.cleaned_data['search'],
search_query, search_form.cleaned_data['q'],
search_source, search_form.cleaned_data['src'],
search_context, search_form.cleaned_data['ctx'],
search_target search_form.cleaned_data['tgt'],
) )
name = _('Search for "%s"') % search_query 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