0

after I put the photologue on the server, I have no issue with uploading photos.

the issue is when I am creating a Gallery from the admin site, I can choose only one photo to be attached to the Gallery. even if I selected many photos, one of them will be linked to the Gallery only.

The only way to add photos to a gallery is by adding them manually to photologue_gallery_photos table in the database :(

anyone kows how to solve it?

Alasdair
  • 298,606
  • 55
  • 578
  • 516
john
  • 25
  • 6

3 Answers3

0

I had exactly the same problem. I suspected some problem with django-sortedm2m package. To associate photo to gallery, it was using SortedManyToMany() from sortedm2m package. For some reason, the admin widget associated with this package did not function well. (I tried Firefox, Chrome and safari browser).

I actually did not care for the order of photos getting uploaded to Gallery, so I simply replaced that function call with Django's ManyToManyField(). Also, I noticed that SortedManyToMany('Photo') was called with constant string Photo. Instead it should be called with SortedManyToMany(Photo) to identify Photo class. Although it did not resolve my problem entirely. So I used default ManyToMany field and it is showing all the photos from Gallery.

0

I guess your problem is solved by now, but just in case.. I had the same problem. Looking around in the logs, I found it was caused by me not having consolidated the static files from sortedm2m with the rest of my static files (hence the widget was not working properly).

CLO
  • 1
  • 3
0

Make sure sortedm2m is in INSTALLED_APPS in addition to photologue; merely duplicating any sortedm2m templates alone will not suffice.

Installation & configuration — django-photologue 3.6 documentation

Jan Kyu Peblik
  • 1,435
  • 14
  • 20