-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#1797,webstore][s]: introduce webstore write route (which auto 401s …
…atm).
- Loading branch information
1 parent
3c7238b
commit 695c7bd
Showing
3 changed files
with
21 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
from ckan.lib.base import BaseController | ||
from ckan.lib.base import BaseController, abort, _ | ||
import ckan.model as model | ||
|
||
class WebstoreController(BaseController): | ||
def data(self, id): | ||
def read(self, id): | ||
resource = model.Session.query(model.Resource).get(id) | ||
print 'here' | ||
if not resource: | ||
abort(404) | ||
return resource.id | ||
|
||
def write(self, id): | ||
abort(401, _('Not authorized to see this page')) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters