models
field
help_text
as documentationunique=True
is this field must be unique throughout
the tablegraphene
List
consider using NonNull
=
graphene.List(graphene.NonNull(graphene.String))required=True
or ObjectType
class DocumentUploaderFormConfig(graphene.ObjectType):
= graphene.String(required=True)
enum_name
class DocumentUploadConfigQuery(graphene.ObjectType):
= graphene.List(graphene.NonNull(DocumentUploaderFormConfig)), required=True) document_uploader_form_configs
breakpoint()
in codedocker container ls
docker attach ID # ID is the container id for oneview-django image
Q
& F
Q()
- represents an SQL condition that can be used in
database-related operationsF()
- represents the value of a model field or
annotationThese two make it possible to define and reuse conditions.
GraphiQL
with django debug tool barhttp://localhost:8000/admin/
http://localhost:8000/graphql/
Django likes subclassing existing class.
RelatedManager subclasses Manager to get all method from managers.
Create a manager for the reverse side of a many-to-one relation.
This manager subclasses another manager, generally the default manager of the related model, and adds behaviors specific to many-to-one relations.
https://github.com/django/django/blob/a09082a9bec18f8e3ee8c10d473013ec67ffe93b/django/db/models/fields/related_descriptors.py#L675C5-L675C45
Manager is a subclass of QuerySet so that manager has all the methods of QuerySet.
class Manager(BaseManager.from_queryset(QuerySet)): pass
https://github.com/django/django/blob/f030236a86a64a4befd3cc8093e2bbeceef52a31/django/db/models/manager.py#L176