Skip to content

Commit

Permalink
Created a wrapper function for CKAN identifiers
Browse files Browse the repository at this point in the history
FIxes GSA#28
  • Loading branch information
inghamn committed Oct 14, 2016
1 parent f261551 commit b821f88
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion ckanext/datajson/package2pod.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from logging import getLogger

from helpers import *
from ckanext.datajson.helpers import *

log = getLogger(__name__)

Expand Down Expand Up @@ -217,6 +217,15 @@ def __init__(self):
bureau_code_list = None
resource_formats = None

@staticmethod
def ckan_url_for_dataset_id(id):
"""Returns canonical URL to the provided dataset
"""
import pylons.config as config
url = config.get('ckan.site_url') + '/dataset/' + id
return url


@staticmethod
def catalog_publisher(value):
publisher = None
Expand Down

0 comments on commit b821f88

Please sign in to comment.