-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CKAN 2.10 replace controllers & Iroutes with blueprints
- Loading branch information
1 parent
2203a00
commit cb48a10
Showing
2 changed files
with
86 additions
and
36 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
from flask import Blueprint | ||
from ckan.plugins.toolkit import render | ||
|
||
openafrica = Blueprint('datapusher', __name__) | ||
|
||
def toc(): | ||
return render('home/about/toc.html') | ||
|
||
def accessibility(): | ||
return render('home/about/accessibility.html') | ||
|
||
def coc(): | ||
return render('home/about/coc.html') | ||
|
||
def moderation(): | ||
return render('home/about/moderation.html') | ||
|
||
def faq(): | ||
return render('home/about/faq.html') | ||
|
||
def privacy(): | ||
return render('home/about/privacy.html') | ||
|
||
def contact(): | ||
return render('home/about/contact.html') | ||
|
||
def atlas(): | ||
return render('atlas.html') | ||
|
||
rules = [ | ||
("/about/terms-and-conditions", "toc", toc), | ||
("/about/accessibility", "accessibility", accessibility), | ||
("/about/code-of-conduct", "coc", coc), | ||
("/about/moderation-policy", "moderation", moderation), | ||
("/about/faq", "faq", faq), | ||
("/about/privacy", "privacy", privacy) | ||
] | ||
|
||
for rule in rules: | ||
openafrica.add_url_rule(*rule) | ||
|
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