Commit ed060feb authored by Giorgos Korfiatis's avatar Giorgos Korfiatis Committed by Christos Stavrakakis
Browse files

astakos: pep8 fixes

parent cc7f14b7
...@@ -1108,7 +1108,8 @@ class EmailChangeManager(models.Manager): ...@@ -1108,7 +1108,8 @@ class EmailChangeManager(models.Manager):
user.save() user.save()
email_change.delete() email_change.delete()
msg = "User %s changed email from %s to %s" msg = "User %s changed email from %s to %s"
logger.log(astakos_settings.LOGGING_LEVEL, msg, user.log_display, old_email, user.email) logger.log(astakos_settings.LOGGING_LEVEL, msg, user.log_display,
old_email, user.email)
return user return user
except EmailChange.DoesNotExist: except EmailChange.DoesNotExist:
raise ValueError(_('Invalid activation key.')) raise ValueError(_('Invalid activation key.'))
...@@ -1561,7 +1562,7 @@ class ProjectManager(models.Manager): ...@@ -1561,7 +1562,7 @@ class ProjectManager(models.Manager):
relevant = model.o_states_q(model.RELEVANT_STATES) relevant = model.o_states_q(model.RELEVANT_STATES)
return self.filter(flt, relevant).order_by( return self.filter(flt, relevant).order_by(
'application__issue_date').select_related( 'application__issue_date').select_related(
'application', 'application__owner', 'application__applicant') 'application', 'application__owner', 'application__applicant')
def search_by_name(self, *search_strings): def search_by_name(self, *search_strings):
q = Q() q = Q()
......
...@@ -433,7 +433,7 @@ def project_search(request): ...@@ -433,7 +433,7 @@ def project_search(request):
else: else:
accepted = request.user.projectmembership_set.filter( accepted = request.user.projectmembership_set.filter(
state__in=ProjectMembership.ACCEPTED_STATES).values_list( state__in=ProjectMembership.ACCEPTED_STATES).values_list(
'project', flat=True) 'project', flat=True)
projects = Project.objects.search_by_name(q) projects = Project.objects.search_by_name(q)
projects = projects.filter(Project.o_state_q(Project.O_ACTIVE)) projects = projects.filter(Project.o_state_q(Project.O_ACTIVE))
......
...@@ -46,7 +46,7 @@ installed_apps = [ ...@@ -46,7 +46,7 @@ installed_apps = [
'django_tables2', 'django_tables2',
'astakos.quotaholder_app', 'astakos.quotaholder_app',
'synnefo_branding', 'synnefo_branding',
# 'debug_toolbar', # 'debug_toolbar',
] ]
context_processors = [ context_processors = [
......
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