organization title slugified (#6673)
This commit is contained in:
parent
5c4e06779a
commit
ad8a37b80c
|
@ -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
|
||||
|
|
|
@ -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']
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
slugify
|
2
setup.py
2
setup.py
|
@ -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
|
||||
|
|
Reference in New Issue