Ejemplo n.º 1
0
    def get(self, event_id):
        self.auth()

        user = self.current_user()

        event = Event.get_by_id(int(event_id))

        properties = ['name', 'date', 'time', 'details', 'location']

        event_json = toolbox.grab_json(event, properties)

        event_json['date'] = toolbox.date_picker(event.date)

        toolbox.render(self, 'edit_event.html', {
            'event': event,
            'event_json': event_json,
            'user': user
        })
Ejemplo n.º 2
0
    def get(self, event_id):
        self.auth()

        user = self.current_user()

        event = Event.get_by_id(int(event_id))

        properties = ['name', 'date', 'time', 'details', 'location']

        event_json = toolbox.grab_json(event, properties)

        event_json['date'] = toolbox.date_picker(event.date)

        toolbox.render(self, 'edit_event.html', {
            'event': event,
            'event_json': event_json,
            'user': user
        })
Ejemplo n.º 3
0
    def get(self, ride_id):
        self.auth()

        user = self.current_user()

        ride = Ride.get_by_id(int(ride_id))

        if not ride or ride.driver == None:
            self.redirect('/rides')
            return None

        ride_json = grab_json(ride, self.properties)
        ride_json['date'] = toolbox.date_picker(ride.date)

        doRender(self, 'edit_ride.html', {
            'user': user,
            'ride': ride,
            'ride_json': ride_json
        })