strawberry.fields package

Submodules

strawberry.fields.helpers module

strawberry.fields.helpers.get_prepopulated_value(field, instance)[source]

Returns preliminary value based on populate_from.

Args:
field (strawberry.fields.md5.MD5Field): MD5Field instance. instance (django.db.models.Model): Django model instance.
Returns:
str: Prepopulated value.
strawberry.fields.helpers.generate_md5_hash(value, unique=False)[source]

Generate md5 hash.

Args:
value (str): unique (bool):
Returns:
str: Generated MD5 hash.

strawberry.fields.md5 module

class strawberry.fields.md5.MD5Field(*args, **kwargs)[source]

Bases: django.db.models.fields.CharField

MD5 field.

deconstruct()[source]

Deconstruct.

Returns:
tuple
pre_save(instance, add)[source]

Pre-save.

Args:
instance: add:
Returns:
str

Module contents

Fields.

class strawberry.fields.MD5Field(*args, **kwargs)[source]

Bases: django.db.models.fields.CharField

MD5 field.

deconstruct()[source]

Deconstruct.

Returns:
tuple
pre_save(instance, add)[source]

Pre-save.

Args:
instance: add:
Returns:
str