InvenTree/InvenTree/part
bloemp e1d1b51936
Various fixes to the "Download image from URL" functionality (#4101)
* Various fixes to the "Download image from URL" functionality

This commit adds an user-agent string to the download request wich prevents some sites from
returning a 403 (forbidden) status.
Clicking the download button on the thumbnail, also showed the thumbnail because the event wasn't stopped.
The parts thumbnail didn't update after a succesfull download of the image, reloadImage was never called.

* Fixed copy and paste errors in previous commit

* Reverted back the user-agent  immitation from the previous commit

* Add a user-agent overide setting

Add a setting to allow overiding the default user-agent  that is used for downloading images and files from a URL

* Fixed a typo in the description

* Another typo fixed

* Removed cast to string to prevent using 'None' as the user-agent

* Thumbnail delete button not visible after upload

The delete button on the image thumbnails of both parts and companies
isn't showing when we upload a new image. This is fixed by always
including the element on the page, and use javascript to show and hide
the element.
2022-12-24 23:17:04 +11:00
..
fixtures Allow searching of BOM List API endpoint (#3296) 2022-07-06 10:09:58 +10:00
migrations Simple typo fix (#3968) 2022-11-20 21:54:52 +11:00
templates/part Various fixes to the "Download image from URL" functionality (#4101) 2022-12-24 23:17:04 +11:00
templatetags Part pricing cache (#3710) 2022-11-14 15:58:22 +11:00
__init__.py Docstring checks in QC checks (#3089) 2022-06-02 01:37:39 +10:00
admin.py Part pricing cache (#3710) 2022-11-14 15:58:22 +11:00
api.py Use supplier part pack size for scheduling (#4063) 2022-12-15 20:58:14 +11:00
apps.py Part pricing cache (#3710) 2022-11-14 15:58:22 +11:00
bom.py Part pricing cache (#3710) 2022-11-14 15:58:22 +11:00
filters.py Feature: Supplier part pack size (#3644) 2022-09-08 09:49:14 +10:00
forms.py Refctor image downloader (#3393) 2022-07-25 11:17:59 +10:00
models.py Fix stock location structural check (#4089) 2022-12-21 23:30:23 +11:00
serializers.py Support structural part categories (#3931) 2022-11-18 08:10:06 +11:00
settings.py Docstring checks in QC checks (#3089) 2022-06-02 01:37:39 +10:00
tasks.py Save newly created pricing object (#4075) 2022-12-18 07:14:34 +11:00
test_api.py Add unit test for deleting part which has pricing information (#3986) 2022-12-13 11:07:35 +11:00
test_bom_export.py Part pricing cache (#3710) 2022-11-14 15:58:22 +11:00
test_bom_import.py Add more checks to pre-commit (#3132) 2022-06-06 08:56:52 +10:00
test_bom_item.py Adds 'consumable' field to BomItem model (#2890) 2022-09-24 23:45:56 +10:00
test_category.py Part pricing cache (#3710) 2022-11-14 15:58:22 +11:00
test_migrations.py Docstring checks in QC checks (#3089) 2022-06-02 01:37:39 +10:00
test_param.py Docstring checks in QC checks (#3089) 2022-06-02 01:37:39 +10:00
test_part.py Barcode Refactor (#3640) 2022-09-15 14:14:51 +10:00
test_pricing.py Unit test for part pricing background task (#4080) 2022-12-19 13:29:32 +11:00
test_views.py Set part category (#3134) 2022-06-06 13:00:30 +10:00
urls.py Remove broken URL (#3623) 2022-09-01 07:36:35 +10:00
views.py Part pricing cache (#3710) 2022-11-14 15:58:22 +11:00