image problem

2012-09-17 Thread Harjot Mann
anyone  tel me how to display images on html links using django..
what path should be given in settings.py file

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/BqnSFJG4qSkJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Uploading JPEG image problem

2008-09-12 Thread Rodney Topor

Thanks TiNo and Gremmie.
Rodney

On Sep 11, 12:21 pm, Rodney Topor <[EMAIL PROTECTED]> wrote:
> I've installed the Python Imaging Library (PIL) so that I could upload
> and display images (for the first time).  Everything works fine when I
> upload PNG or GIF or TIFF files (from my Mac), but whenever I try to
> upload any JPEG file, form validation gives the following error:
>
> Upload a valid image. The file you uploaded was either not an image or
> a corrupted image.
>
> Is this a problem with PIL, or do I need to do something more complex
> in my view than:
>
> form = MessageForm(request.POST, request.FILES)
> if form.is_valid():
>     form.save()
>
> And by the way, what is the recommended way to resize images to a
> desired maximum size after uploading?  E.g., using an appropriate PIL
> function?
>
> Thanks,
>
> Rodney
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Uploading JPEG image problem

2008-09-12 Thread Gremmie

On Sep 10, 9:21 pm, Rodney Topor <[EMAIL PROTECTED]> wrote:
> And by the way, what is the recommended way to resize images to a
> desired maximum size after uploading?  E.g., using an appropriate PIL
> function?
>

I can't directly answer that, but you may want to check out the
Photologue application. It makes working with images in django a
breeze. You can define a set of sizes and Photologue will
automatically resize your images if you request a picture in one of
your defined set of sizes.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Uploading JPEG image problem

2008-09-11 Thread TiNo
In your PIL installation, you need to tell PIL where to find the JPEG
decoder (which you probably need to install first)
Read http://mail.python.org/pipermail/image-sig/2002-August/001947.html for
example
or google for "mac os x jpeg pil"

On Thu, Sep 11, 2008 at 4:21 AM, Rodney Topor <[EMAIL PROTECTED]> wrote:

>
> I've installed the Python Imaging Library (PIL) so that I could upload
> and display images (for the first time).  Everything works fine when I
> upload PNG or GIF or TIFF files (from my Mac), but whenever I try to
> upload any JPEG file, form validation gives the following error:
>
> Upload a valid image. The file you uploaded was either not an image or
> a corrupted image.
>
> Is this a problem with PIL, or do I need to do something more complex
> in my view than:
>
> form = MessageForm(request.POST, request.FILES)
> if form.is_valid():
>form.save()
>
> And by the way, what is the recommended way to resize images to a
> desired maximum size after uploading?  E.g., using an appropriate PIL
> function?
>
> Thanks,
>
> Rodney
>
>
>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Uploading JPEG image problem

2008-09-10 Thread Rodney Topor

I've installed the Python Imaging Library (PIL) so that I could upload
and display images (for the first time).  Everything works fine when I
upload PNG or GIF or TIFF files (from my Mac), but whenever I try to
upload any JPEG file, form validation gives the following error:

Upload a valid image. The file you uploaded was either not an image or
a corrupted image.

Is this a problem with PIL, or do I need to do something more complex
in my view than:

form = MessageForm(request.POST, request.FILES)
if form.is_valid():
form.save()

And by the way, what is the recommended way to resize images to a
desired maximum size after uploading?  E.g., using an appropriate PIL
function?

Thanks,

Rodney




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: template image problem

2007-08-30 Thread Tim Chase

> Static content is served by http server not django.
> http://www.djangoproject.com/documentation/static_files/

For development purposes, in my urls.py after defining all my 
"business" urls, I have

from sys import argv
if 'runserver' in argv:
 urlpatterns += patterns('',
 (r'^media/(?P.*)$',
 'django.views.static.serve',
 {'document_root': settings.MEDIA_ROOT}
 ),
 # a couple other debugging tools here
 )

which allows me to serve media in development, but in my 
production environment (mod_python+apache), it doesn't offer 
those URL patterns because they're handled by apache alone.

-tim





--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: template image problem

2007-08-30 Thread daev

Static content is served by http server not django.
http://www.djangoproject.com/documentation/static_files/


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



template image problem

2007-08-30 Thread jorgehugoma
hi,

for some reason django won't load images that have a relative path on my 
template. How could i solve this?

thanks,
 
Jorge Hugo Murillo





   

Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for 
today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow  
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: image problem [help adrian]

2006-01-19 Thread Kenneth Gonsalves

On Thursday 19 Jan 2006 9:32 pm, [EMAIL PROTECTED] wrote:
> 1- I write this in my page.py:  full_image =
> meta.ImageField(upload_to ="/media/images/", null = True, blank =
> True )

why are you putting the absolute path in upload_to? It should be 
upload_to="images/" and not "/media/images/"
-- 
regards
kg

http://www.livejournal.com/users/lawgon
tally ho! http://avsap.org.in
ಇಂಡ್ಲಿನಕ್ಸ வாழ்க!


image problem [help adrian]

2006-01-19 Thread mary . adel

Dear ALL
I still have a problem with the picture feild here what i have done
1- I write this in my page.py:  full_image = meta.ImageField(upload_to
="/media/images/", null = True, blank = True )
2-i opened the admin page and load the pictuer i need
i found that it creat a folder and it's path is /media/images/[my
picture]
so why the path is not realtive to the document root

Please Adrian help me







Mary Adel
Software Developper
 
ITrize-Egypt 13 Naguib Hashad medan elhegaz heliopolis
email: [EMAIL PROTECTED]
Office: +202 - 6236612 EXT. 102
Mobile: +2012 5241719