コード例 #1
0
ファイル: scripts.py プロジェクト: burhan/solace
 def run(self):
     from solace import database
     if self.drop_first:
         database.drop_tables()
         print 'dropped existing tables'
     database.init()
     print 'created database tables'
コード例 #2
0
 def run(self):
     from solace import database
     if self.drop_first:
         database.drop_tables()
         print 'dropped existing tables'
     database.init()
     print 'created database tables'
コード例 #3
0
ファイル: scripts.py プロジェクト: burhan/solace
 def run(self):
     from solace import database, models
     database.drop_tables()
     print 'dropped existing tables'
     database.init()
     print 'created database tables'
     admin = models.User(self.username, self.email, self.password,
                         is_admin=True)
     database.session.commit()
     print 'Created %s:%s (%s)' % (self.username, self.password,
                                   self.email)
コード例 #4
0
 def run(self):
     from solace import database, models
     database.drop_tables()
     print 'dropped existing tables'
     database.init()
     print 'created database tables'
     admin = models.User(self.username,
                         self.email,
                         self.password,
                         is_admin=True)
     database.session.commit()
     print 'Created %s:%s (%s)' % (self.username, self.password, self.email)