Skip to content
Snippets Groups Projects
Commit 920c7fd6 authored by Jan Mach's avatar Jan Mach
Browse files

It works again - sort of

Refactoring to at least get working home page.

(Redmine issue: #7544)
parent 8efed232
No related branches found
No related tags found
No related merge requests found
Showing
with 162 additions and 163 deletions
......@@ -56,7 +56,7 @@ parsetab.py
/lib/hawat/static/vendor/
/lib/hawat/templates/iana-tz-data/
/lib/hawat/blueprints/design/static/vendor/
/lib/vial/blueprints/design_bs3/static/vendor/
/lib/hawat/blueprints/design_bs3/static/vendor/
# Local NodeJS modules for Grunt.
/node_modules/
......
......@@ -8,5 +8,4 @@ recursive-include lib/hawat/templates *
recursive-include lib/hawat/migrations *
recursive-include lib/hawat/translations *
recursive-include lib/hawat/blueprints *
recursive-include lib/vial/blueprints *
global-exclude *.pyc
......@@ -40,11 +40,11 @@ HAWAT_LOG_FILE = '/var/tmp/mentat-hawat.py.log'
HAWAT_LOG_FILE_LEVEL = 'debug'
ENABLED_BLUEPRINTS = [
'vial.blueprints.auth',
'vial.blueprints.auth_api',
'vial.blueprints.design_bs3',
'vial.blueprints.devtools',
'vial.blueprints.changelogs',
'hawat.blueprints.auth',
'hawat.blueprints.auth_api',
'hawat.blueprints.design_bs3',
'hawat.blueprints.devtools',
'hawat.blueprints.changelogs',
'hawat.blueprints.auth_env',
'hawat.blueprints.auth_dev',
......
......@@ -33,11 +33,11 @@ HAWAT_SEARCH_QUERY_QUOTA = 7
# List of enabled application blueprints.
ENABLED_BLUEPRINTS = [
'vial.blueprints.auth',
'vial.blueprints.auth_api',
'vial.blueprints.design_bs3',
'vial.blueprints.devtools',
'vial.blueprints.changelogs',
'hawat.blueprints.auth',
'hawat.blueprints.auth_api',
'hawat.blueprints.design_bs3',
'hawat.blueprints.devtools',
'hawat.blueprints.changelogs',
'hawat.blueprints.auth_env',
#'hawat.blueprints.auth_dev',
......
......@@ -15,7 +15,7 @@ if [ $? -ne 0 ]; then
fi
for dbname in "mentat_events" "mentat_main" "mentat_utest" "mentat_bench" "vial"
for dbname in "mentat_events" "mentat_main" "mentat_utest" "mentat_bench"
do
sudo -u postgres psql -c "SELECT datname FROM pg_catalog.pg_database;" | grep $dbname > /dev/null
if [ $? -ne 0 ]; then
......
......@@ -6,11 +6,11 @@ HAWAT_LOG_DEFAULT_LEVEL = 'debug'
HAWAT_LOG_FILE = '/var/tmp/mentat-hawat.py.log'
HAWAT_LOG_FILE_LEVEL = 'debug'
ENABLED_BLUEPRINTS = [
'vial.blueprints.auth',
'vial.blueprints.auth_api',
'vial.blueprints.design_bs3',
'vial.blueprints.devtools',
'vial.blueprints.changelogs',
'hawat.blueprints.auth',
'hawat.blueprints.auth_api',
'hawat.blueprints.design_bs3',
'hawat.blueprints.devtools',
'hawat.blueprints.changelogs',
'hawat.blueprints.auth_env',
'hawat.blueprints.auth_dev',
......
......@@ -28,7 +28,7 @@ import pyzenkit.utils
from mentat.const import CKEY_CORE_DATABASE, CKEY_CORE_DATABASE_SQLSTORAGE
import vial
import hawat
from hawat.const import CFGKEY_MENTAT_CORE
import hawat.base
......@@ -75,6 +75,7 @@ def create_app_full(
app.config.from_pyfile(config_file)
if config_env and os.getenv(config_env, None):
app.config.from_envvar(config_env)
config_func = config_func or _config_app
if config_func and callable(config_func):
config_func(app.config)
......
[python: hawat/**.py]
[python: mentat/**.py]
[python: vial/**.py]
[jinja2: hawat/**/templates/**.html]
[jinja2: hawat/**/templates/**.txt]
extensions=jinja2.ext.autoescape,jinja2.ext.with_
This diff is collapsed.
......@@ -16,7 +16,7 @@ import flask_login
from flask_babel import lazy_gettext
import hawat.const
from hawat.app import HawatBlueprint
from hawat.base import HawatBlueprint
from hawat.view import SimpleView
from hawat.view.mixin import HTMLMixin
......
{%- extends "_layout.html" %}
{% block title %}{{ vial_current_view.get_view_title() }}{% endblock %}
{% block title %}{{ hawat_current_view.get_view_title() }}{% endblock %}
{%- block content %}
<h2>{{ vial_current_view.get_view_title() }}</h2>
<h2>{{ hawat_current_view.get_view_title() }}</h2>
<hr>
<div class="row">
<div class="well col-md-6 col-md-offset-3">
......
{%- extends "_layout.html" %}
{% block title %}{{ vial_current_view.get_view_title() }}{% endblock %}
{% block title %}{{ hawat_current_view.get_view_title() }}{% endblock %}
{%- block content %}
<h2>{{ vial_current_view.get_view_title() }}</h2>
<h2>{{ hawat_current_view.get_view_title() }}</h2>
<hr>
<div class="row">
<div class="well col-md-6 col-md-offset-3">
......
{{ _('Dear administrator,') | wordwrap }}
{{ _('a new account "%(item_id)s" was just registered in %(app_name)s. Please review the following request and activate or delete the account:', item_id = account.login, app_name = vial_appname) | wordwrap }}
{{ _('a new account "%(item_id)s" was just registered in %(app_name)s. Please review the following request and activate or delete the account:', item_id = account.login, app_name = hawat_appname) | wordwrap }}
{{ '{:16s}'.format(_('Login:')) }} {{ account.login }}
{{ '{:16s}'.format(_('Full name:')) }} {{ account.fullname }}
......@@ -23,4 +23,4 @@
{{ _('Have a nice day') | wordwrap }}
-- {{ vial_appname }}
-- {{ hawat_appname }}
{{ _('Dear group manager,') | wordwrap }}
{{ _('a new account "%(item_id)s" was just registered in %(app_name)s and user requested membership in your group "%(group_id)s". Please review the following information and approve or reject the request:', item_id = account.login, app_name = vial_appname, group_id = group.name) | wordwrap }}
{{ _('a new account "%(item_id)s" was just registered in %(app_name)s and user requested membership in your group "%(group_id)s". Please review the following information and approve or reject the request:', item_id = account.login, app_name = hawat_appname, group_id = group.name) | wordwrap }}
{{ '{:16s}'.format(_('Login:')) }} {{ account.login }}
{{ '{:16s}'.format(_('Full name:')) }} {{ account.fullname }}
......@@ -16,4 +16,4 @@
{{ _('Have a nice day') | wordwrap }}
-- {{ vial_appname }}
-- {{ hawat_appname }}
{{ _('Dear user,') | wordwrap }}
{{ _('this email is a confirmation, that you have successfully registered your new user account "%(item_id)s" in %(app_name)s.', item_id = account.login, app_name = vial_appname) | wordwrap }}
{{ _('this email is a confirmation, that you have successfully registered your new user account "%(item_id)s" in %(app_name)s.', item_id = account.login, app_name = hawat_appname) | wordwrap }}
{{ _('During the registration process you have provided following information:') | wordwrap }}
......@@ -27,4 +27,4 @@
{{ _('Have a nice day') | wordwrap }}
-- {{ vial_appname }}
-- {{ hawat_appname }}
......@@ -57,7 +57,7 @@ from flask_babel import gettext, lazy_gettext
import hawat.const
import hawat.forms
import hawat.db
from hawat.app import HawatBlueprint
from hawat.base import HawatBlueprint
from hawat.view import ItemChangeView
from hawat.view.mixin import HTMLMixin, SQLAlchemyMixin
......
......@@ -48,7 +48,7 @@ from flask_babel import lazy_gettext
import hawat.const
import hawat.forms
import hawat.db
from hawat.app import HawatBlueprint
from hawat.base import HawatBlueprint
from hawat.view import BaseLoginView, BaseRegisterView
from hawat.view.mixin import HTMLMixin, SQLAlchemyMixin
......
{{ _('Dear administrator,') | wordwrap }}
{{ _('a new account "%(item_id)s" was just registered in %(app_name)s. Please review the following request and activate or delete the account:', item_id = account.login, app_name = vial_appname) | wordwrap }}
{{ _('a new account "%(item_id)s" was just registered in %(app_name)s. Please review the following request and activate or delete the account:', item_id = account.login, app_name = hawat_appname) | wordwrap }}
{{ '{:16s}'.format(_('Login:')) }} {{ account.login }}
{{ '{:16s}'.format(_('Full name:')) }} {{ account.fullname }}
......@@ -24,4 +24,4 @@
{{ _('Have a nice day') | wordwrap }}
-- {{ vial_appname }}
-- {{ hawat_appname }}
{{ _('Dear group manager,') | wordwrap }}
{{ _('a new account "%(item_id)s" was just registered in %(app_name)s and user requested membership in your group "%(group_id)s". Please review the following information and approve or reject the request:', item_id = account.login, app_name = vial_appname, group_id = group.name) | wordwrap }}
{{ _('a new account "%(item_id)s" was just registered in %(app_name)s and user requested membership in your group "%(group_id)s". Please review the following information and approve or reject the request:', item_id = account.login, app_name = hawat_appname, group_id = group.name) | wordwrap }}
{{ '{:16s}'.format(_('Login:')) }} {{ account.login }}
{{ '{:16s}'.format(_('Full name:')) }} {{ account.fullname }}
......@@ -17,4 +17,4 @@
{{ _('Have a nice day') | wordwrap }}
-- {{ vial_appname }}
-- {{ hawat_appname }}
{{ _('Dear user,') | wordwrap }}
{{ _('this email is a confirmation, that you have successfully registered your new user account "%(item_id)s" in %(app_name)s.', item_id = account.login, app_name = vial_appname) | wordwrap }}
{{ _('this email is a confirmation, that you have successfully registered your new user account "%(item_id)s" in %(app_name)s.', item_id = account.login, app_name = hawat_appname) | wordwrap }}
{{ _('During the registration process you have provided following information:') | wordwrap }}
......@@ -28,4 +28,4 @@
{{ _('Have a nice day') | wordwrap }}
-- {{ vial_appname }}
-- {{ hawat_appname }}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment