diff --git a/app.yaml b/app.yaml index 1975954..4c66fe0 100644 --- a/app.yaml +++ b/app.yaml @@ -1,4 +1,4 @@ -application: vaifreteapp +application: vaifreteapp2 version: 1 runtime: python27 api_version: 1 diff --git a/deliveryservice.py b/deliveryservice.py index 741cc3d..f7870e4 100644 --- a/deliveryservice.py +++ b/deliveryservice.py @@ -51,6 +51,8 @@ class GetUpdateUserRequest(messages.Message): vehicle = messages.StringField(3) social_id = messages.StringField(4) photo = messages.StringField(5) + name = messages.StringField(6) + phone = messages.StringField(7) class DeliveryService(remote.Service): @remote.method(GetDeliveriesRequest, Deliveries) @@ -79,7 +81,6 @@ def put_offer(self, request): logging.debug('Deliver: %s, User %s' % (str(deliver), str(app_user))) deliver_offer = DeliverOffer(deliver_fee=deliver, app_user=app_user, offer_info=request.offer_info, state='Made') - #deliver_offer.save() deliver_offer.put() return message_types.VoidMessage() @@ -105,7 +106,7 @@ def get_my_offers(self, request): query = DeliverOffer.all() #if request.user: - #query.filter('date <=', when) + query.filter('user_email =', request.user) offers = [] for offer_model in query.fetch(request.limit): @@ -130,6 +131,8 @@ def update_user(self, request): app_user.avg_price = request.avg_price app_user.social_id = request.social_id app_user.photo = request.photo + app_user.name = request.name + app_user.phone = request.phone app_user.put() diff --git a/urls.py b/urls.py index 416036f..b4b111a 100644 --- a/urls.py +++ b/urls.py @@ -19,11 +19,9 @@ urlpatterns = patterns('', (r'^$', 'views.index'), - #(r'^online$', 'views.online'), (r'^login$', 'views.login'), (r'^app/editUser$', 'views.editUser'), (r'^app/createDeliverFee$', 'views.createDeliverFee'), - #(r'^player/(?P.*)$', 'views.player'), (r'^app/welcome$', 'views.welcome'), (r'^app/listDeliveries$', 'views.listDeliveries'), (r'^app/listOffers', 'views.listOffers'), @@ -31,9 +29,5 @@ (r'^app/deliverCoordinates', 'views.deliverCoordinates'), (r'^app/deliverInfo', 'views.deliverInfo'), (r'^app/map', 'views.map'), - #(r'^admin/cameras$', 'views.listCam'), - #(r'^admin/camera/editar/(\d+)$', 'views.editCamera'), - #(r'^admin/camera/editar$', 'views.editCamera'), - #(r'^admin/camera/apagar/(\d+)$', 'views.delCamera'), (r'^logout$', 'views.logout') ) \ No newline at end of file