Beispiel #1
0
    def create(self):
        # create a new object

        # TODO: validate and sanitize submitted data throughly
        dc_title = request.POST.getone('dc_title')
        dc_description = request.POST.getone('dc_description')

        thing = Thing(title=dc_title, description=dc_description)
        Session.add(thing)
        Session.commit()

        redirect_to('show_thing', uuid=thing.uuid)