Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[1821] add multilingual extension template
- Loading branch information
Showing
3 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from ckan.plugins import SingletonPlugin, implements, IPackageController | ||
|
||
class MultilingualDataset(SingletonPlugin): | ||
implements(IPackageController, inherit=True) | ||
|
||
def before_index(self, search_params): | ||
return search_params | ||
|
||
def before_search(self, search_params): | ||
return search_params | ||
|
||
def before_view(self, data_dict): | ||
return data_dict | ||
|
||
|
||
class MultilingualGroup(SingletonPlugin): | ||
implements(IPackageController, inherit=True) | ||
|
||
def before_view(self, data_dict): | ||
return data_dict |
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