purchase package

Subpackages

Submodules

purchase.admin module

purchase.apps module

class purchase.apps.PurchaseConfig(app_name, app_module)[source]

Bases: AppConfig

default_auto_field = 'django.db.models.BigAutoField'
name = 'purchase'

purchase.models module

class purchase.models.PurchaseOrder(id, order_number, date_ordered, status, bid)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

STATUS_CHOICES = [('pending', 'Pending'), ('shipped', 'Shipped'), ('delivered', 'Delivered')]
bid

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

bid_id
date_ordered

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_date_ordered(*, field=<django.db.models.fields.DateField: date_ordered>, is_next=True, **kwargs)
get_previous_by_date_ordered(*, field=<django.db.models.fields.DateField: date_ordered>, is_next=False, **kwargs)
get_status_display(*, field=<django.db.models.fields.CharField: status>)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

inventoryreceipt

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

invoice

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

objects = <django.db.models.manager.Manager object>
order_number

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

status

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class purchase.models.PurchaseRequisition(id, requisition_number, date_created, last_updated, quantity_requested, expected_delivery_date, urgency_level, comments, attachments, status, report, inventory)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

STATUS_CHOICES = [('pending', 'Pending'), ('approved', 'Approved'), ('rejected', 'Rejected')]
URGENCY_LEVEL_CHOICES = [('low', 'Low'), ('medium', 'Medium'), ('high', 'High')]
attachments

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

comments

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

date_created

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

expected_delivery_date

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_date_created(*, field=<django.db.models.fields.DateTimeField: date_created>, is_next=True, **kwargs)
get_next_by_expected_delivery_date(*, field=<django.db.models.fields.DateField: expected_delivery_date>, is_next=True, **kwargs)
get_next_by_last_updated(*, field=<django.db.models.fields.DateTimeField: last_updated>, is_next=True, **kwargs)
get_previous_by_date_created(*, field=<django.db.models.fields.DateTimeField: date_created>, is_next=False, **kwargs)
get_previous_by_expected_delivery_date(*, field=<django.db.models.fields.DateField: expected_delivery_date>, is_next=False, **kwargs)
get_previous_by_last_updated(*, field=<django.db.models.fields.DateTimeField: last_updated>, is_next=False, **kwargs)
get_status_display(*, field=<django.db.models.fields.CharField: status>)
get_urgency_level_display(*, field=<django.db.models.fields.CharField: urgency_level>)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

inventory

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

inventory_id
last_updated

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>
quantity_requested

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

report

The descriptor for the file attribute on the model instance. Return a FieldFile when accessed so you can write code like:

>>> from myapp.models import MyModel
>>> instance = MyModel.objects.get(pk=1)
>>> instance.file.size

Assign a file object on assignment so you can do:

>>> with open('/path/to/hello.world') as f:
...     instance.file = File(f)
requisition_number

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

status

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

supplierbid_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 a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

urgency_level

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class purchase.models.SupplierBid(id, quantity_fulfilled, unit_price, date_submitted, days_delivery, attachments, comments, status, supplier, requisition)[source]

Bases: Model

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

STATUS_CHOICES = [('submitted', 'Submitted'), ('accepted', 'Accepted'), ('rejected', 'Rejected')]
attachments

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

comments

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

date_submitted

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

days_delivery

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_date_submitted(*, field=<django.db.models.fields.DateTimeField: date_submitted>, is_next=True, **kwargs)
get_previous_by_date_submitted(*, field=<django.db.models.fields.DateTimeField: date_submitted>, is_next=False, **kwargs)
get_status_display(*, field=<django.db.models.fields.CharField: status>)
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>
purchaseorder

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Place.restaurant is a ReverseOneToOneDescriptor instance.

quantity_fulfilled

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

requisition

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 a ForwardManyToOneDescriptor instance.

requisition_id
status

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

supplier

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 a ForwardManyToOneDescriptor instance.

supplier_id
unit_price

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

purchase.serializers module

class purchase.serializers.PurchaseOrderSerializer(*args, **kwargs)[source]

Bases: ModelSerializer

class Meta[source]

Bases: object

