ecommerce.products package¶
Subpackages¶
- ecommerce.products.migrations package
- ecommerce.products.tests package
- Submodules
- ecommerce.products.tests.factories module
- ecommerce.products.tests.test_admin module
- ecommerce.products.tests.test_forms module
- ecommerce.products.tests.test_models module
- Module contents
Submodules¶
ecommerce.products.admin module¶
- class ecommerce.products.admin.AttributeAdmin(model, admin_site)¶
Bases:
ModelAdmin
- actions = ['make_active', 'make_inactive']¶
- fieldsets = ((None, {'fields': ('name', 'slug', 'description')}), ('Status info', {'fields': ('is_active',)}), ('Auditing info', {'fields': ('created_by', 'created_at', 'updated_by', 'updated_at')}))¶
- get_readonly_fields(request: Any, obj: Any | None = None)¶
Hook for specifying custom readonly fields.
- has_delete_permission(request, obj=None)¶
Return True if the given request has permission to delete the given Django model instance, the default implementation doesn’t examine the obj parameter.
Can be overridden by the user in subclasses. In such case it should return True if the given request has permission to delete the obj model instance. If obj is None, this should return True if the given request has permission to delete any object of the given type.
- list_display = ['id', 'name', 'slug', 'is_active']¶
- list_filter = ['is_active']¶
- list_per_page = 15¶
- property media¶
- readonly_fields = ('created_by', 'created_at', 'updated_by', 'updated_at')¶
- save_form(request, form, change)¶
Given a ModelForm return an unsaved instance.
change
is True if the object is being changed, and False if it’s being added.
- search_fields = ['id', 'name', 'slug']¶
- class ecommerce.products.admin.BrandAdmin(model, admin_site)¶
Bases:
ModelAdmin
- actions = ['make_active', 'make_inactive']¶
- fieldsets = ((None, {'fields': ('name',)}), ('Status info', {'fields': ('is_active',)}), ('Auditing info', {'fields': ('created_by', 'created_at', 'updated_by', 'updated_at')}))¶
- get_readonly_fields(request: Any, obj: Any | None = None)¶
Hook for specifying custom readonly fields.
- has_delete_permission(request, obj=None)¶
Return True if the given request has permission to delete the given Django model instance, the default implementation doesn’t examine the obj parameter.
Can be overridden by the user in subclasses. In such case it should return True if the given request has permission to delete the obj model instance. If obj is None, this should return True if the given request has permission to delete any object of the given type.
- list_display = ['id', 'name', 'is_active']¶
- list_filter = ['is_active']¶
- list_per_page = 15¶
- property media¶
- readonly_fields = ('created_by', 'created_at', 'updated_by', 'updated_at')¶
- save_form(request, form, change)¶
Given a ModelForm return an unsaved instance.
change
is True if the object is being changed, and False if it’s being added.
- search_fields = ['id', 'name']¶
- class ecommerce.products.admin.CategoryTreeAdmin(model, admin_site)¶
Bases:
TreeAdmin
- actions = ['make_active', 'make_inactive']¶
- form¶
alias of
CategoryForm
- get_readonly_fields(request: Any, obj: Any | None = None)¶
Hook for specifying custom readonly fields.
- has_delete_permission(request: Any, obj: Any | None = None)¶
Return True if the given request has permission to delete the given Django model instance, the default implementation doesn’t examine the obj parameter.
Can be overridden by the user in subclasses. In such case it should return True if the given request has permission to delete the obj model instance. If obj is None, this should return True if the given request has permission to delete any object of the given type.
- list_filter = ['is_active']¶
- list_per_page = 15¶
- property media¶
- readonly_fields = ('created_by', 'updated_by')¶
- save_form(request, form, change)¶
Given a ModelForm return an unsaved instance.
change
is True if the object is being changed, and False if it’s being added.
- search_fields = ['id', 'name']¶
- class ecommerce.products.admin.ProductAdmin(model, admin_site)¶
Bases:
ModelAdmin
- actions = ['make_active', 'make_inactive']¶
- fieldsets = ((None, {'fields': ('name', 'slug')}), ('Details info', {'fields': ('category', 'brand', 'description')}), ('Images', {'classes': ('placeholder images-group',), 'fields': ()}), ('Status info', {'fields': ('owner', 'is_active')}), ('Auditing info', {'fields': ('created_by', 'created_at', 'updated_by', 'updated_at')}))¶
- get_readonly_fields(request: Any, obj: Any | None = None)¶
Hook for specifying custom readonly fields.
- has_delete_permission(request, obj=None)¶
Return True if the given request has permission to delete the given Django model instance, the default implementation doesn’t examine the obj parameter.
Can be overridden by the user in subclasses. In such case it should return True if the given request has permission to delete the obj model instance. If obj is None, this should return True if the given request has permission to delete any object of the given type.
- inlines = [<class 'ecommerce.products.admin.ProductImageInline'>]¶
- list_display = ['id', 'name', 'slug', 'category', 'brand', 'is_active']¶
- list_filter = ['is_active', 'category']¶
- list_per_page = 15¶
- property media¶
- readonly_fields = ('created_by', 'created_at', 'updated_by', 'updated_at')¶
- save_form(request, form, change)¶
Given a ModelForm return an unsaved instance.
change
is True if the object is being changed, and False if it’s being added.
- search_fields = ['id', 'name', 'slug']¶
- class ecommerce.products.admin.ProductAttributeInline(parent_model, admin_site)¶
Bases:
TabularInline
- extra = 0¶
- property media¶
- model¶
alias of
ProductAttribute
- readonly_fields = ('created_by', 'updated_by')¶
- verbose_name = 'Attribute'¶
- verbose_name_plural = 'Attributes'¶
- class ecommerce.products.admin.ProductImageInline(parent_model, admin_site)¶
Bases:
TabularInline
- extra = 0¶
- formfield_overrides = {<class 'django.db.models.fields.files.ImageField'>: {'widget': <class 'ecommerce.utils.admin.CustomAdminFileWidget'>}}¶
- property media¶
- model¶
alias of
ProductImage
- readonly_fields = ('created_by', 'updated_by')¶
- verbose_name = 'Image'¶
- verbose_name_plural = 'Images'¶
- class ecommerce.products.admin.ProductLineAdmin(model, admin_site)¶
Bases:
ModelAdmin
- actions = ['make_active', 'make_inactive']¶
- fieldsets = ((None, {'fields': ('sku', 'get_product')}), ('Details info', {'fields': ('price', 'stock_quantity')}), ('Status info', {'fields': ('is_active',)}), ('Auditing info', {'fields': ('created_by', 'created_at', 'updated_by', 'updated_at')}))¶
- get_product(obj)¶
- has_delete_permission(request, obj=None)¶
Return True if the given request has permission to delete the given Django model instance, the default implementation doesn’t examine the obj parameter.
Can be overridden by the user in subclasses. In such case it should return True if the given request has permission to delete the obj model instance. If obj is None, this should return True if the given request has permission to delete any object of the given type.
- inlines = [<class 'ecommerce.products.admin.ProductAttributeInline'>]¶
- list_display = ['id', 'get_product', 'sku', 'price', 'stock_quantity', 'is_active']¶
- list_filter = ['is_active']¶
- list_per_page = 15¶
- make_active(request, queryset)¶
- make_inactive(request, queryset)¶
- property media¶
- readonly_fields = ('created_by', 'created_at', 'updated_by', 'updated_at', 'get_product')¶
- save_form(request, form, change)¶
Given a ModelForm return an unsaved instance.
change
is True if the object is being changed, and False if it’s being added.
- search_fields = ['id', 'get_product']¶
ecommerce.products.apps module¶
ecommerce.products.forms module¶
ecommerce.products.models module¶
- class ecommerce.products.models.Attribute(*args, **kwargs)¶
Bases:
Model
Attribute model. It represents a product attribute.
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- created_at¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- created_by¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- created_by_id¶
- description¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)¶
- get_next_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=True, **kwargs)¶
- get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)¶
- get_previous_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=False, **kwargs)¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- is_active¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- name¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>¶
- product_line¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- productattribute_set¶
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- slug¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- updated_at¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- updated_by¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- updated_by_id¶
- class ecommerce.products.models.Brand(*args, **kwargs)¶
Bases:
Model
Brand model. It represents a product brand.
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- created_at¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- created_by¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- created_by_id¶
- description¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)¶
- get_next_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=True, **kwargs)¶
- get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)¶
- get_previous_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=False, **kwargs)¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- is_active¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- name¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>¶
- product_set¶
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- slug¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- updated_at¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- updated_by¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- updated_by_id¶
- class ecommerce.products.models.Category(*args, **kwargs)¶
Bases:
NS_Node
Category model. It represents a product category. It uses the treebeard library to implement the nested set model.
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- created_at¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- created_by¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- created_by_id¶
- depth¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)¶
- get_next_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=True, **kwargs)¶
- get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)¶
- get_previous_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=False, **kwargs)¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- is_active¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- lft¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- name¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- node_order_by = ['name']¶
- product_set¶
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- rgt¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- slug¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- tree_id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- updated_at¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- updated_by¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- updated_by_id¶
- class ecommerce.products.models.Product(*args, **kwargs)¶
Bases:
Model
Product model. It represents a product in the store.
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- brand¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- brand_id¶
- category¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- category_id¶
- created_at¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- created_by¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- created_by_id¶
- description¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)¶
- get_next_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=True, **kwargs)¶
- get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)¶
- get_previous_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=False, **kwargs)¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- images¶
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- is_active¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- name¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>¶
- owner¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- owner_id¶
- product_lines¶
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- slug¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- updated_at¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- updated_by¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- updated_by_id¶
- class ecommerce.products.models.ProductAttribute(*args, **kwargs)¶
Bases:
Model
Product Attribute model. It represents a product attribute, like color, size, etc.
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- attribute¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- attribute_id¶
- created_at¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- created_by¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- created_by_id¶
- get_next_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)¶
- get_next_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=True, **kwargs)¶
- get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)¶
- get_previous_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=False, **kwargs)¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>¶
- product_line¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- product_line_id¶
- updated_at¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- updated_by¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- updated_by_id¶
- value¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class ecommerce.products.models.ProductImage(*args, **kwargs)¶
Bases:
Model
Product Image model. It represents an image of a product.
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- alt_text¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- created_at¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- created_by¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- created_by_id¶
- get_next_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)¶
- get_next_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=True, **kwargs)¶
- get_owner()¶
Return the owner of the product image.
- get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)¶
- get_previous_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=False, **kwargs)¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- image¶
Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.
- objects = <django.db.models.manager.Manager object>¶
- product¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- product_id¶
- updated_at¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- updated_by¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- updated_by_id¶
- class ecommerce.products.models.ProductLine(*args, **kwargs)¶
Bases:
Model
Product Line model. It keeps a track of the stock quantity of a product.
- exception DoesNotExist¶
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned¶
Bases:
MultipleObjectsReturned
- created_at¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- created_by¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- created_by_id¶
- get_next_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=True, **kwargs)¶
- get_next_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=True, **kwargs)¶
- get_owner()¶
Return the owner of the product line.
- get_previous_by_created_at(*, field=<django.db.models.fields.DateTimeField: created_at>, is_next=False, **kwargs)¶
- get_previous_by_updated_at(*, field=<django.db.models.fields.DateTimeField: updated_at>, is_next=False, **kwargs)¶
- id¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- is_active¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>¶
- price¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- product¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- product_attributes¶
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- product_id¶
- productattribute_set¶
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- sku¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- stock_quantity¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- updated_at¶
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- updated_by¶
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- updated_by_id¶