# Path: apps/bike/control.py
# def team_bikes(team, include_reserve=False, include_inactive=False):
# def available(team, start, finish, include_reserve=False, 
#               include_inactive=False, include_bike=None):
# def has_future_borrows(bike):
# def currently_borrowed(bike):
# def can_change_station(account, bike, station):
# def can_deactivate(account, bike):
# def can_delete(account, bike):
# def create( account, team, name, image, description, active, reserve, station, 
#             lockcode, size, lights ):
# def edit_is_allowed(account, bike, name, description, active, reserve, station, 
#                     lockcode, size, lights):
# def _change_station(account, bike, station):
# def edit( account, bike, name, description, active, reserve, station, lockcode, 
#           size, lights ):
# def delete(account, bike):
# def update_stations():


from django.core.management.base import NoArgsCommand, CommandError
from apps.bike import control
# -*- coding: utf-8 -*-
# Copyright (c) 2012 Fabian Barkhau <fabian.barkhau@gmail.com>                  
# License: MIT (see LICENSE.TXT file) 




class Command(NoArgsCommand):

    help = 'Updates bike.station for borrows that have ended.'

    def handle_noargs(self, *args, **options):

# Path: apps/bike/control.py
# def team_bikes(team, include_reserve=False, include_inactive=False):
# def available(team, start, finish, include_reserve=False, 
#               include_inactive=False, include_bike=None):
# def has_future_borrows(bike):
# def currently_borrowed(bike):
# def can_change_station(account, bike, station):
# def can_deactivate(account, bike):
# def can_delete(account, bike):
# def create( account, team, name, image, description, active, reserve, station, 
#             lockcode, size, lights ):
# def edit_is_allowed(account, bike, name, description, active, reserve, station, 
#                     lockcode, size, lights):
# def _change_station(account, bike, station):
# def edit( account, bike, name, description, active, reserve, station, lockcode, 
#           size, lights ):
# def delete(account, bike):
# def update_stations():


# Path: apps/bike/management/commands/update_stations.py
from django.core.management.base import NoArgsCommand, CommandError
from apps.bike import control

# -*- coding: utf-8 -*-
# Copyright (c) 2012 Fabian Barkhau <fabian.barkhau@gmail.com>                  
# License: MIT (see LICENSE.TXT file) 




class Command(NoArgsCommand):

    help = 'Updates bike.station for borrows that have ended.'

    def handle_noargs(self, *args, **options):

        control.update_stations()