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
POSTrequest and returns a company creation formGETrequest.- 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 –
Fringillamicomp-owner –
Ivor Barnettcomp-gstin –
89AAC056465468comp-phone –
332 220-7026comp-address –
Ap #849-6241 Euismod Av., 677598, Carinthia, Belgiumcomp-email –
est.tempor@fringillami.orgcomp-location –
Belgiumship-title –
FingDocksship-name –
Harding Grossship-phone –
936 651-4847ship-address –
8798 At, St., 7639ship-city –
Romeship-state –
Lazioship-country –
Italyship-website –
fringdocs.comship-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
POSTrequest and returns the company update formGETrequest.- 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 –
4comp-name –
Fringillamicomp-owner –
Ivor Barnettcomp-gstin –
89AAC056465468comp-phone –
332 220-7026comp-address –
Ap #849-6241 Euismod Av., 677598, Carinthia, Belgiumcomp-email –
est.tempor@fringillami.orgcomp-location –
Belgiumship-title –
FingDocksship-name –
Harding Grossship-phone –
936 651-4847ship-address –
8798 At, St., 7639ship-city –
Romeship-state –
Lazioship-country –
Italyship-website –
fringdocs.comship-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
pkonPOSTrequest.- 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
GETrequest.- 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