def vocabulary_create(context, data_dict):
 model = context['model']
 schema = (context.get('schema') or ckan.logic.schema.default_create_vocabulary_schema())
 _check_access('vocabulary_create', context, data_dict)
 (data, errors) = _validate(data_dict, schema, context)
 if errors:
  model.Session.rollback()
  raise ValidationError(errors)
 vocabulary = model_save.vocabulary_dict_save(data, context)
 if (not context.get('defer_commit')):
  model.repo.commit()
 log.debug(('Created Vocabulary %s' % vocabulary.name))
 return model_dictize.vocabulary_dictize(vocabulary, context)

def vocabulary_create ( context , data_dict ) : model = context [ 'model' ] schema = ( context . get ( 'schema' ) or ckan . logic . schema . default_create_vocabulary_schema ( ) ) _check_access ( 'vocabulary_create' , context , data_dict ) ( data , errors ) = _validate ( data_dict , schema , context ) if errors : model . Session . rollback ( ) raise ValidationError ( errors ) vocabulary = model_save . vocabulary_dict_save ( data , context ) if ( not context . get ( 'defer_commit' ) ) : model . repo . commit ( ) log . debug ( ( 'Created Vocabulary %s' % vocabulary . name ) ) return model_dictize . vocabulary_dictize ( vocabulary , context )
create a new tag vocabulary .