fields = '__all__'
model

alias of PurchaseOrder

get_expected_delivery_date(instance) str[source]
get_quantity_ordered(instance) int[source]
get_unit_price(instance) float[source]
class purchase.serializers.PurchaseOrderStatusSerializer(*args, **kwargs)[source]

Bases: ModelSerializer

class Meta[source]

Bases: object

fields = ['status']
model

alias of PurchaseOrder

class purchase.serializers.PurchaseRequisitionSerializer(*args, **kwargs)[source]

Bases: ModelSerializer

class Meta[source]

Bases: object

exclude = ['inventory']
model

alias of PurchaseRequisition

read_only_fields = ['status']
class purchase.serializers.PurchaseRequisitionVendorSerializer(*args, **kwargs)[source]

Bases: ModelSerializer

class Meta[source]

Bases: object

exclude = ['status', 'inventory']
model

alias of PurchaseRequisition

class purchase.serializers.SupplierBidProcurementOfficerSerializer(*args, **kwargs)[source]

Bases: ModelSerializer

class Meta[source]

Bases: object

exclude = ['requisition', 'supplier']
model

alias of SupplierBid

read_only_fields = ['quantity_fulfilled', 'unit_price', 'date_submitted', 'days_delivery', 'attachments', 'comments', 'status', 'supplier_company_name', 'supplier_rating', 'total_ratings']
validate(attrs)[source]
class purchase.serializers.SupplierBidProcurementOfficerStatusSerializer(*args, **kwargs)[source]

Bases: ModelSerializer

class Meta[source]

Bases: object

fields = ['status']
model

alias of SupplierBid

class purchase.serializers.SupplierBidSerializer(*args, **kwargs)[source]

Bases: ModelSerializer

class Meta[source]

Bases: object

exclude = ['supplier', 'requisition']
model

alias of SupplierBid

read_only_fields = ['status', 'requisition_number']

purchase.tasks module

purchase.tests module

class purchase.tests.PurchaseOrderViewsTests(methodName='runTest')[source]

Bases: SetupClass, TestCase

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_purchase_order_list_view_invalid_http_method()[source]
test_purchase_order_list_view_invalid_token()[source]
test_purchase_order_list_view_procurement_officer()[source]
test_purchase_order_list_view_unauthenticated()[source]
test_purchase_order_list_view_vendor()[source]
test_purchase_order_vendor_list_view_invalid_http_method()[source]
test_purchase_order_vendor_list_view_invalid_token()[source]
test_purchase_order_vendor_list_view_procurement_officer()[source]
test_purchase_order_vendor_list_view_unauthenticated()[source]
test_purchase_order_vendor_list_view_vendor()[source]
test_purchase_order_vendor_status_view_delivered_to_delivered()[source]
test_purchase_order_vendor_status_view_delivered_to_pending()[source]
test_purchase_order_vendor_status_view_delivered_to_shipped()[source]
test_purchase_order_vendor_status_view_invalid_data()[source]
test_purchase_order_vendor_status_view_invalid_http_method()[source]
test_purchase_order_vendor_status_view_invalid_token()[source]
test_purchase_order_vendor_status_view_missing_data()[source]
test_purchase_order_vendor_status_view_pending_to_delivered()[source]
test_purchase_order_vendor_status_view_pending_to_pending()[source]
test_purchase_order_vendor_status_view_pending_to_shipped()[source]
test_purchase_order_vendor_status_view_procurement_officer()[source]
test_purchase_order_vendor_status_view_shipped_to_delivered()[source]
test_purchase_order_vendor_status_view_shipped_to_pending()[source]
test_purchase_order_vendor_status_view_shipped_to_shipped()[source]
test_purchase_order_vendor_status_view_unauthenticated()[source]
test_purchase_order_vendor_status_view_vendor()[source]
class purchase.tests.PurchaseRequisitionViewsTests(methodName='runTest')[source]

