I have spent a lot of time trying different ways to upload multiple images in Django admin but I have failed miserably. I have tried django-multiupload-admin which I didn't manage to make it work and inlines is not what I am looking for. I just want to select several images all at once, upload them under one category and them display them into a mansory gallery. I am willing to pay someone to help me find a simple way. Please help!
You can extend the Admin interface pretty easily using Javascript.
Here is the link ... it will help you design django admin with drag and drop method to upload images
Django Snippet Article about Image Upload
Related
I'm building a Django blog in which i want registered users to be able to create their own blog posts including a title image.
i've incorporated cloudinary but can currently only upload images through the admin panel.
After reading through the docs and a few similar questions here i am none the wiser.
Has anyone encountered anything like this?
Is it possible to just put an image upload in my form and tie that in to cloudinary somehow?
please help!
I am trying to let my users upload multiple pictures to their blog posts. I have created a model for the blog post and a separate model for the images and used a foreign key to relate them. I was planning on using dropzone.js so that the user can drag and drop the pictures. I have looked into using formsets but can't get my head around them. Can anyone explain to a django beginner how to go about doing this? Or better yet give an example? Thanks!
I have done something similar using jquery-fileupload. Never used dropzone.js so maybe the explanation is not directly equivalent, but this is roughly what you do.
If you don't want to use formsets, upload the images via AJAX and add hidden fields to the form with the primary keys of the uploaded images, so you can attach them when saving the blogpost in Django. You will have to deal with orphaned images (those that were uploaded but the blogpost was never saved.)
If you want to use formsets, Django expects a format in the posted form data, you just need to make sure you create in your html (with dropzone js templating) the apropriate format Django is expecting, and also incrementing/decrementing the counter of the formset's management form.
Neither way is trivial, you need to pick a path and bang your head a few times before having it working.
I have a website that is using Django's admin interface to facilitate non-developers adding content to the site. The site has an Events page (and associated model), and each Event can have an associated photo gallery.
I'm thinking that photo galleries should have their own model. There is a table in the database which associates image paths with their Event.
What I need is a way to upload images. Preferably a multiple-file upload solution since there could be dozens of images per event. I want these images to be recorded correctly in their table and added to the file system in the correct location on the server.
I was originally thinking that the upload feature should be included on the Event admin page to make it easier for content contributors, but maybe it would be easier to keep a separate photo gallery admin and have them select the Event the photos are associated with from there?
I've read through a lot of similar questions and blog posts, but nothing that seems to be quite exactly what I'm looking for. I'm currently attempting to adapt some of the information I've seen, but I'd really appreciate suggestions. Thanks for any help on this!
You can create Some model with foreign key to Event, and ManyToMany to your Images, as I understand your question.
At first upload necessary images to some Image model and than add them to Some model with some Event
I am using Django-photologue this app to display a photo gallery, which is quite nice. But what I want to do further is extract out the GPSInfo from each image and display it on the website (or more advanced, display it in google map). I am quite a newbie to Django, so don't know how to proceed.
The way I am doing the gallery is from Django Photologue Upload Photo Example.
If you can show me some details, like how to override the models, views, urls, that would be great. And if you can suggest another app to incorporate the google map API,I really appreciate. Thanks
Django-photologue's documentation has some examples showing how you can override the admin, views, urls and models. If you try these examples, they can give you some ideas for creating your own customisations.
I am not sure how to best use EXIF.py, as I have never used it myself!
I have a hard time understanding how photologue works exactly.
Is anybody aware of a Example Project Tutorial where I can display a gallery via Django-Photologue. Where Imagelinks are stored in a database?
Or how can I achieve that in Django?
Or what else is out there to create a decent Photo Display?
Thanks for the time!
The best way to get started with photologue is to start a new django project, and follow the installation instructions. Then, load up the django admin and start adding photos and creating galleries. You should be able to get a good understanding of Photologue that way.
Photologue is based around the concept of having gallerys of images with different photo sizes and effects. It's great if you want to show a gallery of images. If you are looking to intergrate images into your own apps, you might find ImageKit much more useful. I think it's based on Photologue, but instead of giving you automated photo galleries it provides hooks that you can use to do manage photos programmatically.
Here is an example project by the author of photologue:
https://github.com/jdriscoll/django-photologue/tree/master/example_project