Fix in console.py
This commit is contained in:
parent
642371ccef
commit
a0c7d7bc20
1 changed files with 11 additions and 2 deletions
11
console.py
11
console.py
|
|
@ -5,13 +5,14 @@ import os
|
||||||
import shutil
|
import shutil
|
||||||
import getpass
|
import getpass
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
from paramecio.cromosoma import WebModel
|
||||||
from paramecio.modules.admin.models.admin import UserAdmin
|
from paramecio.modules.admin.models.admin import UserAdmin
|
||||||
|
|
||||||
def start():
|
def start():
|
||||||
|
|
||||||
parser=argparse.ArgumentParser(description='A tool for create new paramecio sites')
|
parser=argparse.ArgumentParser(description='A tool for create new paramecio sites')
|
||||||
|
|
||||||
parser.add_argument('--path', help='The path where the paramecio site is created', required=True)
|
parser.add_argument('--path', help='The path where the paramecio site is located', required=True)
|
||||||
|
|
||||||
args=parser.parse_args()
|
args=parser.parse_args()
|
||||||
|
|
||||||
|
|
@ -72,6 +73,8 @@ def start():
|
||||||
|
|
||||||
host_db=input('MySQL database server host, by default localhost: ').strip()
|
host_db=input('MySQL database server host, by default localhost: ').strip()
|
||||||
|
|
||||||
|
db=input('MySQL database name, by default paramecio: ').strip()
|
||||||
|
|
||||||
user_db=input('MySQL database user, by default root: ').strip()
|
user_db=input('MySQL database user, by default root: ').strip()
|
||||||
|
|
||||||
pass_db=getpass.getpass('MySQL database password, by default "": ').strip()
|
pass_db=getpass.getpass('MySQL database password, by default "": ').strip()
|
||||||
|
|
@ -91,6 +94,12 @@ def start():
|
||||||
f.write("\n\n"+connection)
|
f.write("\n\n"+connection)
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
|
#user=UserAdmin()
|
||||||
|
|
||||||
|
sql='create database '+
|
||||||
|
|
||||||
|
if not WebModel.query(WebModel, sql)
|
||||||
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# Question about install admin site.
|
# Question about install admin site.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue