Skip to content

Commit

Permalink
update templates to use blueprints
Browse files Browse the repository at this point in the history
  • Loading branch information
thepsalmist committed Mar 25, 2024
1 parent 9d6a088 commit 196c22f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 87 deletions.
2 changes: 1 addition & 1 deletion ckanext/openafrica/blueprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
49 changes: 0 additions & 49 deletions ckanext/openafrica/controller.py

This file was deleted.

38 changes: 1 addition & 37 deletions ckanext/openafrica/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
Expand Down

0 comments on commit 196c22f

Please sign in to comment.