Skip to content

Commit 56215d2

Browse files
committed
add: routes
1 parent 3120cd2 commit 56215d2

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

routes.py

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
from aiohttp import web
2+
import aiohttp_jinja2
3+
import jinja2
4+
from handlers.functions import main_page, sign_up, sign_in, create_application, account_page, user_applications, user_votes
5+
6+
7+
def setup_routes(app):
8+
aiohttp_jinja2.setup(app, loader=jinja2.FileSystemLoader('./templates'))
9+
app.add_routes([
10+
web.get('/', main_page),
11+
web.get('/sign_up', sign_up),
12+
web.post('/sign_up', sign_up),
13+
web.get('/sign_in', sign_in),
14+
web.post('/sign_in', sign_in),
15+
web.get('/create_application', create_application),
16+
web.post('/create_application', create_application),
17+
web.get('/account_page', account_page),
18+
web.post('/account_page', account_page),
19+
web.get('/user_applications', user_applications),
20+
web.post('/user_applications', user_applications),
21+
web.get('/user_votes', user_votes),
22+
web.static('/static', 'static')
23+
])

0 commit comments

Comments
 (0)