forked from argomaintainer/argon
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin.py
More file actions
41 lines (32 loc) · 745 Bytes
/
admin.py
File metadata and controls
41 lines (32 loc) · 745 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import model
import sys,inspect
import argo_conf as cc
from argo_conf import ConfigTestDate as t
mrg = manager = model.manager
def init_database():
u'''
初始化数据库。
'''
print
print 'Init Database will kill all data. Are you sure?'
print
print 'Type INIT_YES to continue.',
if raw_input() == 'INIT_YES' :
print 'Init Database start ...'
model.init_database()
print 'Init Database DONE.'
print 'All DONE.'
def r():
reload(model)
global manager
manager = model.manager
def bpp(ll):
print '\n'.join(map(str, ll))
print u'''\
Enjoy it . :-)
loading model ...
loading manager ...
loading init_database ...
'''