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

add Main app and Extra app to ExampleApp

parent 359b3bf9
No related branches found
No related tags found
1 merge request!10Resolve "Example App schreiben"
from flask import render_template
def home():
return render_template('home.html')
\ No newline at end of file
hello_message: 'Hello extra page!'
men_index: 'Extra page'
default_language: 'en'
views:
- url: &index_url ''
function: 'home'
menu:
- url: *index_url
name_string: men_index
\ No newline at end of file
def hello_string(): from flask import render_template
return 'Hello'
\ No newline at end of file def home():
return render_template('home.html')
\ No newline at end of file
{} hello_message: 'Hello extra page!'
\ No newline at end of file men_index: 'Extra page'
men_index_repo_link: 'Gitlab Repo'
\ No newline at end of file
default_language: 'de' default_language: 'de'
views: views:
- url: 'hello_string' - url: &index_url ''
function: 'hello_string' function: 'home'
\ No newline at end of file menu:
- url: *index_url
name_string: men_index
menu:
- url: 'https://git.imp.fu-berlin.de/slobinger/sams-classes'
external: true
name_string: men_index_repo_link
\ No newline at end of file
...@@ -5,4 +5,5 @@ exampleApp: ...@@ -5,4 +5,5 @@ exampleApp:
default_language: de default_language: de
main_app: 'ExampleApp.Main' main_app: 'ExampleApp.Main'
apps: apps:
- 'ExampleApp.Main' - 'ExampleApp.Main'
\ No newline at end of file - 'ExampleApp.Extra'
\ No newline at end of file
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
<div id="header">{% block header %}{% endblock %}</div> <div id="header">{% block header %}{% endblock %}</div>
<div id="global_app_menu"> <div id="global_app_menu">
<ul> <ul>
{% for entry in menu_list recursive%} {% for entry in menu recursive%}
<li><a href='{{ entry.url }}'>{{ entry.name }}</a></li> <li><a href='{{ entry.url }}'>{{ entry.name }}</a></li>
{% if entry.subentries %} {% if entry.menu %}
<ul class="submenu">{{ loop(entry.subentries) }}</ul> <ul class="submenu">{{ loop(entry.menu) }}</ul>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</ul> </ul>
......
...@@ -3,6 +3,6 @@ ...@@ -3,6 +3,6 @@
{% block head %} {{ super() }} {% endblock %} {% block head %} {{ super() }} {% endblock %}
{% block content %} {% block content %}
<h1>Home</h1> <h1>Home</h1>
<p>samsHub Startseite: {{ hub_lang['home_wellcome_message']|safe }}</p> <p>samsHub Startseite: {{ app_lang['hello_message'] }}</p>
{% endblock %} {% endblock %}
{% block header %}samsHUB -{% endblock %} {% block header %}samsHUB -{% endblock %}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment