Fixes and cleaning code
This commit is contained in:
parent
3eec0260da
commit
5393583180
3 changed files with 7 additions and 7 deletions
|
|
@ -8,7 +8,7 @@ import re
|
|||
from pathlib import Path
|
||||
from base64 import b64encode
|
||||
from cuchulu.libraries.db.webmodel import WebModel
|
||||
from cuchulu.modules.admin2.models.admin import UserAdmin2, LoginTries2
|
||||
from cuchulu.modules.admin2.models.admin import UserAdmin, LoginTries
|
||||
from subprocess import call
|
||||
from urllib.parse import urlparse
|
||||
|
||||
|
|
@ -223,9 +223,9 @@ def start():
|
|||
|
||||
conn=WebModel.connection()
|
||||
|
||||
useradmin=UserAdmin2(conn)
|
||||
useradmin=UserAdmin(conn)
|
||||
|
||||
logintries=LoginTries2(conn)
|
||||
logintries=LoginTries(conn)
|
||||
|
||||
# Check if db exists
|
||||
|
||||
|
|
@ -272,7 +272,7 @@ def start():
|
|||
f.close()
|
||||
|
||||
#config_text=config_text.replace("modules=['cuchulu.modules.welcome']", "modules=['cuchulu.modules.welcome', 'cuchulu.modules.lang']")
|
||||
config_text=config_text.replace("apps={'welcome': ['cuchulu.modules.welcome', 'welcome_app', '/'], 'lang': ['cuchulu.modules.lang', '', '']}", "apps={'welcome': ['cuchulu.modules.welcome', 'welcome_app', '/'], 'lang': ['cuchulu.modules.lang', '', ''], 'admin2': ['cuchulu.modules.admin2', 'admin_app', '/admin/']}")
|
||||
config_text=config_text.replace("apps={'welcome': ['cuchulu.modules.welcome', 'welcome_app', '/'], 'lang': ['cuchulu.modules.lang', '', '']}", "apps={'welcome': ['cuchulu.modules.welcome', 'welcome_app', '/'], 'lang': ['cuchulu.modules.lang', '', ''], 'admin': ['cuchulu.modules.admin', 'admin_app', '/']}")
|
||||
|
||||
with open(path_settings+'/config.py', 'w') as f:
|
||||
|
||||
|
|
|
|||
|
|
@ -377,8 +377,8 @@ class BooleanField(IntegerField):
|
|||
|
||||
required=False
|
||||
|
||||
self.yes_text=I18n.lang('common', 'yes', 'Yes')
|
||||
self.no_text=I18n.lang('common', 'no', 'No')
|
||||
self.yes_text=_('Yes')
|
||||
self.no_text=_('No')
|
||||
|
||||
super(IntegerField, self).__init__(name, size, required)
|
||||
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ def get_session():
|
|||
|
||||
"""Function for get the session from request object from bottle"""
|
||||
|
||||
return request.environ.get('session')
|
||||
return request.environ.get('session', Session())
|
||||
|
||||
def session_plugin(callback):
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue