ontology.views module

ontology.views.set_session_acad_field(request)[source]

Set the Academic Field to be viewed in the current user session.

ontology.views.set_session_specialty(request)[source]

Set the Specialty to be viewed in the current user session.

ontology.views.ontology(request)[source]
class ontology.views.AcademicFieldAutocompleteView(**kwargs)[source]

Bases: dal_select2.views.Select2QuerySetView

To feed the Select2 widget.

get_queryset()[source]

Filter the queryset with GET[‘q’].

class ontology.views.SpecialtyAutocompleteView(**kwargs)[source]

Bases: dal_select2.views.Select2QuerySetView

To feed the Select2 widget.

get_queryset()[source]

Filter the queryset with GET[‘q’].

class ontology.views.TagAutocompleteView(**kwargs)[source]

Bases: dal_select2.views.Select2QuerySetView

To feed the Select2 widget.

get_queryset()[source]

Filter the queryset with GET[‘q’].

class ontology.views.TopicAutocompleteView(**kwargs)[source]

Bases: dal_select2.views.Select2QuerySetView

To feed the Select2 widget.

get_queryset()[source]

Filter the queryset with GET[‘q’].

class ontology.views.TopicLinkedAutocompleteView(**kwargs)[source]

Bases: ontology.views.TopicAutocompleteView

To feed the Select2 widget.

get_result_label(item)[source]

Return the label of a result.

class ontology.views.TopicCreateView(**kwargs)[source]

Bases: scipost.mixins.PermissionsMixin, django.views.generic.edit.CreateView

Create a new Topic for an Ontology.

permission_required = 'scipost.can_manage_ontology'
model

alias of ontology.models.topic.Topic

fields = '__all__'
template_name = 'ontology/topic_form.html'
success_url = '/ontology/topics/'
class ontology.views.TopicUpdateView(**kwargs)[source]

Bases: scipost.mixins.PermissionsMixin, django.views.generic.edit.UpdateView

Update a Topic for an Ontology.

permission_required = 'scipost.can_manage_ontology'
model

alias of ontology.models.topic.Topic

fields = '__all__'
template_name = 'ontology/topic_form.html'
success_url = '/ontology/topics/'
ontology.views.topic_add_tags(request, slug)[source]
ontology.views.topic_remove_tag(request, slug, tag_id)[source]
class ontology.views.TopicListView(**kwargs)[source]

Bases: scipost.mixins.PaginationMixin, django.views.generic.list.ListView

model

alias of ontology.models.topic.Topic

paginate_by = 100
get_queryset()[source]

Return a queryset of Topics using optional GET data.

get_context_data(**kwargs)[source]

Get the context for this view.

class ontology.views.TopicDetailView(**kwargs)[source]

Bases: django.views.generic.detail.DetailView

model

alias of ontology.models.topic.Topic

get_context_data(*args, **kwargs)[source]

Insert the single object into the context dict.

ontology.views.add_relation_asym(request, slug)[source]
ontology.views.delete_relation_asym(request, relation_id, slug)[source]