Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
chaos_familien_duell_frontend
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mowoe
chaos_familien_duell_frontend
Commits
678f4b5a
Commit
678f4b5a
authored
6 years ago
by
leo
Browse files
Options
Downloads
Patches
Plain Diff
~propably something
parent
0667c19e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
main.py
+11
-1
11 additions, 1 deletion
main.py
templates/index.jinja
+1
-1
1 addition, 1 deletion
templates/index.jinja
view/questions.py
+0
-6
0 additions, 6 deletions
view/questions.py
with
12 additions
and
8 deletions
main.py
+
11
−
1
View file @
678f4b5a
import
json
from
flask
import
Flask
from
view.questions
import
questions
from
model
import
Question
if
len
(
Question
.
select
())
is
0
:
with
open
(
"
questions.json
"
,
"
r
"
)
as
file
:
question_list
=
json
.
load
(
file
)
for
text
in
question_list
:
Question
.
create
(
text
=
text
)
app
=
Flask
(
__name__
)
app
.
config
[
'
SECRET_KEY
'
]
=
'
blubb
'
app
.
register_blueprint
(
questions
)
app
.
run
(
debug
=
True
)
app
.
run
(
host
=
'
0.0.0.0
'
)
This diff is collapsed.
Click to expand it.
templates/index.jinja
+
1
−
1
View file @
678f4b5a
...
...
@@ -12,6 +12,6 @@
<input class="form-control" type="text" name="{{questid}}" value="">
<br><br>
{% endfor %}
<input type="submit" value="
Submit
">
<input type="submit" value="
Abschicken
">
</form>
{% endblock %}
This diff is collapsed.
Click to expand it.
view/questions.py
+
0
−
6
View file @
678f4b5a
...
...
@@ -11,12 +11,6 @@ def index():
return
render_template
(
"
feedback.jinja
"
,
message
=
"
Vielen Dank für deine Antworten!
"
)
return
render_template
(
"
index.jinja
"
,
questions
=
Question
.
select
())
@questions.route
(
"
/debug
"
)
def
debug
():
Question
.
create
(
text
=
"
Guten Morgen Linus!
"
)
Question
.
create
(
text
=
"
Wer hat den Keks aus der Dose geklaut
"
)
return
"
nice
"
@questions.route
(
"
/submit
"
,
methods
=
[
"
POST
"
])
def
submit_answers
():
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment