Commit d1d6fd42 authored by Vladislav Rykov's avatar Vladislav Rykov
Browse files

applications DAO works

parent 7b46acea
...@@ -143,10 +143,10 @@ def new_application(): ...@@ -143,10 +143,10 @@ def new_application():
def app(): def app():
ah = ad.ApplicationDao() ah = ad.ApplicationDao()
if request.method == 'GET': if request.method == 'GET':
app = ah.get(request.form['appkey']) app = ah.get(request.args.get('appkey'))
devs = get_devs(app[1]) 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: else:
if request.form['appname'] == '': if request.form['appname'] == '':
error = 'Application name cannot be empty.' error = 'Application name cannot be empty.'
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<h4> Explore your applications or create a new one. </h4> <h4> Explore your applications or create a new one. </h4>
<ol> <ol>
{% for app in apps %} {% for app in apps %}
<li><a href="/apps?appkey={{ app[1] }}"> {{ app[0] }} </a></li> <li><a href="/app?appkey={{ app[1] }}"> {{ app[0] }} </a></li>
{% endfor %} {% endfor %}
</ol> </ol>
<a href="/new-app"><button class="btn btn-primary" type="submit">New Application</button></a> <a href="/new-app"><button class="btn btn-primary" type="submit">New Application</button></a>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment