InvManage.views.vendor_views
Module Contents
Functions
|
Creates a vendor on |
|
Updates a vendor on |
|
Deletes the vendor with primary key |
|
Retrieves the list of vendors on |
|
Returns the |
- InvManage.views.vendor_views.create_vendor_view(request)
Creates a vendor on
POSTrequest, and returns a vendor creation form onGETrequest.- GET /vendor
Gets the vendor creation form.
Example request:
GET /vendor/ HTTP/1.1 Host: localhost:8000 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: text/html; charset=utf-8
- POST /vendor
Creates a vendor.
Example request:
POST /vendor/ HTTP/1.1 Host: localhost:8000 Content-Type: multipart/form-data;
- Form Parameters
vend-name –
Lug Vendorvend-identifier –
TBPN-02692vend-gstin –
89AAC254254F2ship-title –
AKATSUKIship-name –
Kuame Burnsship-phone –
679 166-3127ship-address –
Nonummy Avenueship-city –
Chung Cheongship-state –
Guanacasteship-country –
tellusidnunc.netship-website –
Germany.protitor@tellusid.netship-post –
8949pdform-currency –
DEMpdform-minorder –
2000pdform-contactperson –
Harding Grosspdform-refcode –
CUST000124pdform-transportmode –
Expresscom-language –
Germancom-phone –
936 651-4817com-email –
non.sollicitudin@uttincidunt.orgcom-fax –
323 555 1234bank-name –
FIRST FLORIDA INTEGRITY BANKbank-branch –
Bavariabank-region –
Bayembank-route –
67016325bank-number –
42543251393bank-acctype –
Currentbank-iban –
DE6233542bank-code –
BA54354354bank-branchcode –
BA35435823
- Response Headers
Content-Type – multipart/form-data; boundary=—-WebKitFormBoundaryLTR88aZAnBUSE7mv
- Status Codes
302 Found – Redirects to
/vendor.
- InvManage.views.vendor_views.update_vendor_view(request)
Updates a vendor on
POSTrequest and returns the vendor update form forGETrequest.- GET /vendor/update
Gets the vendor update form whose primary key matches the query parameter
pk.Example request:
GET /vendor/update HTTP/1.1 Host: localhost:8000 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
- Query Parameters
pk – The primary key of the vendor.
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: text/html; charset=utf-8
- POST /vendor/update
Updates the vendor.
Example request:
POST /vendor/update HTTP/1.1 Host: localhost:8000 Content-Type: multipart/form-data;
- Form Parameters
vend-name –
Lug Vendorvend-identifier –
TBPN-02692vend-gstin –
89AAC254254F2ship-title –
AKATSUKIship-name –
Kuame Burnsship-phone –
679 166-3127ship-address –
Nonummy Avenueship-city –
Chung Cheongship-state –
Guanacasteship-country –
tellusidnunc.netship-website –
Germany.protitor@tellusid.netship-post –
8949pdform-currency –
DEMpdform-minorder –
1000pdform-contactperson –
Harding Grosspdform-refcode –
CUST000124pdform-transportmode –
Expresscom-language –
Germancom-phone –
936 651-4817com-email –
non.sollicitudin@uttincidunt.orgcom-fax –
323 555 1234bank-name –
FIRST FLORIDA INTEGRITY BANKbank-branch –
Bavariabank-region –
Bayembank-route –
67016325bank-number –
42543251393bank-acctype –
Currentbank-iban –
DE6233542bank-code –
BA54354354bank-branchcode –
BA35435823
- Response Headers
Content-Type – multipart/form-data; boundary=—-WebKitFormBoundaryLTR88aZAnBUSE7mv
- Status Codes
302 Found – Redirects to
/consumer.
- InvManage.views.vendor_views.delete_vendor_view(request, pk)
Deletes the vendor with primary key
pkonPOSTrequest.- POST /vendor/<str:object_id>/delete
Deletes the vendor represented by the primary key
object_id.Example request:
POST /vendor/5/delete HTTP/1.1 Host: localhost:8000 Content-Type: application/x-www-form-urlencoded
- Parameters
object_id – Vendor primary key.
- Response Headers
Content-Type – application/x-www-form-urlencoded
- Status Codes
302 Found – Redirects to
/vendors.500 Internal Server Error – Vendor matching query does not exist.
- InvManage.views.vendor_views.display_vendors_view(request)
Retrieves the list of vendors on
GETrequest.- GET /vendors/
Gets the list of all vendors.
Example request:
GET /vendors/ HTTP/1.1 Host: localhost:8000 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
- Form Parameters
page – The page number of the vendors list.
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: text/html; charset=utf-8
- InvManage.views.vendor_views.get_vendor(request)
Returns the
JSONserialized data of the requested vendor onGETrequest.- GET /get_vendor/
Gets the JSON serialized data of the requested vendor.
Example request:
GET /get_vendor/ HTTP/1.1 Host: localhost:8000 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
- Parameters
vendor_id – Vendor primary key.
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: application/json; charset=utf-8 [ { "name": "Lug Vendor", "identifier": "TBPN-02692", "gstin": "89AAC4683897343", "address": { "name": "Kuame Burns", "address": "Nonummy Avenue", "city": "Chung Cheong", "phone": "679 166-3127", "state": "Guanacaste", "country": "tellusidnunc.net", "post": "8949" } } ]
- Response Headers
Content-Type – application/json
- Status Codes
200 OK – List of vendors received successfully.
400 Bad Request – Bad request version
500 Internal Server Error – Vendor matching query does not exist.