Bases: SetupClass, TestCase

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_purchase_requisition_create_view_invalid_data()[source]
test_purchase_requisition_create_view_invalid_http_method()[source]
test_purchase_requisition_create_view_invalid_token()[source]
test_purchase_requisition_create_view_missing_data()[source]
test_purchase_requisition_create_view_one_to_one_inventory()[source]
test_purchase_requisition_create_view_other_inventory()[source]
test_purchase_requisition_create_view_procurement_officer()[source]
test_purchase_requisition_create_view_unauthenticated()[source]
test_purchase_requisition_create_view_vendor()[source]
test_purchase_requisition_delete_view_invalid_http_method()[source]
test_purchase_requisition_delete_view_invalid_token()[source]
test_purchase_requisition_delete_view_other_procurement_officer()[source]
test_purchase_requisition_delete_view_procurement_officer_own_item()[source]
test_purchase_requisition_delete_view_status_approved()[source]
test_purchase_requisition_delete_view_status_rejected()[source]
test_purchase_requisition_delete_view_unauthenticated()[source]
test_purchase_requisition_delete_view_vendor()[source]
test_purchase_requisition_list_view_invalid_http_method()[source]
test_purchase_requisition_list_view_invalid_token()[source]
test_purchase_requisition_list_view_procurement_officer()[source]
test_purchase_requisition_list_view_unauthenticated()[source]
test_purchase_requisition_list_view_vendor()[source]
test_purchase_requisition_retrieve_view_invalid_http_method()[source]
test_purchase_requisition_retrieve_view_invalid_token()[source]
test_purchase_requisition_retrieve_view_other_procurement_officer()[source]
test_purchase_requisition_retrieve_view_procurement_officer_own_item()[source]
test_purchase_requisition_retrieve_view_unauthenticated()[source]
test_purchase_requisition_retrieve_view_vendor()[source]
test_purchase_requisition_update_view_invalid_data()[source]
test_purchase_requisition_update_view_invalid_http_method()[source]
test_purchase_requisition_update_view_invalid_token()[source]
test_purchase_requisition_update_view_missing_data()[source]
test_purchase_requisition_update_view_other_procurement_officer()[source]
test_purchase_requisition_update_view_procurement_officer_own_item()[source]
test_purchase_requisition_update_view_status_approved()[source]
test_purchase_requisition_update_view_status_rejected()[source]
test_purchase_requisition_update_view_unauthenticated()[source]
test_purchase_requisition_update_view_vendor()[source]
test_purchase_requisition_vendor_list_view_invalid_http_method()[source]
test_purchase_requisition_vendor_list_view_invalid_token()[source]
test_purchase_requisition_vendor_list_view_procurement_officer()[source]
test_purchase_requisition_vendor_list_view_unauthenticated()[source]
test_purchase_requisition_vendor_list_view_vendor()[source]
class purchase.tests.SetupClass(methodName='runTest')[source]

Bases: TestCase

setUp()[source]

Hook method for setting up the test fixture before exercising it.

class purchase.tests.SupplierBidViewsTests(methodName='runTest')[source]

