Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable tag vocabularies #116

Closed
wants to merge 9 commits into from
Closed

enable tag vocabularies #116

wants to merge 9 commits into from

Conversation

hvwaldow
Copy link
Contributor

  • provides the property "vocabulary", the value of which is the name of the vocabulary.
    Example:

    {
    "field_name": "systems",
    "label": "Systems",
    "preset": "multiple_select",
    "vocabulary": "systems",
    "required": true
    },
  • provides the property "free_tags_only" in the top level of the schema definition. "free_tags_only": true will prevent vocabulary tags from being listed in the free tags' display.

  • Currently tested with presets select and multiple_select.

@hvwaldow hvwaldow mentioned this pull request Jan 27, 2016
@@ -449,5 +500,6 @@ def _expand_schemas(schemas):
if fname not in s:
continue
s[fname] = [_expand_preset(f) for f in s[fname]]
s[fname] = [_expand_vocabulary(f) for f in s[fname]]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means vocabulary choices are expanded into the schema once on startup, so the server needs to be restarted if the vocabulary tags are modified?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is correct. I figure its better than talking to the database in each request.

@hvwaldow
Copy link
Contributor Author

This is problematic on a more fundamental level because initialization of a fresh db fails upon trying to get.vocabulary_list when there are no vocabularies yet. I am closing to re-think that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants