Commits

ronald martinez  committed 0e99c2d

f5/f7

  • Participants
  • Parent commits 4fde6fd

Comments (0)

Files changed (4)

File controllers/api.py

                     logging.error(exc)
                     status_code = 5
                 else:
-                    
+
                     if _raw_image:
                         url = product.upload_img(_raw_image.get('body'))
 

File controllers/home.py

 
         id_want = self.get_argument('id_want', None)
         id_have = self.get_argument('id_have', None)
-        #id_want = '53148fb1-262d-4dfe-b2f4-9ad84858c710'
+
         product_have = None
         product_want = None
 

File controllers/product.py

                             logging.error(exc)
 
         self.render('site/product.html',
+            user=user,
             product=product,
             is_owner=is_owner,
             comments=comments,

File libs/indexable.py

 import boto
+import logging
 
 
 class Indexable(object):
     def __init__(self):
 
         self.cn = boto.connect_cloudsearch()
-        domain = conn.create_domain('products')
+        self.domain = self.cn.create_domain('products')
 
         #policy = domain.get_access_policies()
         #policy.allow_search_ip(our_ip)
         #policy.allow_doc_ip(our_ip)
 
     def save_document(self):
-        title = domain.create_index_field('title', 'text')
-        description = domain.create_index_field('description', 'text')
+        title = self.domain.create_index_field('title', 'text')
+        description = self.domain.create_index_field('description', 'text')
+        logging.info(title)
+        logging.info(description)