organization title slugified (#6673)

This commit is contained in:
Serghei Mihai 2015-03-10 17:41:04 +01:00
parent 5c4e06779a
commit ad8a37b80c
4 changed files with 5 additions and 2 deletions

View File

@ -44,6 +44,7 @@ Requirements
For example, you might want to mention here which versions of CKAN this
extension works with.
pip install -r dev-requirements.txt
------------
Installation

View File

@ -3,6 +3,7 @@ import hmac
import requests
import logging
import json
from slugify import slugify
import ckan.plugins as plugins
import ckan.plugins.toolkit as toolkit
@ -71,7 +72,7 @@ def create_organization(context, data_dict):
org_dict = {
'type': 'organization',
'name': organization['name'].lower().replace(' ', '-'),
'name': slugify(organization['name']),
'id': instance_id,
'title': organization['name'],
'user': user_dict['name']

View File

@ -0,0 +1 @@
slugify

View File

@ -58,7 +58,7 @@ setup(
# project is installed. For an analysis of "install_requires" vs pip's
# requirements files see:
# https://packaging.python.org/en/latest/technical.html#install-requires-vs-requirements-files
install_requires=[],
install_requires=['slugify'],
# If there are data files included in your packages that need to be
# installed, specify them here. If using Python 2.6 or less, then these