Package: django-starcross-gallery
Starcross GalleryStarcross Gallery is a streamlined photo gallery Django app. Key features are:Justified image grid display, as used on sites like FlickrInfinite scrollEasy drag and drop uploadStraightforward object model - All metadata is pulled from the file including title and exif dataDemo athttps://starcross.dev/galleryQuick startInstall Starcross gallery using pip:pip install django-starcross-galleryAdd “gallery” to your INSTALLED_APPS setting like this:INSTALLED_APPS = [
    ...
    'gallery',
]Include the gallery URLconf in your project urls.py like this with your preferred location e.g. “gallery/”:path('gallery/', include('gallery.urls')),Ensure aMEDIA directoryis set upRunpython manage.py makemigrations gallery, thenpython manage.py migrate galleryto create the models.Start the development server and create albums from the admin sitehttp://127.0.0.1:8000/admin/. It’s not necessary to create albums if you prefer just a single image feedVisithttp://127.0.0.1:8000/gallery/to access the gallery.InstructionsStarcross gallery groups Images into Albums, which enables your to organise your presentation. Add albums via the django admin interface, and drag multiple images into your empty albums in the album page itself. It’s also possible to use the gallery as a flat image feed only, which is a view published at <gallery base>/images. All images will be displayed here in descending date order. You can add images here directly as well, but they will not be added to an album.The gallery was designed with simplicity of image management in mind, so titles are derived from the file name. You only need to add albums and then drag your collection into place. The idea is to avoid the need to manage your collection both on the website and on disk. If you wish to reorganise, you can delete and easily re-uploadImages in albums are ordered by the date the photo was taken if available in the exif data, or failing that the modification dateAlbum order can be specified in the Django admin interface. Support fordjango-admin-sortable2is provided, if you want drag and drop ordering in the admin interface. Just installing the module is all that’s required. If you have already added albums you will need to use thereordercommand.SettingsOverride these default settings by adding to your settings.pyGALLERY_LOGO_PATH– Default: “gallery/images/starcross.png”Path to the header logo within the static directory. If you do not wish to use a logo, override with a blank stringGALLERY_TITLE– Default: “Gallery”The title of the Gallery shown in the header on the main page and image feedGALLERY_FOOTER_INFO– Default: “Starcross Gallery”Information text in the footerGALLERY_FOOTER_EMAIL– Default: “gallery@starcross.dev”Contact email address in the footer. Override with a blank string to hideGALLERY_THEME_COLOR– Default “black”Use a predefined theme color scheme. Options are black, white, or greyGALLERY_THUMBNAIL_SIZE– Default: 200The target thumbnail height in px. This will vary slightly in rendering due to the justified layoutGALLERY_PREVIEW_SIZE– Default: 1000The preview size in px - width or height, whichever is largest. The rendered image size will depend on the size of the browser window, so this should be set high enough to not cause a deterioration in qualityGALLERY_RESIZE_QUALITY– Default: 80JPEG quality (0-100) of the preview and thumbnail imagesGALLERY_HDPI_FACTOR– Default: 2The actual preview and thumbnail sizes are multiplied by this number, but rendered according to the quoted value. This enables high dpi displays, such as many mobile devices to show more detail and take advantage of their extra resolution. Some go up to 4x now, so recommended values are 1-4GALLERY_IMAGE_MARGIN– Default: 6Margin between thumbnails in px. This can create a more or less condensed lookTroubleshootingBroken image links after uploadCheck your MEDIA settings. If the media location on disk is changed, you will need to copy the files in the CACHE directory to the new location, or delete and re-upload the broken imagesErrors during uploadYour server may have a limit on maximum request size (e.g. client_max_body_size for nginx). This needs to be larger than the combined total of all the images your are uploading at once. Also the timeout may need to be extended as preview and thumbnail caches are generated at the time of uploadDelay when dragging images into upload boxIf you are using Firefox on Linux, there can be a delay before the upload box flashes to acknowledge the pending files, proportional to the number of files. You can use another browser such as Chrome if this is inconvenient.CreditsStarcross Gallery is by Alex Luton <gallery@starcross.dev>, published under GNU LGPLv3Album icon by Google licensed CC BY 3.0Focal Length icon by Ilaria Bernareggi from the Noun ProjectOther image data icons made by Freepik www.flaticon.com licensed by CC 3.0 BY