Added new features for create and regenerate modules

This commit is contained in:
Antonio de la Rosa 2016-03-18 03:50:39 +01:00
parent 11dd833f08
commit 934e4e1a1b
4 changed files with 37 additions and 2 deletions

View file

@ -7,6 +7,7 @@ import getpass
from pathlib import Path
from paramecio.cromosoma.webmodel import WebModel
from paramecio.modules.admin.models.admin import UserAdmin
from paramecio.create_module import regenerate_modules_config
def start():
@ -74,6 +75,22 @@ def start():
except:
print('Error: cannot copy the file i18nadmin.py. Check if exists and if you have permissions for this task')
try:
shutil.copy(workdir+'/frontend/regenerate.py', args.path+'/regenerate.py')
except:
print('Error: cannot copy the file regenerate.py. Check if exists and if you have permissions for this task')
try:
shutil.copy(workdir+'/frontend/create_module.py', args.path+'/create_module.py')
except:
print('Error: cannot copy the file create_module.py. Check if exists and if you have permissions for this task')
if args.symlink!=None:
try:
@ -82,6 +99,10 @@ def start():
except:
print('Error: cannot symlink paramecio in new site')
#Regenerate modules
regenerate_modules_config()
# Question about mysql configuration? If yes, install configuration
s=input('Do you want use paramecio with MySQL database? y/n: ')
@ -172,4 +193,4 @@ def start():
if __name__=="__main__":
start()
start()

View file

@ -0,0 +1,7 @@
#!/usr/bin/python3
from paramecio.create_module import start
start()

View file

@ -0,0 +1,7 @@
#!/usr/bin/python3
from paramecio.create_module import regenerate_modules_config
regenerate_modules_config()