# Path: ckanext/showcase/utils.py
# DATASET_TYPE_NAME = 'showcase'
# def check_edit_view_auth(id):
# def check_new_view_auth():
# def read_view(id):
# def manage_datasets_view(id):
# def migrate(allow_duplicates):
# def _get_related_dataset(related_id):
# def _find_duplicates(lst):
# def _gen_new_title(title, related_id):
# def _add_dataset_search(showcase_id, showcase_name):
#     def drill_down_url(alternative_url=None, **by):
#     def remove_field(key, value=None, replace=None):
#     def _sort_by(fields):
#     def pager_url(q=None, page=None):
# def _search_url(params, name):
# def _encode_params(params):
# def url_with_params(url, params):
# def delete_view(id):
# def dataset_showcase_list(id):
# def manage_showcase_admins():
# def remove_showcase_admin():
# def markdown_to_html():
# def upload():
# 
# Path: ckanext/showcase/utils.py
# DATASET_TYPE_NAME = 'showcase'


import logging
import json
import ckan.lib.helpers as h
import ckan.lib.navl.dictization_functions as dict_fns
import ckan.logic as logic
from ckan.plugins import toolkit as tk
from ckan.controllers.package import (PackageController)
from ckanext.showcase import utils
from ckanext.showcase.utils import DATASET_TYPE_NAME





_ = tk._
c = tk.c
request = tk.request
render = tk.render
abort = tk.abort
redirect = tk.redirect_to
NotFound = tk.ObjectNotFound
ValidationError = tk.ValidationError
check_access = tk.check_access
get_action = tk.get_action
tuplize_dict = logic.tuplize_dict
clean_dict = logic.clean_dict
parse_params = logic.parse_params
NotAuthorized = tk.NotAuthorized

log = logging.getLogger(__name__)


class ShowcaseController(PackageController):
    def new(self, data=None, errors=None, error_summary=None):

        utils.check_new_view_auth()
        return super(ShowcaseController, self).new(data=data,

# Path: ckanext/showcase/utils.py
# DATASET_TYPE_NAME = 'showcase'
# def check_edit_view_auth(id):
# def check_new_view_auth():
# def read_view(id):
# def manage_datasets_view(id):
# def migrate(allow_duplicates):
# def _get_related_dataset(related_id):
# def _find_duplicates(lst):
# def _gen_new_title(title, related_id):
# def _add_dataset_search(showcase_id, showcase_name):
#     def drill_down_url(alternative_url=None, **by):
#     def remove_field(key, value=None, replace=None):
#     def _sort_by(fields):
#     def pager_url(q=None, page=None):
# def _search_url(params, name):
# def _encode_params(params):
# def url_with_params(url, params):
# def delete_view(id):
# def dataset_showcase_list(id):
# def manage_showcase_admins():
# def remove_showcase_admin():
# def markdown_to_html():
# def upload():
# 
# Path: ckanext/showcase/utils.py
# DATASET_TYPE_NAME = 'showcase'


# Path: ckanext/showcase/controller.py
import logging
import json
import ckan.lib.helpers as h
import ckan.lib.navl.dictization_functions as dict_fns
import ckan.logic as logic
from ckan.plugins import toolkit as tk
from ckan.controllers.package import (PackageController)
from ckanext.showcase import utils
from ckanext.showcase.utils import DATASET_TYPE_NAME






_ = tk._
c = tk.c
request = tk.request
render = tk.render
abort = tk.abort
redirect = tk.redirect_to
NotFound = tk.ObjectNotFound
ValidationError = tk.ValidationError
check_access = tk.check_access
get_action = tk.get_action
tuplize_dict = logic.tuplize_dict
clean_dict = logic.clean_dict
parse_params = logic.parse_params
NotAuthorized = tk.NotAuthorized

log = logging.getLogger(__name__)


class ShowcaseController(PackageController):
    def new(self, data=None, errors=None, error_summary=None):

        utils.check_new_view_auth()
        return super(ShowcaseController, self).new(data=data,

                                                   errors=errors,