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
POST
request, and returns a vendor creation form onGET
request.- 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 Vendor
vend-identifier –
TBPN-02692
vend-gstin –
89AAC254254F2
ship-title –
AKATSUKI
ship-name –
Kuame Burns
ship-phone –
679 166-3127
ship-address –
Nonummy Avenue
ship-city –
Chung Cheong
ship-state –
Guanacaste
ship-country –
tellusidnunc.net
ship-website –
Germany.protitor@tellusid.net
ship-post –
8949
pdform-currency –
DEM
pdform-minorder –
2000
pdform-contactperson –
Harding Gross
pdform-refcode –
CUST000124
pdform-transportmode –
Express
com-language –
German
com-phone –
936 651-4817
com-email –
non.sollicitudin@uttincidunt.org
com-fax –
323 555 1234
bank-name –
FIRST FLORIDA INTEGRITY BANK
bank-branch –
Bavaria
bank-region –
Bayem
bank-route –
67016325
bank-number –
42543251393
bank-acctype –
Current
bank-iban –
DE6233542
bank-code –
BA54354354
bank-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
POST
request and returns the vendor update form forGET
request.- 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 Vendor
vend-identifier –
TBPN-02692
vend-gstin –
89AAC254254F2
ship-title –
AKATSUKI
ship-name –
Kuame Burns
ship-phone –
679 166-3127
ship-address –
Nonummy Avenue
ship-city –
Chung Cheong
ship-state –
Guanacaste
ship-country –
tellusidnunc.net
ship-website –
Germany.protitor@tellusid.net
ship-post –
8949
pdform-currency –
DEM
pdform-minorder –
1000
pdform-contactperson –
Harding Gross
pdform-refcode –
CUST000124
pdform-transportmode –
Express
com-language –
German
com-phone –
936 651-4817
com-email –
non.sollicitudin@uttincidunt.org
com-fax –
323 555 1234
bank-name –
FIRST FLORIDA INTEGRITY BANK
bank-branch –
Bavaria
bank-region –
Bayem
bank-route –
67016325
bank-number –
42543251393
bank-acctype –
Current
bank-iban –
DE6233542
bank-code –
BA54354354
bank-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
pk
onPOST
request.- 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
GET
request.- 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
JSON
serialized data of the requested vendor onGET
request.- 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.