Skip to content

Commit

Permalink
users: Fixed format
Browse files Browse the repository at this point in the history
  • Loading branch information
Turbo87 committed Jul 28, 2012
1 parent 0f333c0 commit e85aa5f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions skylines/controllers/users.py
Expand Up @@ -22,6 +22,7 @@
from skylines.model.geo import Location
from datetime import date, timedelta


class ClubSelectField(PropertySingleSelectField):
def _my_update_params(self, d, nullable=False):
clubs = DBSession.query(Club).order_by(Club.name).all()
Expand All @@ -30,13 +31,15 @@ def _my_update_params(self, d, nullable=False):
d['options'] = options
return d


class SelectClubForm(EditableForm):
__base_widget_type__ = BootstrapForm
__model__ = User
__hide_fields__ = ['user_id']
__limit_fields__ = ['club']
club = ClubSelectField


select_club_form = SelectClubForm(DBSession)


Expand Down Expand Up @@ -136,6 +139,7 @@ def recover_user_password(user):
user.email_address.encode('ascii'), msg.as_string())
smtp.quit()


class UserController(BaseController):
def __init__(self, user):
self.user = user
Expand Down Expand Up @@ -314,6 +318,7 @@ def unfollow(self):
Follower.unfollow(request.identity['user'], self.user)
redirect('.')


class UsersController(BaseController):
@expose('skylines.templates.users.list')
def index(self):
Expand Down

0 comments on commit e85aa5f

Please sign in to comment.