def setUpAll(self): global data tables.create() mapper(tables.User, tables.users, properties = dict( address = relation(mapper(tables.Address, tables.addresses), lazy = False, uselist = False, private = True), orders = relation( mapper(tables.Order, tables.orders, properties = dict ( items = relation(mapper(tables.Item, tables.orderitems), lazy = False, uselist =True, private = True) )), lazy = True, uselist = True, private = True) ))
def home(): title=request.form.get("title",None) material=request.form.get("material",None) #print title #print material #Add sqlite3 interface for title and material of posts tables.create() #dict = tables.loadDict() if (title != None and material != None): tables.insert(title, material) dict[title] = material #return render_template("postbase.html",title=title,post=material,comments=[]) return redirect("/" + title) else: return render_template("home.html",dict=dict)
def setUp(self): self.conn = sqlite3.connect(':memory:') self.conn.row_factory = namedtuple_factory self.c = self.conn.cursor() tables.create(self.conn) logging.info('Setting up %s', self._testMethodName)
def setUpAll(self): tables.create() tables.data()
def setUpAll(self): tables.create()
def setUp(self): self.conn = sqlite3.connect(':memory:') self.conn.row_factory = namedtuple_factory self.c = self.conn.cursor() tables.create(self.conn)