コード例 #1
0
    def get(self):
        self.auth()
        user = self.current_user()

        properties = ['name', 'email', 'phone', 'zip']

        user_json = grab_json(user, properties)

        doRender(self, 'details.html', {'user': user, 'user_json': user_json})
コード例 #2
0
ファイル: users.py プロジェクト: AparnaPonguru/rideshare-1
    def get(self):
        self.auth()
        user = self.current_user()

        properties = ['name', 'email', 'phone', 'zip']

        user_json = grab_json(user, properties)

        doRender(self, 'details.html', {
            'user': user,
            'user_json': user_json
        })
コード例 #3
0
    def get(self, user_id):
        self.auth()

        user = self.current_user()

        properties = ['name', 'email', 'phone', 'zip', 'address', 'lat', 'lng']

        user_json = grab_json(user, properties)

        if not user.key().id() == int(user_id):
            self.redirect('/user/' + user_id)
            return None
        else:
            doRender(self, 'edit_user.html', {
                'user': user,
                'user_json': user_json
            })
コード例 #4
0
ファイル: users.py プロジェクト: AparnaPonguru/rideshare-1
    def get(self, user_id):
        self.auth()

        user = self.current_user()

        properties = ['name', 'email', 'phone', 'zip', 'address', 'lat', 'lng']

        user_json = grab_json(user, properties)

        if not user.key().id() == int(user_id):
            self.redirect('/user/' + user_id)
            return None
        else:
            doRender(self, 'edit_user.html', {
                'user': user,
                'user_json': user_json
            })
コード例 #5
0
ファイル: events.py プロジェクト: ysubtle/rideshare
    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
        })
コード例 #6
0
ファイル: events.py プロジェクト: AparnaPonguru/rideshare-1
    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
        })
コード例 #7
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
        })
コード例 #8
0
ファイル: circles.py プロジェクト: AparnaPonguru/rideshare-1
    def get(self, circle_id):
        self.auth()

        user = self.current_user()

        circle = Circle.get_by_id(int(circle_id))

        if not circle:
            self.redirect('/circles')

        properties = ['name', 'description', 'privacy', 'permission', 'color']

        circle_json = grab_json(circle, properties)
        
        doRender(self, 'edit_circle.html', {
            'user': user,
            'circle': circle,
            'circle_json': circle_json
        })
コード例 #9
0
    def get(self, circle_id):
        self.auth()

        user = self.current_user()

        circle = Circle.get_by_id(int(circle_id))

        if not circle:
            self.redirect('/circles')

        properties = ['name', 'description', 'privacy', 'permission', 'color']

        circle_json = grab_json(circle, properties)

        doRender(self, 'edit_circle.html', {
            'user': user,
            'circle': circle,
            'circle_json': circle_json
        })