Revision ad8a37b8
Added by Serghei Mihai about 8 years ago
README.rst | ||
---|---|---|
44 | 44 |
For example, you might want to mention here which versions of CKAN this |
45 | 45 |
extension works with. |
46 | 46 |
|
47 |
pip install -r dev-requirements.txt |
|
47 | 48 |
|
48 | 49 |
------------ |
49 | 50 |
Installation |
ckanext/ozwillo_organization_api/plugin.py | ||
---|---|---|
3 | 3 |
import requests |
4 | 4 |
import logging |
5 | 5 |
import json |
6 |
from slugify import slugify |
|
6 | 7 |
|
7 | 8 |
import ckan.plugins as plugins |
8 | 9 |
import ckan.plugins.toolkit as toolkit |
... | ... | |
71 | 72 |
|
72 | 73 |
org_dict = { |
73 | 74 |
'type': 'organization', |
74 |
'name': organization['name'].lower().replace(' ', '-'),
|
|
75 |
'name': slugify(organization['name']),
|
|
75 | 76 |
'id': instance_id, |
76 | 77 |
'title': organization['name'], |
77 | 78 |
'user': user_dict['name'] |
dev-requirements.txt | ||
---|---|---|
1 |
slugify |
setup.py | ||
---|---|---|
58 | 58 |
# project is installed. For an analysis of "install_requires" vs pip's |
59 | 59 |
# requirements files see: |
60 | 60 |
# https://packaging.python.org/en/latest/technical.html#install-requires-vs-requirements-files |
61 |
install_requires=[], |
|
61 |
install_requires=['slugify'],
|
|
62 | 62 |
|
63 | 63 |
# If there are data files included in your packages that need to be |
64 | 64 |
# installed, specify them here. If using Python 2.6 or less, then these |
Also available in: Unified diff
organization title slugified (#6673)