From 725960e6b9de07e0f658e98d3176b342ecbc3cc7 Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 17 Jan 2024 12:18:51 +0000 Subject: [PATCH] Updated documentation --- _modules/apis_core/apis_entities/forms.html | 4 ++-- _modules/apis_core/apis_entities/models.html | 5 ----- _modules/apis_core/apis_metainfo/models.html | 2 +- .../apis_core/apis_relations/rel_filters.html | 16 +--------------- _modules/apis_core/utils/helpers.html | 1 - 5 files changed, 4 insertions(+), 24 deletions(-) diff --git a/_modules/apis_core/apis_entities/forms.html b/_modules/apis_core/apis_entities/forms.html index 7e6af95e7..7d2a360f6 100644 --- a/_modules/apis_core/apis_entities/forms.html +++ b/_modules/apis_core/apis_entities/forms.html @@ -95,8 +95,8 @@

Source code for apis_core.apis_entities.forms

from django.core.validators import URLValidator from django.urls import reverse -from apis_core.apis_metainfo.models import Uri, Collection -from apis_core.utils import DateParser, caching, settings as apis_settings +from apis_core.apis_metainfo.models import Uri +from apis_core.utils import caching, settings as apis_settings from apis_core.utils.settings import get_entity_settings_by_modelname from .fields import ListSelect2 diff --git a/_modules/apis_core/apis_entities/models.html b/_modules/apis_core/apis_entities/models.html index fe4f42dd2..e3ed020ea 100644 --- a/_modules/apis_core/apis_entities/models.html +++ b/_modules/apis_core/apis_entities/models.html @@ -86,21 +86,16 @@

Source code for apis_core.apis_entities.models

 import re
-import unicodedata
 
 from django.contrib.contenttypes.models import ContentType
-import reversion
 from django.conf import settings
 from django.contrib.auth.models import Group
-from django.db import models
 from django.db.models.signals import post_save
 from django.dispatch import receiver
 from django.urls import reverse
-from model_utils.managers import InheritanceManager
 from django.db.models.query import QuerySet
 
 from apis_core.utils import caching
-from apis_core.utils import DateParser
 from apis_core.apis_metainfo.models import RootObject
 from apis_core.apis_relations.models import TempTriple
 from apis_core.apis_entities import signals
diff --git a/_modules/apis_core/apis_metainfo/models.html b/_modules/apis_core/apis_metainfo/models.html
index b7eb34a2c..d28661170 100644
--- a/_modules/apis_core/apis_metainfo/models.html
+++ b/_modules/apis_core/apis_metainfo/models.html
@@ -358,7 +358,7 @@ 

Source code for apis_core.apis_metainfo.models

self.root_object = obj else: raise ImproperlyConfigured( - f"{uri}: found model <{model}> and attributes <{attributes}>" + f"{self.uri}: found model <{model}> and attributes <{attributes}>" ) except Exception as e: raise ValidationError(f"{e}: {self.uri}")

diff --git a/_modules/apis_core/apis_relations/rel_filters.html b/_modules/apis_core/apis_relations/rel_filters.html index eeb5eab03..45d1c8a8c 100644 --- a/_modules/apis_core/apis_relations/rel_filters.html +++ b/_modules/apis_core/apis_relations/rel_filters.html @@ -85,10 +85,7 @@

Source code for apis_core.apis_relations.rel_filters

-import operator
-from functools import reduce
-
-import django_filters
+import django_filters
 from dal import autocomplete
 from django.conf import settings
 from django.contrib.contenttypes.models import ContentType
@@ -194,8 +191,6 @@ 

Source code for apis_core.apis_relations.rel_filters

[docs] def get_generic_relation_filter(entity): class GenericListFilter(django_filters.FilterSet): - # search = django_filters.CharFilter(method='search_filter_method') - def name_label_filter(self, queryset, name, value): """ Filter for including the alternative names in the names search.\ @@ -257,15 +252,6 @@

Source code for apis_core.apis_relations.rel_filters

f += "exact" return queryset.filter(**{f: value}) - def search_filter_method(self, queryset, name, value): - cls = queryset.model.__name__ - sett_filters = getattr(settings, "APIS_RELATIONS", {}) - if cls.lower() in sett_filters.keys(): - filter_attr = sett_filters[cls.lower()].get("search", ["name"]) - query = reduce( - operator.or_, [Q(**{attr: value}) for attr in filter_attr] - ) - class Meta: # model = AbstractRelation.get_relation_class_of_name(entity) model = None diff --git a/_modules/apis_core/utils/helpers.html b/_modules/apis_core/utils/helpers.html index dfe326a13..566d00508 100644 --- a/_modules/apis_core/utils/helpers.html +++ b/_modules/apis_core/utils/helpers.html @@ -90,7 +90,6 @@

Source code for apis_core.utils.helpers

 import inspect
 import itertools
 import logging
-from typing import Type
 
 
 from apis_core.apis_relations.models import Property, TempTriple