-
Notifications
You must be signed in to change notification settings - Fork 308
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ if platform is None: | |
user_name = path['user_name'] | ||
if not user_name: | ||
raise Response(400, '%user_name is empty') | ||
platform.get_user_info(user_name) # raises 404 if user_name is unknown | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
techtonik
Contributor
|
||
|
||
try: | ||
action = qs['action'] | ||
|
8 comments
on commit 4d7d0dc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where path['platform']
comes from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the %platform
part of the URL path. See http://aspen.io/virtual-paths/.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. Is there a list of all other automagical variables that Aspen/Simplates set that I need to know about?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(in particular I wonder why Response is not automagical as well)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(in particular I wonder why Response is not automagical as well)
You mean the Response
class and not the local response
object, correct? Not a bad idea. Ticketed as AspenWeb/pando.py#402.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a list of all other automagical variables that Aspen/Simplates set that I need to know about?
The presence of the path
magic variable is documented at http://aspen.io/api/request/. But see AspenWeb/pando.py#227.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a list of all other automagical variables that Aspen/Simplates set that I need to know about?
We don't have a list of all Simplate builtins in one place, and we should.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have a list of all Simplate builtins in one place, and we should.
Added AspenWeb/pando.py#403
I don't like implicit 404 error rise here.
platform
here iselsewhere.Platform
, andelsewhere
is something that I'd expect to be independent of Aspen. At least I can clearly see a situation where this check could be made from command line script.