How to insert multiple images in the Django blog app? - django

What I want is similar to the stack overflow posts, I can add images in between the text, just simply copy the image and paste it in my blog while editing. is it possible?
I.ve seen some posts that can add a single image as post cover or add the designated number of images like 'must insert 3 images in a post'. that's not what I want.

Have you heard of the Django content management system (CMS) Wagtail? It really sounds like what you want is a CMS, and Wagtail is, as far as I know, the most popular and fleshed out one for Django. You can read in the Wagtail docs about inserting images in a page (tailored for editors) or using images in templates (tailored for developers).
Do keep in mind though that Wagtail is a whole CMS. If you were aiming for more limited functionality, that doesn't come with a bundle of other CMS niceties, you might want to look elsewhere.

Related

Django model React

I'm trying some Django + React stuff and I'm a bit confused with the particular role of Django model in this scheme.
As I can understand Django model provide smooth way to create some typical forms by users of the site (please correct me). And I can't feel the edge of what should be hardcoded and what I need to store in model.
In case of React (I'm trying to connect react with django through api via djangorestframework) should I create a model for Header? And store bg image with it and my slogans. I feel it's should be purely in frontend. But next section with 3 typical screens (they will be listed horizontally and swap each other). They are just copy of each other with different data (title, bg, fg, text, link), for me it seems closer to model usage. But model initially empty and if I want to get this data from model I firstly need to somehow store this data to model.
So in general my question is what the right cases for using Django models and when it's no needed. And if it possible with applying to my example to better understanding for me )
ofc I searched this info widely but so far can't create clear understanding by myself.
Thanks )
You might actually be in search of a headless CMS.
To combine React and Django and still use a CMS to allow administrating text blocks and images, Django Wagtail's StreamField is a good choice.
https://docs.wagtail.io/en/v2.0/topics/streamfield.html
See for example our company's homepage: https://www.blu-beyond.com. It runs on Django Wagtail, having JS animated text blocks that are administered in the CMS (just jQuery and other JS libs, no React, in this case).
Django Wagtail offers a JSON API, as well, that can be used in React:
https://docs.wagtail.io/en/v2.8/advanced_topics/api/v2/usage.html#fetching-content
It also offers a GraphQL API.

Multiple images not showing in frontend virtuemart2?

I am using Joomla 2.5.8 and virtue mart 2.0.14,I uploaded multiple images to a product in virtue mart but it displays only single images instead of displaying multiple images.How can i solve this problem.
I don't really understand your question but once something similar happened to me - I uploaded more photos of a product but when I looked at its detail on the front-end, there was just one image. The silly reason for it was that I was looking at another product than I added additional images for.
However, I would strongly recommend you looking at the Joomla Extensions and download a plugin for it.
http://extensions.joomla.org/extensions/extension-specific/virtuemart-extensions

Django image insertion in Admin

I am building a small side project - a simple news site. I want to use the Django Admin for uploading articles and allow access to non-coders so as they can publish articles a la Wordpress or such. I have added some functionality to the admin, first trying out TinyMCE and Dojo rich text editors. However, these do not come with the ability to insert an image into an article from a file (just urls).
I really only want some light text formatting in the text area plus the ability to upload and insert images from the users's harddrive directly into the article. Is there a simple way to achieve this?
If you are already using django-tinymce, you can integrate django-filebrowser with it. See django-tinymce's documentation.
There is also a commercial choice which looks good, but I have never tested it.

News application for django

Is there a good news application for django framework? I've searched it and found several variants. I'm interested if you used one of them and can recommend me which one to use. I need some features to easily read(modify user side), edit with WYSIWYG(at admin area), and export news to an rss and atom feeds.
Well as you already may know there are tons of django blog apps, but if you want a recommendation that may fit your needs, zinnia should be worth a try...

Django Photologue Tutorial

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