InvManage.views.company_views
Module Contents
Functions
|
Creates a company on |
|
Updates a company on |
|
Deletes the company with primary key |
|
Retrieves the list of companies on |
- InvManage.views.company_views.create_company_view(request)
Creates a company on
POST
request and returns a company creation formGET
request.- GET /company
Gets the company creation form.
Example request:
GET /company/ 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 /company
Creates a company.
Example request:
POST /company/ HTTP/1.1 Host: localhost:8000 Content-Type: multipart/form-data;
- Form Parameters
comp-name –
Fringillami
comp-owner –
Ivor Barnett
comp-gstin –
89AAC056465468
comp-phone –
332 220-7026
comp-address –
Ap #849-6241 Euismod Av., 677598, Carinthia, Belgium
comp-email –
est.tempor@fringillami.org
comp-location –
Belgium
ship-title –
FingDocks
ship-name –
Harding Gross
ship-phone –
936 651-4847
ship-address –
8798 At, St., 7639
ship-city –
Rome
ship-state –
Lazio
ship-country –
Italy
ship-website –
fringdocs.com
ship-post –
300326
- Response Headers
Content-Type – multipart/form-data; boundary=—-WebKitFormBoundaryLTR88aZAnBUSE7mv
- Status Codes
302 Found – Redirects to
/company
.
- InvManage.views.company_views.update_company_view(request)
Updates a company on
POST
request and returns the company update formGET
request.- GET /company/update
Gets the company update form whose primary key matches the query parameter
pk
.Example request:
GET /company/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 company.
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: text/html; charset=utf-8
- POST /company/update
Updates a company.
Example request:
POST /company/ HTTP/1.1 Host: localhost:8000 Content-Type: multipart/form-data;
- Form Parameters
pk –
4
comp-name –
Fringillami
comp-owner –
Ivor Barnett
comp-gstin –
89AAC056465468
comp-phone –
332 220-7026
comp-address –
Ap #849-6241 Euismod Av., 677598, Carinthia, Belgium
comp-email –
est.tempor@fringillami.org
comp-location –
Belgium
ship-title –
FingDocks
ship-name –
Harding Gross
ship-phone –
936 651-4847
ship-address –
8798 At, St., 7639
ship-city –
Rome
ship-state –
Lazio
ship-country –
Italy
ship-website –
fringdocs.com
ship-post –
300326
- Response Headers
Content-Type – multipart/form-data; boundary=—-WebKitFormBoundaryLTR88aZAnBUSE7mv
- Status Codes
302 Found – Redirects to
/company
.
- InvManage.views.company_views.delete_company_view(request, pk)
Deletes the company with primary key
pk
onPOST
request.- POST /company/<str:object_id>/delete
Deletes the company represented by the primary key
object_id
.Example request:
POST /company/32/delete HTTP/1.1 Host: localhost:8000 Content-Type: application/x-www-form-urlencoded
- Parameters
object_id – Company primary key.
- Response Headers
Content-Type – application/x-www-form-urlencoded
- Status Codes
302 Found – Redirects to
/company
.500 Internal Server Error – Company matching query does not exist.
- InvManage.views.company_views.display_companies_view(request)
Retrieves the list of companies on
GET
request.- GET /companies/
Gets the list of all companies.
Example request:
GET /companies/ 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 companies list.
Example response:
HTTP/1.1 200 OK Vary: Accept Content-Type: text/html; charset=utf-8