Fixes in config_admin
This commit is contained in:
parent
6f298d469c
commit
8558f0d9c1
1 changed files with 18 additions and 6 deletions
24
console.py
24
console.py
|
|
@ -115,13 +115,25 @@ def start():
|
||||||
admin=input('Do you want create admin site? y/n: ')
|
admin=input('Do you want create admin site? y/n: ')
|
||||||
|
|
||||||
if admin=='y' or admin=='Y':
|
if admin=='y' or admin=='Y':
|
||||||
useradmin=UserAdmin()
|
|
||||||
|
|
||||||
sql=useradmin.create_table()
|
try:
|
||||||
if not WebModel.query(WebModel, sql):
|
|
||||||
print('Error: cannot create table admin, you can create this table with padmin.py')
|
shutil.copy(workdir+'/settings/config_admin.py.sample', path_settings+'/config_admin.py')
|
||||||
else:
|
|
||||||
print('Created admin site...')
|
useradmin=UserAdmin()
|
||||||
|
|
||||||
|
sql=useradmin.create_table()
|
||||||
|
|
||||||
|
if not WebModel.query(WebModel, sql):
|
||||||
|
print('Error: cannot create table admin, you can create this table with padmin.py')
|
||||||
|
else:
|
||||||
|
print('Created admin site...')
|
||||||
|
|
||||||
|
except:
|
||||||
|
|
||||||
|
print('Error: cannot copy the file padmin.py. Check if exists and if you have permissions for this task')
|
||||||
|
|
||||||
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# Question about install admin site.
|
# Question about install admin site.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue