Closed prepstarr closed 6 months ago
Try adding a
try:
img = get_thumbnailer(obj.image).get_thumbnail({'size': (70,70,), 'crop': True})
except InvalidImageFormatError:
img = <icon for missing image or None>
around line 62 in your emplois/admin.py
to catch the issue that a thumbnails is - for whatever reason - not available.
it's an interesting idea that I will have to try later, right now I disabled it, but I can still not see the images ... in the Filer dossier... which renders this program ineffective unfortunately...
Now, this might be a configuration issue. For test purposes: What happens if you remove the FILER_STORAGES
setting from your settings.py
? (Attn: You can only expect newly uploaded images to work.)
no it doesn't seem to be working at all when I comment out the FILER_STORAGES... there is no sign of life really... basically like I tried uploading a file it said it was sucessful but then no upload occurred...
Please check your media folder where the file went. You might have to search many subdirectories.
If you're using ./manage.py runserver
you will have to serve the media files manually, e.g., by something like this in urls.py
:
from django.conf import settings
from django.conf.urls.static import static
if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
the files are there but I think it's referencing the wrong directory ...
So, can you confirm, they are served by the web server? Can you see them in the browser by typing their URL .../media/.../file.jpg
?
What does the console say about the images not found? Pick one example and compare URL path and file path.
I cannot see them in the browser by doing that because python doesn't seem to work that way... basically it somehow takes a path from the computer and generates it no? I don't exactly understand how python serves websites versus regular apache ... it is a bit confusing where that command is found... that explains having said that I am still using the apache when I tried the run server for some reason it brought it back to my website so it ended up being pointless... it might require a lot of rewriting that would be complicated to go back and forth with... is this really rocket science ? At some point it would beg the question if fortran or something was not a little bit simpler and more direct...
it was working before the only thing that changed is somehow when I upgraded to freebsd 14 from 13 something might have been corrupted in the python environment and I had to reinstall it no longer keeping the modification that was made earlier...
/usr/home/sixpiece/python/emploiquebec/media the following path contains the following files and directories...
/usr/home/sixpiece/python/emploiquebec/media (env) $ ls 1516218974999.jpg 1559163987903.jpg 1559163987903_OYEHVeZ.jpg 1622854700176.jpg 1639393758139.jpg 1658747787311.jpg 1674926477459.jpg 1686685359122.jpg IMG_3040_3.JPG IMG_E3043_5.JPG admin bibeau.jpg e388b7e2-02f3-11ed-a861-9df9aa4bafc5.jpg filer filer_public_thumbnails filer_thumbnails hicham-media.jpg image.png image1.jpg image_1.png index.html sheldon-lub.png (env) $ pwd /usr/home/sixpiece/python/emploiquebec/media (env) $ (env) $ tree | more . ├── 1516218974999.jpg ├── 1559163987903.jpg ├── 1559163987903_OYEHVeZ.jpg ├── 1622854700176.jpg ├── 1639393758139.jpg ├── 1658747787311.jpg ├── 1674926477459.jpg ├── 1686685359122.jpg ├── IMG_3040_3.JPG ├── IMG_E3043_5.JPG ├── admin ├── bibeau.jpg ├── e388b7e2-02f3-11ed-a861-9df9aa4bafc5.jpg ├── filer │ └── filer_public │ ├── 02 │ │ └── 90 │ │ └── 02904552-d7b4-490d-b95d-f361ebb6470d │ │ └── lettre-presentation-de-ubisoft.pdf │ ├── 04 │ │ └── 29 │ │ └── 0429109e-2d3e-411e-a014-4912d8cb9920 │ │ └── 1641229238832.jpg ale.jpg │ │ │ ├── 1657904662520.jpg70x70_q85_crop_subsampling-2.jpg │ │ │ ├── 1657904662520.jpg70x70_q85_subsampling-2.jpg │ │ │ └── 1657904662520.jpg80x80_q85_crop_subsampling-2.jpg │ │ └── e9 │ │ └── c6e9a7e2-deab-4c28-b49f-0e318b412761 │ │ ├── 1684179450957.jpg160x160_q85_crop_subsampling-2.jpg │ │ ├── 1684179450957.jpg16x16_q85_crop_subsampling-2_upscale.jpg │ │ ├── 1684179450957.jpg180x180_q85_crop_subsampling-2_upscale.jpg │ │ ├── 1684179450957.jpg210x0_q85_subsampling-2_upscale.jpg │ │ ├── 1684179450957.jpg32x32_q85_crop_subsampling-2_upscale.jpg │ │ ├── 1684179450957.jpg48x48_q85_crop_subsampling-2_upscale.jpg │ │ ├── 1684179450957.jpg64x64_q85_crop_subsampling-2_upscale.jpg │ │ ├── 1684179450957.jpg70x70_q85_crop_subsampling-2.jpg │ │ └── 1684179450957.jpg80x80_q85_crop_subsampling-2.jpg │ ├── c8 │ │ └── 65 │ │ └── c8653316-388c-4775-a510-d9b3996650fb │ │ ├── 1686342695151.jpg160x160_q85_crop_subsampling-2.jpg │ │ ├── 1686342695151.jpg16x16_q85_crop_subsampling-2_upscale.jpg │ │ ├── 1686342695151.jpg180x180_q85_crop_subsampling-2_upscale.jpg │ │ ├── 1686342695151.jpg__210x0_q85_subsampling-2_upscale.jpg │ │ ├── 1686342695151.jpg32x32_q85_crop_subsampling-2_upscale.jpg │ │ ├── 1686342695151.jpg48x48_q85_crop_subsampling-2_upscale.jpg │ │ ├── 1686342695151.jpg64x64_q85_crop_subsampling-2_upscale.jpg │ │ ├── 1686342695151.jpg70x70_q85_crop_subsampling-2.jpg │ │ └── 1686342695151.jpg__80x80_q85_crop_subsampling-2.jpg │ ├── ca │ │ └── 7f │ │ └── ca7f0217-b283-4b5f-98d1-9a550bd1f083 │ │ ├── 023.jpg16x16_q85_crop_subsampling-2_upscale.jpg │ │ ├── 023.jpg180x180_q85_crop_subsampling-2_upscale.jpg │ │ ├── 023.jpg210x0_q85_subsampling-2_upscale.jpg │ │ ├── 023.jpg32x32_q85_crop_subsampling-2_upscale.jpg │ │ ├── 023.jpg40x40_q85_crop_subsampling-2.jpg │ │ ├── 023.jpg48x48_q85_crop_subsampling-2_upscale.jpg │ │ ├── 023.jpg64x64_q85_crop_subsampling-2_upscale.jpg │ │ └── 023.jpg80x80_q85_crop_subsampling-2.jpg │ ├── cf │ │ └── 99 │ │ └── cf994eb3-4651-41eb-94fc-366fa16f562f │ │ ├── public_1.jpeg160x160_q85_crop_subsampling-2.jpg │ │ ├── public_1.jpeg16x16_q85_crop_subsampling-2_upscale.jpg │ │ ├── public_1.jpeg__180x180_q85_crop_subsampling-2_upscale.jpg │ │ ├── public_1.jpeg210x0_q85_subsampling-2_upscale.jpg │ │ ├── public_1.jpeg210x118_q85_subsampling-2_upscale.jpg │ │ ├── public_1.jpeg32x32_q85_crop_subsampling-2_upscale.jpg │ │ ├── public_1.jpeg40x40_q85_crop_subsampling-2.jpg │ │ ├── public_1.jpeg420x236_q85_subsampling-2_upscale.jpg │ │ ├── public_1.jpeg48x48_q85_crop_subsampling-2_upscale.jpg │ │ ├── public_1.jpeg__64x64_q85_crop_subsampling-2_upscale.jpg │ │ ├── public_1.jpeg70x70_q85_crop_subsampling-2.jpg │ │ └── public_1.jpeg80x80_q85_crop_subsampling-2.jpg │ ├── d3 │ │ └── 16 │ │ └── d3162ff5-30f8-476f-9064-38d597e8c71a │ │ ├── 1528123921321.jpg__160x160_q85_crop_subsampling-2.jpg │ │ ├── 1528123921321.jpg16x16_q85_crop_subsampling-2_upscale.jpg │ │ ├── 1528123921321.jpg180x180_q85_crop_subsampling-2_upscale.jpg │ │ ├── 1528123921321.jpg210x0_q85_subsampling-2_upscale.jpg │ │ ├── 1528123921321.jpg32x32_q85_crop_subsampling-2_upscale.jpg │ │ ├── 1528123921321.jpg48x48_q85_crop_subsampling-2_upscale.jpg │ │ ├── 1528123921321.jpg64x64_q85_crop_subsampling-2_upscale.jpg │ │ ├── 1528123921321.jpg70x70_q85_crop_subsampling-2.jpg │ │ └── 1528123921321.jpg80x80_q85_crop_subsampling-2.jpg │ ├── d7 │ │ └── fa │ │ └── d7fa256c-0483-4a11-93d6-0a0bc30f5763 │ │ ├── president.jpg16x16_q85_crop_subsampling-2_upscale.jpg │ │ ├── president.jpg180x180_q85_crop_subsampling-2_upscale.jpg │ │ ├── president.jpg__210x0_q85_subsampling-2_upscale.jpg │ │ ├── president.jpg32x32_q85_crop_subsampling-2_upscale.jpg │ │ ├── president.jpg48x48_q85_crop_subsampling-2_upscale.jpg │ │ ├── president.jpg64x64_q85_crop_subsampling-2_upscale.jpg │ │ └── president.jpg70x70_q85_crop_subsampling-2.jpg │ ├── d8 │ │ └── 8a │ │ └── d88a9402-c24b-4ff6-8279-414c2a7a4671 │ │ ├── 1605651986616.jpg16x16_q85_crop_subsampling-2_upscale.jpg │ │ ├── 1605651986616.jpg180x180_q85_crop_subsampling-2_upscale.jpg │ │ ├── 1605651986616.jpg__210x0_q85_subsampling-2_upscale.jpg │ │ ├── 1605651986616.jpg32x32_q85_crop_subsampling-2_upscale.jpg │ │ ├── 1605651986616.jpg48x48_q85_crop_subsampling-2_upscale.jpg │ │ ├── 1605651986616.jpg64x64_q85_crop_subsampling-2_upscale.jpg │ │ └── 1605651986616.jpg70x70_q85_crop_subsampling-2.jpg │ ├── dd │ │ └── 64 │ │ └── dd64a1d4-a425-490e-b23f-90675f948759 │ │ ├── presentation-eclair.png__160x160_q85_crop_subsampling-2.jpg │ │ ├── presentation-eclair.png16x16_q85_crop_subsampling-2_upscale.jpg │ │ ├── presentation-eclair.png180x180_q85_crop_subsampling-2_upscale.jpg │ │ ├── presentation-eclair.png210x0_q85_subsampling-2_upscale.jpg │ │ ├── presentation-eclair.png32x32_q85_crop_subsampling-2_upscale.jpg │ │ ├── presentation-eclair.png40x40_q85_crop_subsampling-2.jpg │ │ ├── presentation-eclair.png48x48_q85_crop_subsampling-2_upscale.jpg │ │ ├── presentation-eclair.png64x64_q85_crop_subsampling-2_upscale.jpg │ │ └── presentation-eclair.png80x80_q85_crop_subsampling-2.jpg │ ├── e4 │ │ └── df │ │ └── e4df2881-ebbf-4225-961f-c3c6d0da39b2 │ │ ├── 1649257805574.jpg__160x160_q85_crop_subsampling-2.jpg │ │ ├── 1649257805574.jpg16x16_q85_crop_subsampling-2_upscale.jpg │ │ ├── 1649257805574.jpg180x180_q85_crop_subsampling-2_upscale.jpg │ │ ├── 1649257805574.jpg210x0_q85_subsampling-2_upscale.jpg │ │ ├── 1649257805574.jpg32x32_q85_crop_subsampling-2_upscale.jpg │ │ ├── 1649257805574.jpg40x40_q85_crop_subsampling-2.jpg │ │ ├── 1649257805574.jpg48x48_q85_crop_subsampling-2_upscale.jpg │ │ ├── 1649257805574.jpg64x64_q85_crop_subsampling-2_upscale.jpg │ │ ├── 1649257805574.jpg70x70_q85_crop_subsampling-2.jpg │ │ └── 1649257805574.jpg__80x80_q85_crop_subsampling-2.jpg │ ├── e6 │ │ └── 19 │ │ └── e619b5bb-2cf4-471c-9017-eb444bd66e95 │ │ ├── e5dbd575de656bf010b8511c425e7835.png16x16_crop_subsampling-2_upscale.png │ │ ├── e5dbd575de656bf010b8511c425e7835.png180x180_crop_subsampling-2_upscale.png │ │ ├── e5dbd575de656bf010b8511c425e7835.png210x0_subsampling-2_upscale.png │ │ ├── e5dbd575de656bf010b8511c425e7835.png32x32_crop_subsampling-2_upscale.png │ │ ├── e5dbd575de656bf010b8511c425e7835.png48x48_crop_subsampling-2_upscale.png │ │ ├── e5dbd575de656bf010b8511c425e7835.png64x64_crop_subsampling-2_upscale.png │ │ └── e5dbd575de656bf010b8511c425e7835.png70x70_crop_subsampling-2.png │ ├── ea │ │ └── d6 │ │ └── ead6b7fb-2f82-4962-b11f-7e40f18963a1 │ │ ├── 1658747787311.jpg160x160_q85_crop_subsampling-2.jpg │ │ ├── 1658747787311.jpg16x16_q85_crop_subsampling-2_upscale.jpg │ │ ├── 1658747787311.jpg180x180_q85_crop_subsampling-2_upscale.jpg │ │ ├── 1658747787311.jpg210x0_q85_subsampling-2_upscale.jpg │ │ ├── 1658747787311.jpg32x32_q85_crop_subsampling-2_upscale.jpg │ │ ├── 1658747787311.jpg40x40_q85_crop_subsampling-2.jpg │ │ ├── 1658747787311.jpg48x48_q85_crop_subsampling-2_upscale.jpg │ │ ├── 1658747787311.jpg64x64_q85_crop_subsampling-2_upscale.jpg │ │ ├── 1658747787311.jpg70x70_q85_crop_subsampling-2.jpg │ │ ├── 1658747787311.jpg70x70_q85_subsampling-2.jpg │ │ └── 1658747787311.jpg80x80_q85_crop_subsampling-2.jpg │ ├── f3 │ │ └── 60 │ │ └── f360855c-3ebd-49dd-9403-0afa07ed7310 │ │ ├── 025.jpg16x16_q85_crop_subsampling-2_upscale.jpg │ │ ├── 025.jpg180x180_q85_crop_subsampling-2_upscale.jpg │ │ ├── 025.jpg210x0_q85_subsampling-2_upscale.jpg │ │ ├── 025.jpg32x32_q85_crop_subsampling-2_upscale.jpg │ │ ├── 025.jpg40x40_q85_crop_subsampling-2.jpg │ │ ├── 025.jpg48x48_q85_crop_subsampling-2_upscale.jpg │ │ └── 025.jpg64x64_q85_crop_subsampling-2_upscale.jpg │ ├── f9 │ │ ├── 11 │ │ │ └── f91196e0-404b-439b-bfca-149d50f71dc6 │ │ │ ├── 1559163987903.jpg16x16_q85_crop_subsampling-2_upscale.jpg │ │ │ ├── 1559163987903.jpg180x180_q85_crop_subsampling-2_upscale.jpg │ │ │ ├── 1559163987903.jpg210x0_q85_subsampling-2_upscale.jpg │ │ │ ├── 1559163987903.jpg32x32_q85_crop_subsampling-2_upscale.jpg │ │ │ ├── 1559163987903.jpg40x40_q85_crop_subsampling-2.jpg │ │ │ ├── 1559163987903.jpg48x48_q85_crop_subsampling-2_upscale.jpg │ │ │ ├── 1559163987903.jpg64x64_q85_crop_subsampling-2_upscale.jpg │ │ │ ├── 1559163987903.jpg70x70_q85_crop_subsampling-2.jpg │ │ │ └── 1559163987903.jpg70x70_q85_subsampling-2.jpg │ │ ├── 16 │ │ │ └── f916028c-8a37-4102-9368-159217ae6fa4 │ │ │ ├── 1605290439609.jpg16x16_q85_crop_subsampling-2_upscale.jpg │ │ │ ├── 1605290439609.jpg180x180_q85_crop_subsampling-2_upscale.jpg │ │ │ ├── 1605290439609.jpg210x0_q85_subsampling-2_upscale.jpg │ │ │ ├── 1605290439609.jpg32x32_q85_crop_subsampling-2_upscale.jpg │ │ │ ├── 1605290439609.jpg40x40_q85_crop_subsampling-2.jpg │ │ │ ├── 1605290439609.jpg48x48_q85_crop_subsampling-2_upscale.jpg │ │ │ ├── 1605290439609.jpg64x64_q85_crop_subsampling-2_upscale.jpg │ │ │ └── 1605290439609.jpg70x70_q85_crop_subsampling-2.jpg │ │ └── c4 │ │ └── f9c4bd27-f8a2-4e38-9da1-24f2051a4ce7 │ ├── fb │ │ └── 5b │ │ └── fb5bdd6d-9a78-4a7c-ab42-39c41d3b510b │ │ ├── sheldon-lub.png__160x160_q85_crop_subsampling-2.jpg │ │ ├── sheldon-lub.png16x16_q85_crop_subsampling-2_upscale.jpg │ │ ├── sheldon-lub.png180x180_q85_crop_subsampling-2_upscale.jpg │ │ ├── sheldon-lub.png210x0_q85_subsampling-2_upscale.jpg │ │ ├── sheldon-lub.png32x32_q85_crop_subsampling-2_upscale.jpg │ │ ├── sheldon-lub.png40x40_q85_crop_subsampling-2.jpg │ │ ├── sheldon-lub.png48x48_q85_crop_subsampling-2_upscale.jpg │ │ ├── sheldon-lub.png64x64_q85_crop_subsampling-2_upscale.jpg │ │ ├── sheldon-lub.png70x70_q85_crop_subsampling-2.jpg │ │ ├── sheldon-lub.png70x70_q85_subsampling-2.jpg │ │ └── sheldon-lub.png80x80_q85_crop_subsampling-2.jpg │ └── fe │ └── 69 │ └── fe694225-2872-4cc7-9ca2-0dc6ccb9e782 │ ├── luc_filiatreault_profil.jpg160x160_q85_crop_subsampling-2.jpg │ ├── luc_filiatreault_profil.jpg16x16_q85_crop_subsampling-2_upscale.jpg │ ├── luc_filiatreault_profil.jpg180x180_q85_crop_subsampling-2_upscale.jpg │ ├── luc_filiatreault_profil.jpg210x0_q85_subsampling-2_upscale.jpg │ ├── luc_filiatreault_profil.jpg32x32_q85_crop_subsampling-2_upscale.jpg │ ├── luc_filiatreault_profil.jpg40x40_q85_crop_subsampling-2.jpg │ ├── luc_filiatreault_profil.jpg48x48_q85_crop_subsampling-2_upscale.jpg │ ├── luc_filiatreault_profil.jpg64x64_q85_crop_subsampling-2_upscale.jpg │ ├── luc_filiatreault_profil.jpg70x70_q85_crop_subsampling-2.jpg │ ├── luc_filiatreault_profil.jpg70x70_q85_subsampling-2.jpg │ └── luc_filiatreault_profil.jpg80x80_q85_crop_subsampling-2.jpg ├── hicham-media.jpg ├── image.png ├── image1.jpg ├── image_1.png ├── index.html └── sheldon-lub.png
421 directories, 539 files
something like this if you require the full tree I will add it...
how do I trace where the program is calling for the sites?
Not sure what you mean...
Coming back to my previous question: Can you try to get the bibeau.jpg
file displayed in the browser, something like https://quebec.ca/media/bibeau.jpg
.
Then do the same with a filer image:
https://quebec.ca/media/filer/filer_public/04/29/0429109e-2d3e-411e-a014-4912d8cb9920/1641229238832.jpg
it's working again thank you very much... the issue was somehow the permissions on the folder media must have been changed somehow... so I changed it from 707 to 755..
@prepstarr What did solve it?