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

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()

View file

@ -11,7 +11,7 @@ if sys.version_info < (3, 3):
#import paramecio #import paramecio
setup(name='paramecio', setup(name='paramecio',
version='0.1.0b2', version='0.1.1b',
description='Fast and simple Framework based in bottle and Mako.', description='Fast and simple Framework based in bottle and Mako.',
long_description='This framework is simple framework used for create web apps. Paramecio is modular and fast. By default have a module called admin that can be used for create ', long_description='This framework is simple framework used for create web apps. Paramecio is modular and fast. By default have a module called admin that can be used for create ',
author='Antonio de la Rosa Caballero', author='Antonio de la Rosa Caballero',