Displaying images in comments/text fields

2013-12-13 Thread Vibhu Rishi
I want to show images in comments or text fields. I looked at markdown - and while it is quite cool for text formatting, it is quite archaic for image display. Also it does not do any resizing so some large images go out of bounds. So, can you guys guide me to some good template filter utility

Re: new user having trouble displaying images stored on local disk drive

2013-07-17 Thread evh
Thanks, but my real problem turned out to be a missing comma after the staticfiles_dirs entry. After adding it I was able to see files stored on my hard drive. On Wednesday, July 17, 2013 2:07:42 AM UTC-4, Lukáš Němec wrote: > > Hi, > > You are not the first to have trouble when serving

Re: new user having trouble displaying images stored on local disk drive

2013-07-17 Thread Lukas Nemec
Hi, You are not the first to have trouble when serving images from django's built-in server. It is not only images, but all staticfiles. I'd like to clarify your settings.py The directory you have put in STATICFILES_DIRS will be available to django as /static/ in your web app, but you need

trouble displaying images stored on disk drive

2013-07-16 Thread evh
Hello, I am having trouble displaying images stored on my local disk drive. Displaying images pulled from the web work fine, it is only the local ones that are not showing up. I am developing in a Windows environment and am not using a production server yet - everything is on a single

new user having trouble displaying images stored on local disk drive

2013-07-16 Thread evh
Working in a Windows environment without a production server - everything on one machine for ease of development (or so I thought). Can display images pulled from the web, but not any stored on local hard drive. Some of the relevant items in my settings.py looks like this: MEDIA_ROOT =

Re: displaying images

2011-11-23 Thread Adam Stein
On Wed, 2011-11-23 at 08:31 -0800, marjenni wrote: > Hi all, >Again, I am sure this is a very common problem for beginners, but > all help appreciated. > > > In a python function I am building a webpage, and trying to add > images to a table like this: > > html += " > " % imageName > >

Re: displaying images

2011-11-23 Thread Ivo Brodien
Hi, did you read and do the tutorials? If not do it and you will learn a lot. [1] In the tutorial you would learn that you would not want to write HTML code inside a view (function) but in a HTML template. You should also read about how to server static media.[2] [1]

displaying images

2011-11-23 Thread marjenni
Hi all, Again, I am sure this is a very common problem for beginners, but all help appreciated. In a python function I am building a webpage, and trying to add images to a table like this: html += " " % imageName return HttpResponse(html) Now the table is displayed fine, but images are

Re: Problem displaying images using a development server

2010-11-04 Thread Abhas
to "/home//assignment3/cs142/ multimedia/photos/xyz.jpg" here assignment3 is a directory at the same level as multimedia. In any case sorry if I wasted anybody's time. On Nov 4, 12:35 am, Abhas <abhasfor...@gmail.com> wrote: > Hi everyone, > > I am having trouble displayi

Problem displaying images using a development server

