summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-10-22Add NEWS.md describing the project updatesKyle McFarland
2018-10-21Add view suppliers view and suppliers API endpointKyle McFarland
This adds a simple view (mostly cribbed from the component view but without the database stats) to view details for a given supplier, currently lists the components they supply and name/email address pairs for representatives however there's room to add fields for other representative contact and company information as well. On the API side this adds 3 endpoints: * api/suppliers: returns a list of all suppliers and their representatives * api/suppliers/<id>: returns a supplier object containing the representatives for the given supplier * api/suppliers/<id>/components: returns a supplier object containing a list of components supplied by the given supplier This also contains minor documentation and base template changes, fixing the navigation menu to use class="active" on the currently selected page (previously didn't work due to page_name capitalization)
2018-10-20Allow suppliers to have multiple representativesKyle McFarland
This adds a basic Representative model and allows for editing them in the admin interface both in the Suppliers admin panel for each supplier and in a new Representatives admin panel which allows bulk editing of all representatives. Currently multiple representatives are just listed in the component view as extra rows below the company row but it would probably make sense to add a view for viewing suppliers directly. The REST API has also been slightly modified to return a list of representatives for each supplier in the components endpoint, adding a suppliers endpoint would probably also be a good idea. Requires running: $ python manage.py migrate procurement 0002_add_representative To update the database for the new model, both forward and lossy reverse data migration is implemented in the migration.
2018-10-17settings.py: Use BASE_DIR in template directoriesKyle McFarland
Previously environments where the cwd wasn't the project root would except looking for base.html using a relative path, this fixes that to use an absolute path instead. (fixes running with apache + mod_wsgi)
2018-10-09Fixed the width of the component select.workmai
2018-10-04Initial commit of the coding assignment base projectworkmai