Bases: SetupClass, TestCase

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_supplier_bid_create_view_insufficient_quantity_fulfilled()[source]
test_supplier_bid_create_view_invalid_data()[source]
test_supplier_bid_create_view_invalid_http_method()[source]
test_supplier_bid_create_view_invalid_token()[source]
test_supplier_bid_create_view_missing_data()[source]
test_supplier_bid_create_view_procurement_officer()[source]
test_supplier_bid_create_view_requisition_bidded()[source]
test_supplier_bid_create_view_requisition_status_approved()[source]
test_supplier_bid_create_view_requisition_status_rejected()[source]
test_supplier_bid_create_view_unauthenticated()[source]
test_supplier_bid_create_view_vendor()[source]
test_supplier_bid_delete_view_invalid_http_method()[source]
test_supplier_bid_delete_view_invalid_token()[source]
test_supplier_bid_delete_view_other_vendor()[source]
test_supplier_bid_delete_view_procurement_officer()[source]
test_supplier_bid_delete_view_status_accepted()[source]
test_supplier_bid_delete_view_status_rejected()[source]
test_supplier_bid_delete_view_unauthenticated()[source]
test_supplier_bid_delete_view_vendor_own_item()[source]
test_supplier_bid_list_view_invalid_http_method()[source]
test_supplier_bid_list_view_invalid_token()[source]
test_supplier_bid_list_view_procurement_officer()[source]
test_supplier_bid_list_view_unauthenticated()[source]
test_supplier_bid_list_view_vendor()[source]
test_supplier_bid_prcourement_officer_bid_accept()[source]
test_supplier_bid_prcourement_officer_bid_reject()[source]
test_supplier_bid_procurement_officer_list_view_invalid_http_method()[source]
test_supplier_bid_procurement_officer_list_view_invalid_token()[source]
test_supplier_bid_procurement_officer_list_view_procurement_officer()[source]
test_supplier_bid_procurement_officer_list_view_unauthenticated()[source]
test_supplier_bid_procurement_officer_list_view_vendor()[source]
test_supplier_bid_procurement_officer_rank_view_insufficient_bids()[source]
test_supplier_bid_procurement_officer_rank_view_invalid_data()[source]
test_supplier_bid_procurement_officer_rank_view_invalid_http_method()[source]
test_supplier_bid_procurement_officer_rank_view_invalid_token()[source]
test_supplier_bid_procurement_officer_rank_view_missing_data()[source]
test_supplier_bid_procurement_officer_rank_view_procurement_officer()[source]
test_supplier_bid_procurement_officer_rank_view_sum_not_1()[source]
test_supplier_bid_procurement_officer_rank_view_unauthenticated()[source]
test_supplier_bid_procurement_officer_rank_view_vendor()[source]
test_supplier_bid_procurement_officer_retrieve_view_invalid_http_method()[source]
test_supplier_bid_procurement_officer_retrieve_view_invalid_token()[source]
test_supplier_bid_procurement_officer_retrieve_view_other_procurement_officer()[source]
test_supplier_bid_procurement_officer_retrieve_view_procurement_officer_own_item()[source]
test_supplier_bid_procurement_officer_retrieve_view_unauthenticated()[source]
test_supplier_bid_procurement_officer_retrieve_view_vendor()[source]
test_supplier_bid_procurement_officer_status_accept()[source]
test_supplier_bid_procurement_officer_status_invalid_data()[source]
test_supplier_bid_procurement_officer_status_invalid_http_method()[source]
test_supplier_bid_procurement_officer_status_invalid_token()[source]
test_supplier_bid_procurement_officer_status_missing_data()[source]
test_supplier_bid_procurement_officer_status_procurement_officer()[source]
test_supplier_bid_procurement_officer_status_reject()[source]
test_supplier_bid_procurement_officer_status_unauthenticated()[source]
test_supplier_bid_procurement_officer_status_vendor()[source]
test_supplier_bid_retrieve_view_invalid_http_method()[source]
test_supplier_bid_retrieve_view_invalid_token()[source]
test_supplier_bid_retrieve_view_other_vendor()[source]
test_supplier_bid_retrieve_view_procurement_officer()[source]
test_supplier_bid_retrieve_view_unauthenticated()[source]
test_supplier_bid_retrieve_view_vendor_own_item()[source]
test_supplier_bid_update_view_invalid_data()[source]
test_supplier_bid_update_view_invalid_http_method()[source]
test_supplier_bid_update_view_invalid_token()[source]
test_supplier_bid_update_view_missing_data()[source]
test_supplier_bid_update_view_other_vendor()[source]
test_supplier_bid_update_view_procurement_officer()[source]
test_supplier_bid_update_view_status_accepted()[source]
test_supplier_bid_update_view_status_rejected()[source]
test_supplier_bid_update_view_unauthenticated()[source]
test_supplier_bid_update_view_vendor_own_item()[source]

purchase.urls module

purchase.views module

class purchase.views.BasePurchaseRequisitionAPIView(**kwargs)[source]

Bases: GenericAPIView

get_object()[source]

Returns the object the view is displaying.

You may want to override this if you need to provide non-standard queryset lookups. Eg if objects are referenced using multiple keyword arguments in the url conf.

get_queryset()[source]

Get the list of items for this view. This must be an iterable, and may be a queryset. Defaults to using self.queryset.

