Skip to content

Commit

Permalink
Flake 8 fixes
Browse files Browse the repository at this point in the history
Flake 8 fixes
  • Loading branch information
Vijay committed Jul 24, 2017
1 parent 9f217c3 commit cac626b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
3 changes: 2 additions & 1 deletion tests/functional/test_edit_profile.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import re


import pytest

Expand All @@ -14,6 +14,7 @@ def create_user_type(slug='tutor'):

def test_signup_college_poc_flow(base_url, browser, outbox):
tutor_type = create_user_type(slug='tutor')
print(tutor_type)
user = create_user_verify_login(base_url, browser, outbox)
browser.fill('login', user.email)
browser.fill('password', '123123')
Expand Down
3 changes: 1 addition & 2 deletions wye/base/management/commands/sample_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def create_profile(self, user):

def create_sample_workshops(self, user):
organisations = Organisation.objects.all()
locations = Location.objects.all()
# locations = Location.objects.all()
sections = WorkshopSections.objects.all()

for i in range(50):
Expand All @@ -173,7 +173,6 @@ def create_sample_workshops(self, user):
2015, random.randrange(1, 12), random.randrange(1, 29)),
description=self.fake.text(),
requester=random.choice(organisations),
#location=random.choice(locations),
workshop_level=WorkshopLevel.BEGINNER,
workshop_section=random.choice(sections),
status=WorkshopStatus.COMPLETED
Expand Down
8 changes: 4 additions & 4 deletions wye/profiles/views.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-

from django.conf import settings
from django.core.exceptions import PermissionDenied
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
Expand Down Expand Up @@ -39,6 +39,7 @@ def profile_view(request, slug):
return render(request, 'error.html', {
"message": "Profile does not exist"})


def user_dashboad(request):
profile, created = Profile.objects.get_or_create(
user__id=request.user.id)
Expand Down Expand Up @@ -80,8 +81,6 @@ def user_dashboad(request):
presenter=request.user)




class UserDashboard(ListView):
model = Profile
template_name = 'profile/dashboard.html'
Expand Down Expand Up @@ -190,7 +189,8 @@ def contact(request):
user_email_body = loader.get_template(
'email_messages/contactus/message_user.html').render(
email_context)
site_admins = [email for name, email in settings.MANAGERS] # @UnusedVariable
site_admins = [
email for name, email in settings.MANAGERS] # @UnusedVariable
try:
regional_lead = Profile.objects.filter(
usertype__slug__in=['lead', 'admin']).values_list(
Expand Down
3 changes: 1 addition & 2 deletions wye/workshops/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from wye.base.emailer_html import send_email_to_id
from wye.base.models import TimeAuditModel
from wye.organisations.models import Organisation
from wye.regions.models import Location
# from wye.regions.models import Location

# from .decorators import validate_assignme_action

Expand Down Expand Up @@ -49,7 +49,6 @@ class Workshop(TimeAuditModel):
default=0, null=True, blank=True)
volunteer = models.ManyToManyField(User, related_name='workshop_volunteer')
is_active = models.BooleanField(default=True)

status = models.PositiveSmallIntegerField(
choices=WorkshopStatus.CHOICES, verbose_name="Current Status",
default=WorkshopStatus.REQUESTED)
Expand Down

0 comments on commit cac626b

Please sign in to comment.