[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[silpa-discuss] [Project-SILPA/Silpa-Flask] 58678b: Rewrite the routing
From: |
Vasudev Kamath |
Subject: |
[silpa-discuss] [Project-SILPA/Silpa-Flask] 58678b: Rewrite the routing logic for frontend |
Date: |
Tue, 29 Apr 2014 10:01:27 -0700 |
Branch: refs/heads/development
Home: https://github.com/Project-SILPA/Silpa-Flask
Commit: 58678bc63f568202e3410650d1b5dbd7e2137906
https://github.com/Project-SILPA/Silpa-Flask/commit/58678bc63f568202e3410650d1b5dbd7e2137906
Author: Vasudev Kamath <address@hidden>
Date: 2014-04-29 (Tue, 29 Apr 2014)
Changed paths:
M silpa/frontend/templates/index.html
M silpa/frontend/templates/silpa.html
Log Message:
-----------
Rewrite the routing logic for frontend
Routing logic previously written was unnecessarily complicated and was
not very well utilizing the power of Flask. Rewritten with following
changes.
* silpa/frontend/__init__.py: Drop the route decorator generator, its
not needed we can utilize the route from Blueprint instead.
* silpa/frontend/pages.py: Single function serve_pages can handle both
module pages and normal pages. <page> argument should be passed from
template. Drop all `request' related thigs we can get page requested
from page argument to serve_pages function.
* silpa/frontend/templates/{silpa,index}.html: url_for usage for pages
and module pages should be different from previous code, we are using
Blueprint instead of MethodView hence we can't get url generated from
giving the actual URL, instead url should be generated by specifying
the method and passing end point of url as *page* parameter to it
Signed-off-by: Vasudev Kamath <address@hidden>
Commit: 50e1104d6125841441940ac66c5e92aefa40abdd
https://github.com/Project-SILPA/Silpa-Flask/commit/50e1104d6125841441940ac66c5e92aefa40abdd
Author: Vasudev Kamath <address@hidden>
Date: 2014-04-29 (Tue, 29 Apr 2014)
Changed paths:
A wsgi.py
Log Message:
-----------
Use werkzeug DispatcherMiddleware for apps
We have 2 apps now within same application, one is for api and second
one is for frontend, we will use DispatcherMiddleware to register both
these apps into single WSGI frontend.
Signed-off-by: Vasudev Kamath <address@hidden>
Commit: bab34baee5af1a226863cc1dc9c6589c5a16c622
https://github.com/Project-SILPA/Silpa-Flask/commit/bab34baee5af1a226863cc1dc9c6589c5a16c622
Author: Vasudev Kamath <address@hidden>
Date: 2014-04-29 (Tue, 29 Apr 2014)
Changed paths:
A tests/frontend/__init__.py
A tests/frontend/mainpage_tests.py
Log Message:
-----------
Add tests for frontend html
Added test for index page, it just checks if it can find the a proper
title for the page
Signed-off-by: Vasudev Kamath <address@hidden>
Commit: eea5f7990dd8a3a737877aef84b2d839098b3171
https://github.com/Project-SILPA/Silpa-Flask/commit/eea5f7990dd8a3a737877aef84b2d839098b3171
Author: Vasudev Kamath <address@hidden>
Date: 2014-04-29 (Tue, 29 Apr 2014)
Changed paths:
M tests/utils.py
Log Message:
-----------
get and post method should pass methods to _request
_request function require method to invoke from test client this should
be passed from the function which invokes this method.
Compare:
https://github.com/Project-SILPA/Silpa-Flask/compare/0a3ee1a89a15...eea5f7990dd8
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [silpa-discuss] [Project-SILPA/Silpa-Flask] 58678b: Rewrite the routing logic for frontend,
Vasudev Kamath <=