This method should always be used rather than accessing self.queryset directly, as self.queryset gets evaluated only once, and those results are cached for all subsequent requests.

You may want to override this if you need to provide different querysets depending on the incoming request.

(Eg. return a list of items that is specific to the user)

permission_classes = [<class 'rest_framework.permissions.IsAuthenticated'>, <class 'accounts.permissions.IsProcurementOfficer'>]
serializer_class

alias of PurchaseRequisitionSerializer

class purchase.views.BaseSupplierAPIView(**kwargs)[source]

Bases: GenericAPIView

get_object()[source]

Returns the object the view is displaying.

You may want to override this if you need to provide non-standard queryset lookups. Eg if objects are referenced using multiple keyword arguments in the url conf.

get_queryset()[source]

Get the list of items for this view. This must be an iterable, and may be a queryset. Defaults to using self.queryset.

This method should always be used rather than accessing self.queryset directly, as self.queryset gets evaluated only once, and those results are cached for all subsequent requests.

You may want to override this if you need to provide different querysets depending on the incoming request.

(Eg. return a list of items that is specific to the user)

permission_classes = [<class 'rest_framework.permissions.IsAuthenticated'>, <class 'accounts.permissions.IsVendor'>]
serializer_class

alias of SupplierBidSerializer

class purchase.views.PurchaseOrderListView(**kwargs)[source]

Bases: ListAPIView

get_queryset()[source]

Get the list of items for this view. This must be an iterable, and may be a queryset. Defaults to using self.queryset.

This method should always be used rather than accessing self.queryset directly, as self.queryset gets evaluated only once, and those results are cached for all subsequent requests.

You may want to override this if you need to provide different querysets depending on the incoming request.

(Eg. return a list of items that is specific to the user)

permission_classes = [<class 'rest_framework.permissions.IsAuthenticated'>, <class 'accounts.permissions.IsProcurementOfficer'>]
serializer_class

alias of PurchaseOrderSerializer

class purchase.views.PurchaseOrderVendorListView(**kwargs)[source]

Bases: ListAPIView

get_queryset()[source]

Get the list of items for this view. This must be an iterable, and may be a queryset. Defaults to using self.queryset.

This method should always be used rather than accessing self.queryset directly, as self.queryset gets evaluated only once, and those results are cached for all subsequent requests.

You may want to override this if you need to provide different querysets depending on the incoming request.

(Eg. return a list of items that is specific to the user)

permission_classes = [<class 'rest_framework.permissions.IsAuthenticated'>, <class 'accounts.permissions.IsVendor'>]
serializer_class

alias of PurchaseOrderSerializer

class purchase.views.PurchaseOrderVendorStatusView(**kwargs)[source]

Bases: UpdateAPIView

get_queryset()[source]

Get the list of items for this view. This must be an iterable, and may be a queryset. Defaults to using self.queryset.

This method should always be used rather than accessing self.queryset directly, as self.queryset gets evaluated only once, and those results are cached for all subsequent requests.

You may want to override this if you need to provide different querysets depending on the incoming request.

(Eg. return a list of items that is specific to the user)

permission_classes = [<class 'rest_framework.permissions.IsAuthenticated'>, <class 'accounts.permissions.IsVendor'>]
serializer_class

alias of PurchaseOrderStatusSerializer

update(request, *args, **kwargs)[source]
class purchase.views.PurchaseRequisitionCreateView(**kwargs)[source]

Bases: BasePurchaseRequisitionAPIView, CreateAPIView

perform_create(serializer)[source]
queryset = <QuerySet []>
class purchase.views.PurchaseRequisitionDeleteView(**kwargs)[source]

Bases: BasePurchaseRequisitionAPIView, DestroyAPIView

perform_destroy(instance)[source]
queryset = <QuerySet []>
class purchase.views.PurchaseRequisitionListView(**kwargs)[source]

Bases: BasePurchaseRequisitionAPIView, ListAPIView

class purchase.views.PurchaseRequisitionRetrieveView(**kwargs)[source]

Bases: BasePurchaseRequisitionAPIView, RetrieveAPIView

class purchase.views.PurchaseRequisitionUpdateView(**kwargs)[source]

