Projet

Général

Profil

« Précédent | Suivant » 

Révision ad8a37b8

Ajouté par Serghei Mihai il y a environ 9 ans

organization title slugified (#6673)

Voir les différences:

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']

Formats disponibles : Unified diff