2010-11-04 Thread Abhas
Hi everyone, I am having trouble displaying images stored on my laptop using Django templates.To highlight the problem I am using a view called test which renders a template called test.html. code for them is as follows: def test(request): return render_to_response('test.html',context_instance

Re: Displaying images

2010-08-20 Thread Ivan
Do you write your own context processors? If yes, you need to add 'django.core.context_processors.media' in TEMPLATE_CONTEXT_PROCESSORS manually. TEMPLATE_CONTEXT_PROCESSORS = ( 'django.core.context_processors.media', ) Cheers, Ivan On Fri, Aug 20, 2010 at 4:07 AM, Greg Pelly

Re: Displaying images

2010-08-19 Thread Greg Pelly
Are your settings properly set up? Can you confirm that you are able to print settings.MEDIA_URL in your view? MEDIA_URL defaults to the empty string, so that seems like the problem. Then, pass in the request context as I described previously. >From

Re: Displaying images

2010-08-19 Thread Bradley Hintze
Greg, that didn't do it :( Thanks though :) On Thu, Aug 19, 2010 at 1:43 PM, Greg Pelly wrote: > try this: > def math_form(request): >   return render_to_response('form.html', > {}, context_instance=RequestContext(request)) > > greg > On Thu, Aug 19, 2010 at 10:35 AM, Bradley

Re: Displaying images

2010-08-19 Thread Greg Pelly
try this: def math_form(request): return render_to_response('form.html', {}, context_instance=RequestContext(request)) greg On Thu, Aug 19, 2010 at 10:35 AM, Bradley Hintze < bradle...@aggiemail.usu.edu> wrote: > I am sorry. I am using render to response. > > #view.py > > def

Re: Displaying images

2010-08-19 Thread Bradley Hintze
I am sorry. I am using render to response. #view.py def math_form(request): return render_to_response('form.html') #base.html {% block title %}{% endblock %} {% block header %}{% endblock %} Please enter two numbers to add them. {% block content %}{% endblock %}

Re: Displaying images

2010-08-19 Thread Javier Guerra Giraldez
On Thu, Aug 19, 2010 at 12:03 PM, Bradley Hintze wrote: > So do I create 'my_data_dictionary'? and whats in there? are you using render_to_response()? can't comment on your code if you don't show it -- Javier -- You received this message because you are

Re: Displaying images

2010-08-19 Thread Bradley Hintze
So do I create 'my_data_dictionary'? and whats in there? On Thu, Aug 19, 2010 at 12:54 PM, Steve Holden wrote: > On 8/19/2010 12:29 PM, Bradley Hintze wrote: >> I am sorry. How does this 'Context' object(?) relate to displaying an >> image? Your last though me for a loop. >>

Re: Displaying images

2010-08-19 Thread Steve Holden
On 8/19/2010 12:29 PM, Bradley Hintze wrote: > I am sorry. How does this 'Context' object(?) relate to displaying an > image? Your last though me for a loop. > The context is what provide the variables that become available for use inside curly braces in the template. The render_to_response()

Re: Displaying images

2010-08-19 Thread Bradley Hintze
I am sorry. How does this 'Context' object(?) relate to displaying an image? Your last though me for a loop. On Thu, Aug 19, 2010 at 12:11 PM, Javier Guerra Giraldez wrote: > On Thu, Aug 19, 2010 at 10:49 AM, Bradley Hintze > wrote: >> >> ... >>

Re: Displaying images

2010-08-19 Thread Javier Guerra Giraldez
On Thu, Aug 19, 2010 at 10:49 AM, Bradley Hintze wrote: > > ... > > so it looks as if you're right, the template isn't gettng the > MEDIA_URL variable. > I thought this was taken care of in setttings.py (see previous > messages). Does something need to be done in

Re: Displaying images

2010-08-19 Thread Bradley Hintze
Ok, I appreciate your patiencce! here what the generated HTML loos like ... ... so it looks as if you're right, the template isn't gettng the MEDIA_URL variable. I thought this was taken care of in setttings.py (see previous messages). Does something need to be done in url.py? On Thu, Aug 19,

Re: Displaying images

2010-08-19 Thread Javier Guerra Giraldez
On Thu, Aug 19, 2010 at 10:28 AM, Bradley Hintze wrote: > Javier > > Unfortunately, changing the quotes as you explained did not work. likely the template isn't gettng the MEDIA_URL variable. if you show the generated HTML it would be easier to help -- Javier --

Re: Displaying images

2010-08-19 Thread Bradley Hintze
Javier Unfortunately, changing the quotes as you explained did not work. Bradley On Thu, Aug 19, 2010 at 11:15 AM, Javier Guerra Giraldez wrote: > On Thu, Aug 19, 2010 at 10:00 AM, Bradley Hintze > wrote: >> > > you got the quotes wrong: > >

Re: Displaying images

2010-08-19 Thread Bradley Hintze
By broken I mean i get the little square 'boren image' symbol (I am not sure the official name, sorry I can't be more specific). What do you mean by 'MEDIA_URL isn't being included in the request context.' do I deed to do something in url.py and/or views.py for my media files? On Thu, Aug 19,

Re: Displaying images

2010-08-19 Thread Javier Guerra Giraldez
On Thu, Aug 19, 2010 at 10:00 AM, Bradley Hintze wrote: > you got the quotes wrong: -- Javier -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Displaying images

2010-08-19 Thread Steve Holden
On 8/19/2010 11:00 AM, Bradley Hintze wrote: > Hi all, > > I am trying to display an image but cant get it up. I tried google > searches and tried what was suggested with no luck. i am a newbie > running the local server. Here is my code: > > #settings.py > ... > MEDIA_ROOT =

Displaying images

2010-08-19 Thread Bradley Hintze
Hi all, I am trying to display an image but cant get it up. I tried google searches and tried what was suggested with no luck. i am a newbie running the local server. Here is my code: #settings.py ... MEDIA_ROOT = '/Users/bradleyhintze/djcode/my_try/media/' MEDIA_URL = 'media/' ... base.html

Re: displaying images

2007-05-06 Thread JP
Please read this tutorial, it explains what you should do to serve files statically: http://www.djangoproject.com/documentation/0.96/static_files/ On May 5, 7:20 pm, checco <[EMAIL PROTECTED]> wrote: > Hi, > > I have the following settings in settings.py: > MEDIA_ROOT =

displaying images

2007-05-05 Thread checco
Hi, I have the following settings in settings.py: MEDIA_ROOT = 'C:/my_project/static/' MEDIA_URL = 'http://127.0.0.1:8000/static/' I'd like to display some pictures which are in the folder C:/ my_project/static/offers ("static" is the folders that holds all the media, while "offers" holds only