Bases: BasePurchaseRequisitionAPIView, UpdateAPIView

patch(request, *args, **kwargs)[source]
perform_update(serializer)[source]
queryset = <QuerySet []>
class purchase.views.PurchaseRequisitionVendorListView(**kwargs)[source]

Bases: ListAPIView

permission_classes = [<class 'rest_framework.permissions.IsAuthenticated'>, <class 'accounts.permissions.IsVendor'>]
queryset = <QuerySet []>
serializer_class

alias of PurchaseRequisitionVendorSerializer

class purchase.views.SupplierBidCreateView(**kwargs)[source]

Bases: BaseSupplierAPIView, CreateAPIView

perform_create(serializer)[source]
queryset = <QuerySet []>
class purchase.views.SupplierBidDeleteView(**kwargs)[source]

Bases: BaseSupplierAPIView, DestroyAPIView

perform_destroy(instance)[source]
queryset = <QuerySet []>
class purchase.views.SupplierBidListView(**kwargs)[source]

Bases: BaseSupplierAPIView, ListAPIView

class purchase.views.SupplierBidProcurementOfficerListView(**kwargs)[source]

Bases: ListAPIView

get_queryset()[source]

Get the list of items for this view. This must be an iterable, and may be a queryset. Defaults to using self.queryset.

This method should always be used rather than accessing self.queryset directly, as self.queryset gets evaluated only once, and those results are cached for all subsequent requests.

You may want to override this if you need to provide different querysets depending on the incoming request.

(Eg. return a list of items that is specific to the user)

permission_classes = [<class 'rest_framework.permissions.IsAuthenticated'>, <class 'accounts.permissions.IsProcurementOfficer'>]
serializer_class

alias of SupplierBidProcurementOfficerSerializer

class purchase.views.SupplierBidProcurementOfficerRankingView(**kwargs)[source]

Bases: GenericAPIView

permission_classes = [<class 'rest_framework.permissions.IsAuthenticated'>, <class 'accounts.permissions.IsProcurementOfficer'>]
post(request, requisition_id, *args, **kwargs)[source]
serializer_class

alias of SupplierBidProcurementOfficerSerializer

class purchase.views.SupplierBidProcurementOfficerRetrieveView(**kwargs)[source]

Bases: RetrieveAPIView

get_queryset()[source]

Get the list of items for this view. This must be an iterable, and may be a queryset. Defaults to using self.queryset.

This method should always be used rather than accessing self.queryset directly, as self.queryset gets evaluated only once, and those results are cached for all subsequent requests.

You may want to override this if you need to provide different querysets depending on the incoming request.

(Eg. return a list of items that is specific to the user)

permission_classes = [<class 'rest_framework.permissions.IsAuthenticated'>, <class 'accounts.permissions.IsProcurementOfficer'>]
serializer_class

alias of SupplierBidProcurementOfficerSerializer

class purchase.views.SupplierBidProcurementOfficerStatusView(**kwargs)[source]

Bases: UpdateAPIView

get_queryset()[source]

Get the list of items for this view. This must be an iterable, and may be a queryset. Defaults to using self.queryset.

This method should always be used rather than accessing self.queryset directly, as self.queryset gets evaluated only once, and those results are cached for all subsequent requests.

You may want to override this if you need to provide different querysets depending on the incoming request.

(Eg. return a list of items that is specific to the user)

permission_classes = [<class 'rest_framework.permissions.IsAuthenticated'>, <class 'accounts.permissions.IsProcurementOfficer'>]
serializer_class

alias of SupplierBidProcurementOfficerStatusSerializer

update(request, *args, **kwargs)[source]
class purchase.views.SupplierBidRetrieveView(**kwargs)[source]

Bases: BaseSupplierAPIView, RetrieveAPIView

class purchase.views.SupplierBidUpdateView(**kwargs)[source]

Bases: BaseSupplierAPIView, UpdateAPIView

patch(request, *args, **kwargs)[source]
perform_update(serializer)[source]
queryset = <QuerySet []>
purchase.views.getRoutes(request, *args, **kwargs)[source]

Module contents