**update 0**
My `def post()` code has changed dramatically because originally it was base on a digital form which included both checkboxes and text entry fields, not just text entry fields, which is the current design to be more paper-like. However, as a result I have other problems which may be solved by one of the proposed solutions, but I cannot exactly follow that proposed solution, so let me try to explain new design and the problems. 

The smaller problem is the inefficiency of my implementation because in the `def post()` I create a distinct `name` for each input timeslot which is a long string `<courtname><timeslotstarthour><timeslotstartminute>`. In my code this `name` is read in a nested `for` loop with the following snippet [very inefficient, I imagine].

```
tempreservation=courtname+str(time[0])+str(time[1])
name = self.request.get('tempreservation',None)

```

The more serious immediate problem is that my `def post()` code is never read and I cannot figure out why (and maybe it wasn't being read before, either, but I had not tested that far). I wonder if the problem is that for now I want both the post and the get to "finish" the same way. The first line below is for the post() and the second is for the get().

```
return webapp2.redirect("/read/%s" % location_id)
self.render_template('read.html', {'courts': courts,'location': location, ... etc ...}

```

My new post() is as follows. Notice I have left in the code the `logging.info` to see if I ever get there.

```
class MainPageCourt(BaseHandler):

    def post(self, location_id):
        logging.info("in MainPageCourt post  ")
        startTime = self.request.get('startTime')
        endTime = self.request.get('endTime')
        day = self.request.get('day')
        weekday = self.request.get('weekday')
        nowweekday = self.request.get('nowweekday')
        year = self.request.get('year')
        month = self.request.get('month')
        nowmonth = self.request.get('nowmonth')
        courtnames = self.request.get_all('court')
        for c in courtnames:
            logging.info("courtname: %s " % c)
        times=intervals(startTime,endTime)
        for courtname in courtnames:
            for time in times:
                tempreservation=courtname+str(time[0])+str(time[1])
                name = self.request.get('tempreservation',None)
                if name:
                    iden = courtname
                    court = db.Key.from_path('Locations',location_id,'Courts', iden)
                    reservation = Reservations(parent=court) 
                    reservation.name = name
                    reservation.starttime = time
                    reservation.year = year
                    reservation.nowmonth = int(nowmonth)
                    reservation.day = int(day)
                    reservation.nowweekday = int(nowweekday)
                    reservation.put()
        return webapp2.redirect("/read/%s" % location_id)

```

Eventually I want to add checking/validating to the above get() code by comparing the existing Reservations data in the datastore with the implied new reservations, and kick out to an alert which tells the user of any potential problems which she can address.

I would also appreciate any comments on these two problems.

**end of update 0**

My app is for a community tennis court. I want to replace the paper sign up sheet with an online digital sheet that mimics a paper sheet. As unlikely as it seems there may be "transactional" conflicts where two tennis appointments collide. So how do I give the second appointment maker a heads up to the conflict but also give the successful party the opportunity to alter her appointment like she would on paper (with an eraser).

Each half hour is a time slot on the form. People normally sign up for multiple half hours at one time before "submitting".

So in my code within a loop I do a get\_all. If any get succeeds I want to give the user control over whether to accept the put() or not. I am still thinking the put() would be an all or nothing, not selective.

So my question is, do I need to make part of the code use an explicit "transaction"?

```
class MainPageCourt(BaseHandler):

    def post(self, location_id):
        reservations = self.request.get_all('reservations')
        day = self.request.get('day')
        weekday = self.request.get('weekday')
        nowweekday = self.request.get('nowweekday')
        year = self.request.get('year')
        month = self.request.get('month')
        nowmonth = self.request.get('nowmonth')
        if not reservations:
            for r in reservations:
                r=r.split()
                iden = r[0]
                temp = iden+' '+r[1]+' '+r[2]
                court = db.Key.from_path('Locations',location_id,'Courts', iden)
                reservation = Reservations(parent=court) 
                reservation.starttime = [int(r[1]),int(r[2])]
                reservation.year = int(r[3])
                reservation.nowmonth = int(r[4])
                reservation.day = int(r[5])
                reservation.nowweekday = int(nowweekday)
                reservation.name = self.request.get(temp)
                reservation.put()
            return webapp2.redirect("/read/%s" % location_id)
        else:
            ... this important code is not written, pending ...
            return webapp2.redirect("/adjust/%s" % location_id)

```