Include pictures in content

43 views
Skip to first unread message

ard...@dunnsmail.co.uk

unread,
Apr 6, 2017, 6:59:29 AM4/6/17
to Django users
I am new to using django which has been used to create our church website. I want to incorporate pictures into content on a post. The 'insert image' icon on the content toolbar asks for an 'image web link'. The pictures I want to include (as pictures, not as links) are on the web site in the default home/assets/images folder. Can anyone tell me the format of the link to these images stored on the site?
Thank You, Alan Dunn

ludovic coues

unread,
Apr 6, 2017, 9:42:53 AM4/6/17
to django...@googlegroups.com
You could try http://your.web.site/assets/images/image_name.jpg. Your
settings.py and urls.py files could help to give a better answer.

If home/assets/images contain images uploaded by your user, the doc
[1] explain how to make them available at an url on your website.


[1] https://docs.djangoproject.com/en/1.11/howto/static-files/#serving-files-uploaded-by-a-user-during-development
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/519d802c-6dd9-4633-a9b2-7dd13db3e281%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--

Cordialement, Ludovic Coues
+33 6 14 87 43 42

Ard...@dunnsmail.co.uk

unread,
Apr 6, 2017, 2:50:55 PM4/6/17
to Django users
Thanks ludovic,
I haven't had any success yet, but your answer has led me deeper into the django maze!

john

unread,
Apr 6, 2017, 3:05:56 PM4/6/17
to django...@googlegroups.com

I normally don't jump into discussions - so I apologize in advance!

Try reading this link:

https://docs.djangoproject.com/en/1.10/howto/static-files/

Johnf

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

Steve Watts

unread,
Apr 11, 2017, 3:01:24 PM4/11/17
to Django users
I also don't normally comment, but in your case, you might also try prefacing assets with media or static - i.e. http://yourwebsite.com/media/assets/... or http://yourwebsite.com/static/assets/... . That said, it's hard to know without seeing your settings.py file from your project. As it is, the question is more about how someone implemented the website, not about an implementation issue.

It may also be telling you to store the link somewhere else on the web for reference by your website.

Best of luck, though!
Reply all
Reply to author
Forward
0 new messages