Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Vladislav Rykov
THSO.server
Commits
d1d6fd42
Commit
d1d6fd42
authored
Apr 08, 2020
by
Vladislav Rykov
Browse files
applications DAO works
parent
7b46acea
Changes
3
Show whitespace changes
Inline
Side-by-side
dao/application/application.pyc
View file @
d1d6fd42
No preview for this file type
server.py
View file @
d1d6fd42
...
...
@@ -143,10 +143,10 @@ def new_application():
def
app
():
ah
=
ad
.
ApplicationDao
()
if
request
.
method
==
'GET'
:
app
=
ah
.
get
(
request
.
form
[
'appkey'
]
)
app
=
ah
.
get
(
request
.
args
.
get
(
'appkey'
)
)
devs
=
get_devs
(
app
[
1
])
return
render_template
(
'app.html'
,
app
=
app
,
devs
=
devs
)
return
render_template
(
'app.html'
,
app
=
app
[
1
]
,
devs
=
devs
)
else
:
if
request
.
form
[
'appname'
]
==
''
:
error
=
'Application name cannot be empty.'
...
...
templates/index.html
View file @
d1d6fd42
...
...
@@ -11,7 +11,7 @@
<h4>
Explore your applications or create a new one.
</h4>
<ol>
{% for app in apps %}
<li><a
href=
"/app
s
?appkey={{ app[1] }}"
>
{{ app[0] }}
</a></li>
<li><a
href=
"/app?appkey={{ app[1] }}"
>
{{ app[0] }}
</a></li>
{% endfor %}
</ol>
<a
href=
"/new-app"
><button
class=
"btn btn-primary"
type=
"submit"
>
New Application
</button></a>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment