Skip to content
Snippets Groups Projects
Commit 577d6239 authored by Sebastian Lobinger's avatar Sebastian Lobinger
Browse files

remove test_hub folder - not needed

parent f2b425d7
Branches 11-write-example-app
Tags
1 merge request!10Resolve "Example App schreiben"
This commit is part of merge request !10. Comments created here will be created in the context of that merge request.
Showing
with 0 additions and 161 deletions
from sams_hub import SAMSHub
hub = SAMSHub(__name__)
\ No newline at end of file
DEBUG: true
jinja2_strict_undefined: true
#samsHUB:
# module_base_path: /modules/ # default
\ No newline at end of file
- hallo_module
\ No newline at end of file
from flask_microservices import Router
from . import urls
#from samsHUB.functions import get_enabled_modules
print(views.hallo_module)
module_title: &module_title Hallo Modul
module_name: *module_title
hallo module: >-
Hallo Modul!
beschreibung: >-
Eine Beshreibung zu was auch immer das 'hallo module' macht.
teststring: Ein Teststring
subview_description: >-
Dies ist ein Subview des Hallo Moduls. Das Modul kann vile weitere Subviews
haben, aber dieses ist bietet die Möglichkeit über ein Menü im SAMShub
erreichbar zu sein.
\ No newline at end of file
module_title: &module_title Hello Module
module_name: *module_title
hallo module: >-
Hello Module!
beschreibung: >-
This is the description of what ever this 'hello module' does.
teststring: A Teststring
subview_title: Subview
subview_name: Subentry
subviews_description: >-
This is a Subview of the 'hello module'. The Module may use much more subviews,
but this one is potentialy reachable in a menu of the SAMAShub.
home_string: Start
\ No newline at end of file
default_language: en
views:
- url: &hallo-module
function: views.hallo_module
menu:
- url: *hallo-module
name_string: module_title
submenu:
- url: /modules/hallo-module/subview
name_string: subview_name
subviews:
- url: /
name_string: home_string
{% extends "base-struct.html" %}
{% block title %}Index{% endblock %}
{% block head %} {{ super() }} {% endblock %}
{% block content %}
<h1> {{ mod_lang['hallo module'] }}</h1>
<p> {{ mod_lang['beschreibung'] }}</p>
{% endblock %}
{% block header %}samsHUB {{ mod_lang['teststring'] }} {% endblock %}
\ No newline at end of file
{% extends "base-struct.html" %}
{% block title %}Index{% endblock %}
{% block head %} {{ super() }} {% endblock %}
{% block content %}
<h1> {{ mod_lang['hallo module'] }} - {{ mod_lang['subview_title'] }}</h1>
<p> {{ mod_lang['subview_description'] }}</p>
{% endblock %}
{% block header %}samsHUB {{ mod_lang['teststring'] }} {% endblock %}
\ No newline at end of file
from flask_microservices import url
from . import views
urlpatterns = [
url('/modules/hallo-module', view_func=views.hallo_module, name='hallo_module')
, url(
'/modules/hallo-module/subview', view_func=views.subview
, name='hallo_module_subview')
]
\ No newline at end of file
from flask import render_template
def hallo_module():
return render_template('hallo_module.html')
def subview():
return render_template('subview.html')
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
{% block head %}
<title>samsHub - {% block title %}{% endblock title %}</title>
<link rel="stylesheet" href="/static/style.css" />
{% endblock head %}
</head>
<body>
<div id="header">{% block header %}{% endblock %}</div>
<div id="global_app_menu">
<ul>
{% for entry in menu_list recursive%}
<li><a href='{{ entry.url }}'>{{ entry.name }}</a></li>
{% if entry.subentries %}
<ul class="submenu">{{ loop(entry.subentries) }}</ul>
{% endif %}
{% endfor %}
</ul>
</div>
<div id="content">{% block content %}{% endblock %}</div>
<div id="footer">
{% block footer %}
&copy; Copyright 2008 by <a href="http://domain.invalid/">you</a>.
{% endblock %}
</div>
</body>
</html>
\ No newline at end of file
{% extends "base-struct.html" %}
{% block title %}Index{% endblock %}
{% block head %} {{ super() }} {% endblock %}
{% block content %}
<h1>Home</h1>
<p>samsHub Startseite: {{ hub_lang['home_wellcome_message']|safe }}</p>
{% endblock %}
{% block header %}samsHUB -{% endblock %}
\ No newline at end of file
{% extends "base-struct.html" %}
{% block content %}
<div class="hold-transition login-page" style="padding-bottom: 1px;">
<div class="login-box">
<div class="login-logo" style="font-size: 32px; padding-top: 20px;">
{{ hub_lang['zid_long'] | safe }}
</div>
<!-- /.login-logo -->
<div class="login-box-body">
<form action="/login" method="post">
<div class="form-group has-feedback">
<input name="username" type="username" class="form-control"
placeholder="{{hub_lang['username']}}">
<span class="fa fa-user form-control-feedback"></span>
</div>
<div class="form-group has-feedback">
<input name="password" type="password" class="form-control"
placeholder="{{hub_lang['password']}}">
<span class="fa fa-lock form-control-feedback"></span>
</div>
<div class="row">
<div class="col-xs-8">
<div class="checkbox icheck">
<label>
<input type="checkbox"> Remember me
</label>
</div>
</div>
<!-- /.col -->
<div class="col-xs-4">
<button type="submit" class="btn btn-primary btn-block btn-flat">
Sign in</button>
</div>
<!-- /.col -->
</div>
</form>
</div>
<!-- /.login-box-body -->
</div>
<!-- /.login-box -->
</div>
{% endblock %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment