diff --git a/ckanext/openafrica/blueprint.py b/ckanext/openafrica/blueprint.py index 54dc528..b2d2ff8 100644 --- a/ckanext/openafrica/blueprint.py +++ b/ckanext/openafrica/blueprint.py @@ -34,7 +34,7 @@ def atlas(): ("/about/moderation-policy", "moderation", moderation), ("/about/faq", "faq", faq), ("/about/privacy", "privacy", privacy), - ("/about/contact", "contact", contact) + ("/about/contact-us", "contact", contact) ] for rule in rules: diff --git a/ckanext/openafrica/controller.py b/ckanext/openafrica/controller.py deleted file mode 100644 index ceabc79..0000000 --- a/ckanext/openafrica/controller.py +++ /dev/null @@ -1,49 +0,0 @@ -# encoding: utf-8 - -# Copyright (c) 2015-2017 Code for Africa - -# This file is part of CKAN openAfrica Extension. - -# CKAN openAFRICA Extension is free software: you can redistribute it and/or -# modify it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. - -# CKAN openAFRICA Extension is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. - -# You should have received a copy of the GNU Affero General Public License -# along with CKAN openAFRICA Extension. If not, see . - -from ckan.controllers.home import HomeController -from ckan.lib.base import render - - -class CustomPageController(HomeController): - """This controller is used to extend some of the static pages with - the accompanying URL routing associated with it.""" - def toc(self): - return render('home/about/toc.html') - - def accessibility(self): - return render('home/about/accessibility.html') - - def coc(self): - return render('home/about/coc.html') - - def moderation(self): - return render('home/about/moderation.html') - - def faq(self): - return render('home/about/faq.html') - - def privacy(self): - return render('home/about/privacy.html') - - def contact(self): - return render('home/about/contact.html') - - def atlas(self): - return render('atlas.html') diff --git a/ckanext/openafrica/plugin.py b/ckanext/openafrica/plugin.py index d0b1ba0..822d916 100644 --- a/ckanext/openafrica/plugin.py +++ b/ckanext/openafrica/plugin.py @@ -48,47 +48,11 @@ def update_config(self, config): # IBlueprint def get_blueprint(self): """ - CKAN uses Flask Blueprints in the /ckan/views dir for user and dashboard + CKAN uses Flask Blueprints to extend urls :return: """ return blueprint.openafrica - # def before_map(self, map): - # u""" - # Called before the routes map is generated. ``before_map`` is before any - # other mappings are created so can override all other mappings. - - # :param map: Routes map object - # :returns: Modified version of the map object - # """ - # map.connect('/about/terms-and-conditions', - # controller='ckanext.openafrica.controller:CustomPageController', - # action='toc') - # map.connect('/about/accessibility', - # controller='ckanext.openafrica.controller:CustomPageController', - # action='accessibility') - # map.connect('/about/code-of-conduct', - # controller='ckanext.openafrica.controller:CustomPageController', - # action='coc') - # map.connect('/about/moderation-policy', - # controller='ckanext.openafrica.controller:CustomPageController', - # action='moderation') - # map.connect('/about/faq', - # controller='ckanext.openafrica.controller:CustomPageController', - # action='faq') - # map.connect('/about/privacy', - # controller='ckanext.openafrica.controller:CustomPageController', - # action='privacy') - # map.connect('/about/contact-us', - # controller='ckanext.openafrica.controller:CustomPageController', - # action='contact') - # map.connect('/about/suggest-a-dataset', - # controller='ckanext.openafrica.controller:CustomPageController', - # action='suggest_a_dataset') - # map.connect('/atlas-for-africa', - # controller='ckanext.openafrica.controller:CustomPageController', - # action='atlas') - # return map def get_helpers(self): u"""