Skip to content

Commit

Permalink
integration
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelnferreira committed Nov 23, 2013
1 parent 26fdeb8 commit 3956f9d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
application: vaifreteapp
application: vaifreteapp2
version: 1
runtime: python27
api_version: 1
Expand Down
7 changes: 5 additions & 2 deletions deliveryservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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()
Expand All @@ -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):
Expand All @@ -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()

Expand Down
6 changes: 0 additions & 6 deletions urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,15 @@

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<path>.*)$', 'views.player'),
(r'^app/welcome$', 'views.welcome'),
(r'^app/listDeliveries$', 'views.listDeliveries'),
(r'^app/listOffers', 'views.listOffers'),
(r'^app/confirmOffer', 'views.confirmOffer'),
(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')
)

0 comments on commit 3956f9d

Please sign in to comment.