Some weird. In production, imagen is redirected to images

2008-04-21 Thread mamcxyz
Hi, I have http://www.paradondevamos.com/imagen/ (imagen is the spanish name of image) and always get converted to /images so I get a 404 for all the urls. I have this in my urls: (r'^imagen/', include('shared.multimedia.urls-image')), I don't have rewrite rules in apache, and not have

Re: How to use ImageField to save images to dynamic path

2008-04-21 Thread Rishabh Manocha
from request.POST in the view, and changing request.FILES there itself. Best, R On Sun, Apr 20, 2008 at 6:45 PM, PENPEN <[EMAIL PROTECTED]> wrote: > > I defined such a model: > > class Thing(models.Model): > photo = models.ImageField( > upload_to='images/

How to use ImageField to save images to dynamic path

2008-04-20 Thread PENPEN
I defined such a model: class Thing(models.Model): photo = models.ImageField( upload_to='images/', blank=True, null=True) Here is the form for this model: class ThingForm(ModelForm): class Meta: model = Thing Now it could handle the image upload request and save images

Re: How to display images in Admin change page?

2008-04-17 Thread Malcolm Tredinnick
On Thu, 2008-04-17 at 08:06 -0700, Legioneer wrote: [...] > I need to display > pictures on the latter page. According to documentation one can define > what to display there in the 'fields' attribute inside Admin inner > class. But in this attribute only model fields are allowed to be not >

Re: How to display images in Admin change page?

2008-04-17 Thread Legioneer
> class Person(models.Model): > > name = models.CharField(max_length=512) > > > class Image(models.Model): > > image = models.ImageField(upload_to='/images') > > active = models.BooleanField(default=True) > > person = models.ForeignKey(Person) > > &

Re: How to display images in Admin change page?

2008-04-17 Thread Malcolm Tredinnick
CharField(max_length=512) > > class Image(models.Model): > image = models.ImageField(upload_to='/images') > active = models.BooleanField(default=True) > person = models.ForeignKey(Person) > > > How is it possible to display pictures of a person (with checkbox >

How to display images in Admin change page?

2008-04-17 Thread Legioneer
='/images') active = models.BooleanField(default=True) person = models.ForeignKey(Person) How is it possible to display pictures of a person (with checkbox corresponding to 'active' field) in a person change page instead of filenames when using django admin? Is there some 'render' method

Re: Images

2008-04-16 Thread [EMAIL PROTECTED]
I managed to get this working properly. Thanks for all the help. On Apr 16, 3:00 am, "Rishabh Manocha" <[EMAIL PROTECTED]> wrote: > Did you take a look > athttp://www.djangoproject.com/documentation/static_files/#how-to-do-it. > If you are using the dev server, this is the way to do it. > >

Re: Images and Stylesheets

2008-04-16 Thread Reisswolf
>> The only relevant thing to note based on your earlier post would be that '/media/' is by default used by the ADMIN_MEDIA_PREFIX setting. Perhaps the 'media' URL is experiencing some stompage... << Hi Doug, For pointing out the above pitfall, I would personally like to pay for your plane

Re: Images

2008-04-16 Thread Rishabh Manocha
Did you take a look at http://www.djangoproject.com/documentation/static_files/#how-to-do-it. If you are using the dev server, this is the way to do it. Hence, you should not be using anything like (http://127.0.0.1:8000/detail/...) in your view. R On Wed, Apr 16, 2008 at 4:37 AM, [EMAIL

Re: Images

2008-04-15 Thread [EMAIL PROTECTED]
I will post my code up here, it is just a small classroom project that we are working on so I am not super concerned about reliability or speed. http://dpaste.com/45051/ Hopefully it is just something that I am missing or am being a complete noobstick about. Thanks for all of your help it is

Re: Images and Stylesheets

2008-04-15 Thread Doug Van Horn
Your previous description sounds pretty close. Check your URLs in your HTML (mentioned by Karen Tracey in this thread). As a quick reference, here are the relevant entries in my settings.py: import os ROOT_DIR = os.path.normpath(os.path.dirname(__file__)) MEDIA_ROOT = os.path.join(ROOT_DIR,

Re: Images

2008-04-15 Thread Erik Vorhes
In production environments, you need to use something like Apache or Lighttpd (sp?) to serve media--it's not something you should be doing directly through Django. Check the URL for your image and compare it to MEDIA_URL in your settings.py file (plus anything you're adding through

Re: Images

2008-04-15 Thread [EMAIL PROTECTED]
The error I get is the white box with the red X which means it can't find the image. On Apr 15, 1:39 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > On Apr 15, 12:06 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > I have searched high and low to make it possible for me to display an > >

Re: Images

2008-04-15 Thread Michael Wieher
pass the list of paths to the template have the template load the images using these absolute urls you will also have to configure apache's httpd.conf file such that it recognizes this media-url google "static media django" and you'll find the right page for this On Tue, Apr 15, 2008 a

Re: Images

2008-04-15 Thread Rajesh Dhawan
On Apr 15, 12:06 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I have searched high and low to make it possible for me to display an > image via Django in an html template and it fail bombs so hard. Can you put that in developer-friendly terms? :) - What error do you get? Is here an

Images

2008-04-15 Thread [EMAIL PROTECTED]
I have searched high and low to make it possible for me to display an image via Django in an html template and it fail bombs so hard. Can someone please point me in some direction that can shed some light on this, a fellow classmate of mine decided to just hard code it but that is a bad idea if

Re: Images and Stylesheets

2008-04-15 Thread Duke
This is strange its work for me U config the URL as i suggested and referce the image as below in the tab This should definitly work it even work for javascript. Thank Duke --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: Images and Stylesheets

2008-04-15 Thread Karen Tracey
On Tue, Apr 15, 2008 at 6:34 AM, Reisswolf <[EMAIL PROTECTED]> wrote: > > I have followed Doug Van Horn's detailed explanation very closely. I > have also read the Django documentation page on this particular > topic. But for some reason, I still cannot get the thing to work. > > Here is my

Re: Images and Stylesheets

2008-04-15 Thread Reisswolf
Hi, Sorry to bother everyone again, but the suggestion above is not working either. Actually, I fail to see why the ROOT_PATH suggestion would work when hard-coding the path document_root is not working. But that could just as well be due to my ignorance. I have tried the ROOT_PATH

Re: Images and Stylesheets

2008-04-15 Thread Duke
change the URL config as from django.conf.urls.defaults import * import os ROOT_PATH = os.path.dirname(__file__) urlpatterns = patterns('', # Example: (r'^hellodojo/', 'hello.views.hellodojo'), (r'^site_media/(?P.*)$', 'django.views.static.serve',

Re: Images and Stylesheets

2008-04-15 Thread Reisswolf
I have followed Doug Van Horn's detailed explanation very closely. I have also read the Django documentation page on this particular topic. But for some reason, I still cannot get the thing to work. Here is my situation: In my /Programming/Python/Django directory I have created a project

Re: Images and Stylesheets

2008-04-12 Thread andy baxter
quite a lot > for this old dog, but I'd like to take a crack a writing my own web > site using Django. I have two problems, and I think they are > related. The first is how to get images in my site and the next is > how to use css. > > I wrote Jacob about images and he was ki

Re: Images and Stylesheets

2008-04-11 Thread Doug Van Horn
Here's my rewording of your question: "How do I serve static content?" Websites need to serve up your HTML, CSS, JavaScript, and images. In Django, your views are serving up your HTML. What you need to do is serve up the rest of that stuff. The first way to serve static content

Re: Images and Stylesheets

2008-04-11 Thread Tim Chase
gt; to take a crack a writing my own web site using Django. welcome aboard! > I have two problems, and I think they are related. They are indeed > to documentation on how to get the web server to "serve" the > images. I hate to put it this bluntly, but I don't know what &g

Re: Images and Stylesheets

2008-04-11 Thread Justin Lilly
You're problems are one and the same. It seems you're runserver isn't configured to serve images. The bit of code you're looking for is: if settings.DEBUG: urlpatterns += patterns('', (r'^site_media/(?P.*)$', 'django.views.static.serve', {'document_root': '/path/to/media

Images and Stylesheets

2008-04-11 Thread Greg Lindstrom
e a crack a writing my own web site using Django. I have two problems, and I think they are related. The first is how to get images in my site and the next is how to use css. I wrote Jacob about images and he was kind enough to point me to documentation on how to get the web server to &quo

Re: offline application for searching entire disks of images

2008-02-22 Thread stoKes
On Feb 22, 12:03 pm, stoKes <[EMAIL PROTECTED]> wrote: > offline application searches an entire disk for images, this is going > to be out of the scope and control of media_url. i thought about using > static serve, however, i think that will conflict with the other > existing

offline application for searching entire disks of images

2008-02-22 Thread stoKes
offline application searches an entire disk for images, this is going to be out of the scope and control of media_url. i thought about using static serve, however, i think that will conflict with the other existing views. anyone know of a way to make this work? thanks adam

Re: Links to images in Blog posts

2008-02-13 Thread Eric Abrahamsen
> Do you have any idea if it is possible to modifyupload_toin a way   > that it uses the ID of the the object? That one gets asked a lot: http://groups.google.com/group/django-users/browse_thread/thread/7e193c1532920a6f# eric --~--~-~--~~~---~--~~ You received

Re: Links to images in Blog posts

2008-02-13 Thread Florian Lindner
Am 13.02.2008 um 15:00 schrieb Michael Newman: > > Hi Florian; > > You might want to look into a separate object for your images and add > them as either a manytomanyfield in you story object or have them > edited inline as foreign key objects. Look at the relation

Re: Links to images in Blog posts

2008-02-13 Thread Michael Newman
Hi Florian; You might want to look into a separate object for your images and add them as either a manytomanyfield in you story object or have them edited inline as foreign key objects. Look at the relationships here: http://www.djangoproject.com/documentation/model-api/#relationships . You

Links to images in Blog posts

2008-02-13 Thread Florian Lindner
files in an post (which is represented by a Model). Images can be displayed either seperately from the text or can be embedded in the text. If embedded in the text [1] the user does not know the real URL when uploading an image (because he does not necessarily know the value of MEDIA_ROOT) he

Images in Blog posts

2008-02-11 Thread Florian Lindner
Hello, I have some problems about my blog which I would like to hear your opinion about. A user should have the possibility to upload image files in an post (which is represented by a Model). Images can be displayed either seperately from the text or can be embedded in the text

Re: How to attach multiple images to a blog post?

2008-02-01 Thread [EMAIL PROTECTED]
into some problems. I > would like to attach multiple images to a post. Here's my models: > > class Entry(models.Model): > title = models.CharField(max_length=200) > date = models.DateTimeField(auto_now=True) > body = models.TextField() > > class Photo(models

How to attach multiple images to a blog post?

2008-01-31 Thread [EMAIL PROTECTED]
Hello, I'm trying to write simple blog tool but I ran into some problems. I would like to attach multiple images to a post. Here's my models: class Entry(models.Model): title = models.CharField(max_length=200) date = models.DateTimeField(auto_now=True) body = models.TextField

Re: using FileField.delete_file to remove unused images

2007-12-11 Thread Marty Alchin
There are several things you need to know, so I'll lay them out. 1) You can get any Field instance from a class by using the model._meta.get_field() method. Instead of your list comprehension, just use the following line: picfield = p._meta.get_field('picture') 2) If you read the comments in

Re: using FileField.delete_file to remove unused images

2007-12-11 Thread l5x
I didn't use delete_file, but if you can't solve this you can write your own code for that using signals (pre_delete or post_delete). More: http://code.djangoproject.com/wiki/Signals Anyway I'm also curious how to do that without signals. --~--~-~--~~~---~--~~ You

using FileField.delete_file to remove unused images

2007-12-11 Thread ER Yost
I am working on a project with the following: class Person(models.Model): # ... picture = models.ImageField(...) I'd like to give each Person the ability to delete images, and I'd like to remove deleted pictures from the filesystem once a person has deleted them. From what I can tell

Uploading images

2007-11-22 Thread [EMAIL PROTECTED]
ot;), max_length=4000, blank=False) I'm developing a service for add some images from some external applications (for ex: a java application...). I made a view that works like a webService that recieve from a post the image data and write it on my django application.. Now, my view is : def add_ima

Re: static images with built-in django server

2007-11-05 Thread maco
Try this one: http://www.djangoproject.com/documentation/db-api/#get-foo-filename To retrieve a image or file absolute url simply use: {{ object.get_myImageObject_url }} Absolute URL is compiled according to settings.py definition of MEDIA_URL and therefore changes automatically at deployment.

Re: Problem uploading several files (images) using a single form

2007-11-05 Thread Divan Roulant
. Then (I think) I > need to loop through the list of FILES and bind the data to a form and > save it. However, my code below doesn't work. No images are saved and > all I get is the data from the other fields of the last picture, saved > the number of times the loop

Problem uploading several files (images) using a single form

2007-11-04 Thread Divan Roulant
Hello, I need to upload several pictures from a single form. Then (I think) I need to loop through the list of FILES and bind the data to a form and save it. However, my code below doesn't work. No images are saved and all I get is the data from the other fields of the last picture, saved

Re: static images with built-in django server

2007-10-26 Thread girzel
Me too, I can't get this to work and it's driving me crazy. My main problem seems to be that Django is looking inside the Django site package within my Python framework for the media (when I try to load an image directly, for instance, it tells me "Page not found: /Library/

Re: unable to display images

2007-10-23 Thread Rafal bluszcz Zawadzki
On Tuesday 23 October 2007 04:55:26 Anurag wrote: > Sorry for this repeat post - but i am getting quite desperate and be > very thankful for some help... > > I am unable to display images directly through Apache - with the > following configuration.Can someone please help. Much

unable to display images

2007-10-22 Thread Anurag
Sorry for this repeat post - but i am getting quite desperate and be very thankful for some help... I am unable to display images directly through Apache - with the following configuration.Can someone please help. Much thanks! the line in my base html reads the following my media_url

Apache and images

2007-10-22 Thread Anurag
I am unable to display images directly through Apache - with the following configuration.Can someone please help. Much thanks! the line in my base html reads the following my media_url is set to /static/ and the htpd.conf reads the following SetHandler python-program

Re: static images with built-in django server

2007-10-06 Thread staff-gmail
Tim Chase wrote: >> Thanks. Yes, using relative paths is the right idea - it's a shame that >> the base url's have to be hard coded in the templates. I understand >> from a web efficiency standpoint of Django not handling static content >> but from an application development standpoint this

Re: static images with built-in django server

2007-10-06 Thread Tim Chase
> Thanks. Yes, using relative paths is the right idea - it's a shame that > the base url's have to be hard coded in the templates. I understand > from a web efficiency standpoint of Django not handling static content > but from an application development standpoint this is a real complexity

Re: static images with built-in django server

2007-10-06 Thread staff-gmail
cjl wrote: > John: > > I've added a section at the end of the first chapter of my tutorial > that describes how to serve static content with the Django development > server, which seems to be a frequently asked question. See: > > http://www.instantdjango.com/chapter1.html > > Check it out, and

Re: static images with built-in django server

2007-10-06 Thread cjl
John: I've added a section at the end of the first chapter of my tutorial that describes how to serve static content with the Django development server, which seems to be a frequently asked question. See: http://www.instantdjango.com/chapter1.html Check it out, and let me know if you have any

Re: static images with built-in django server

2007-10-06 Thread AndrewK
http://www.djangoproject.com/documentation/static_files/ You need to add information about your media directory to the url.py On Oct 5, 5:59 pm, staff-gmail <[EMAIL PROTECTED]> wrote: > I have read the docs on static files but cannot figure out how to > specify an image when using the built-in

static images with built-in django server

2007-10-05 Thread staff-gmail
I have read the docs on static files but cannot figure out how to specify an image when using the built-in web server. If I have my media location: /myproject/myapp/media/picture1.png if I have a template file /myproject/myapp/templates/mypage.html if I try : I get nothing. In fact I've

Re: Using an existing database of astronomic images

2007-10-02 Thread Russell Keith-Magee
On 10/2/07, Thejaswi Puthraya <[EMAIL PROTECTED]> wrote: > > [snipped] > > First and before the feeding of the database, after creating my > > database in the mysql prompt by inserting SQL code could django > > analyse my clean database and create class for each table? > > with the right field

Re: Using an existing database of astronomic images

2007-10-02 Thread Thejaswi Puthraya
[snipped] > First and before the feeding of the database, after creating my > database in the mysql prompt by inserting SQL code could django > analyse my clean database and create class for each table? > with the right field type? Try using the inspectdb command. Refer to

Using an existing database of astronomic images

2007-10-02 Thread Greg_IAP
HI, yesterday i send a message which asks of using an existing database with Django. Thanks to the guy who has answered me, but i have to explain a little bit more my problem. I 'm in charge of developping an astronomic images and metadata database for scientists in mysql, composed by 9 tables

Re: help serving static files (css, images, pdf, js)

2007-08-03 Thread koenb
There already is a ticket: #4783. Just needs volunteers to do the writing... Koen On 3 aug, 10:41, james_027 <[EMAIL PROTECTED]> wrote: > hi, > > On Aug 3, 4:32 pm, koenb <[EMAIL PROTECTED]> wrote: > > > My guess is you are interfering with your admin_media (look at the > > admin_media_prefix

Re: help serving static files (css, images, pdf, js)

2007-08-03 Thread james_027
hi Kai, > If you do not use it, no. > If I use it, how does it affect then? thanks james --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: help serving static files (css, images, pdf, js)

2007-08-03 Thread james_027
hi, On Aug 3, 4:32 pm, koenb <[EMAIL PROTECTED]> wrote: > My guess is you are interfering with your admin_media (look at the > admin_media_prefix setting). > Try using something like r'^sitemedia/... and src="/sitemedia/...". > Thanks koen, that did it. I think it could be nice if it was

Re: help serving static files (css, images, pdf, js)

2007-08-03 Thread koenb
My guess is you are interfering with your admin_media (look at the admin_media_prefix setting). Try using something like r'^sitemedia/... and src="/sitemedia/...". Koen On 3 aug, 09:16, james_027 <[EMAIL PROTECTED]> wrote: > hi, > > I already did the > > (r'^media/(?P.*)$',

Re: help serving static files (css, images, pdf, js)

2007-08-03 Thread Kai Kuehne
Hi, On 8/3/07, james_027 <[EMAIL PROTECTED]> wrote: > does it affect the django.views.static.serve? If you do not use it, no. Greetings Kai --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: help serving static files (css, images, pdf, js)

2007-08-03 Thread james_027
hi, are this settings used when running under development mode? MEDIA_ROOT MEDIA_URL does it affect the django.views.static.serve? thanks james --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

help serving static files (css, images, pdf, js)

2007-08-03 Thread james_027
hi, I already did the (r'^media/(?P.*)$', 'django.views.static.serve', {'document_root':'d:/private/james/documents/django/ksk/media'}), in my urls.py and in my template i have something like this but why is it the image still don't appear? Thanks james

Re: A convenient way to include images in a blog entry

2007-07-25 Thread Kai Kuehne
Hi, On 7/26/07, Patrick Anderson <[EMAIL PROTECTED]> wrote: > Make the m2m relation optional using (null = True, blank = True) in your > model This is the case. Greetings Kai --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: A convenient way to include images in a blog entry

2007-07-25 Thread Patrick Anderson
On Thu, 26 Jul 2007 00:11:59 +0200, Kai Kuehne wrote: > Unfortunately I cannot keep the relation between Entry and Image because > I get an weird error (see #4633) if the m2m field is None. > > So.. is there another way to just show a list of models on an edit page > of another model without

Re: A convenient way to include images in a blog entry

2007-07-25 Thread Kai Kuehne
Unfortunately I cannot keep the relation between Entry and Image because I get an weird error (see #4633) if the m2m field is None. So.. is there another way to just show a list of models on an edit page of another model without having to do a relation between them? Thanks in advance. Kai

Re: A convenient way to include images in a blog entry

2007-07-25 Thread Kai Kuehne
Hi Justin, On 7/25/07, Justin Lilly <[EMAIL PROTECTED]> wrote: > I'm with Baxter. Tag your images and then just include an image of tag X > along with the story with a similar tag. > > Not sure how this might interact with specific images going with specific > articl

Re: A convenient way to include images in a blog entry

2007-07-25 Thread Justin Lilly
I'm with Baxter. Tag your images and then just include an image of tag X along with the story with a similar tag. Not sure how this might interact with specific images going with specific articles, but its not a bad generalized solution, I think. On 7/25/07, [EMAIL PROTECTED] <[EMAIL PROTEC

Re: A convenient way to include images in a blog entry

2007-07-25 Thread [EMAIL PROTECTED]
I said to hell with it and put all the related images in a slideshow alongside the entry. On Jul 25, 11:05 am, "Kai Kuehne" <[EMAIL PROTECTED]> wrote: > Hi Patrick, > > On 7/25/07, Patrick <[EMAIL PROTECTED]> wrote: > > > What I did in one of my project

Re: A convenient way to include images in a blog entry

2007-07-25 Thread Kai Kuehne
there is no need for a relation between Entry and Image because in the template filter-solution you can refer to every image via $image[id] no matter if its related or not. I just wanted a list in the Entry admin page so the user can see the available images and the corresponding ids. This looks l

Re: A convenient way to include images in a blog entry

2007-07-25 Thread Patrick
On Wed, 25 Jul 2007 01:43:53 +0200, Kai Kuehne wrote: > Hi list! > In the last past hours I've been thinking about how to include images > into my django blog application. > > At first, I added a new field to my "Entry" django model and named it > "image".

A convenient way to include images in a blog entry

2007-07-24 Thread Kai Kuehne
Hi list! In the last past hours I've been thinking about how to include images into my django blog application. At first, I added a new field to my "Entry" django model and named it "image". This worked but I decided that (maybe) I want to include more than one image i

Re: Re: Re: Re: Re: Uploading multiple images via edit inline give errors when doing auto resizing ..

2007-06-22 Thread LightLan
Ich bin zur Zeit abwesend. Anliegen werden nicht bearbeitet. Ausnahmen bestätigen die Regel. mfg Light Lan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: Uploading multiple images via edit inline give errors when doing auto resizing ..

2007-06-22 Thread Paul Rauch
[EMAIL PROTECTED] schrieb: > Ich bin zur Zeit abwesend. Anliegen werden nicht bearbeitet. > Ausnahmen best�tigen die Regel. > > mfg Light Lan > > > > > > I'm sorry about the spamming, autoresponse now should not be sent to this addresse anymore, should... greetz Paul Rauch

Re: Re: Re: Re: Re: Re: Re: Re: Uploading multiple images via edit inline give errors when doing auto resizing ..

2007-06-22 Thread LightLan
Ich bin zur Zeit abwesend. Anliegen werden nicht bearbeitet. Ausnahmen bestätigen die Regel. mfg Light Lan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: Re: Re: Re: Re: Re: Re: Uploading multiple images via edit inline give errors when doing auto resizing ..

2007-06-22 Thread LightLan
Ich bin zur Zeit abwesend. Anliegen werden nicht bearbeitet. Ausnahmen bestätigen die Regel. mfg Light Lan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: Re: Re: Re: Re: Re: Uploading multiple images via edit inline give errors when doing auto resizing ..

2007-06-22 Thread LightLan
Ich bin zur Zeit abwesend. Anliegen werden nicht bearbeitet. Ausnahmen bestätigen die Regel. mfg Light Lan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: Re: Re: Re: Uploading multiple images via edit inline give errors when doing auto resizing ..

2007-06-22 Thread LightLan
Ich bin zur Zeit abwesend. Anliegen werden nicht bearbeitet. Ausnahmen bestätigen die Regel. mfg Light Lan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: Re: Re: Uploading multiple images via edit inline give errors when doing auto resizing ..

2007-06-22 Thread LightLan
Ich bin zur Zeit abwesend. Anliegen werden nicht bearbeitet. Ausnahmen bestätigen die Regel. mfg Light Lan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: Re: Uploading multiple images via edit inline give errors when doing auto resizing ..

2007-06-22 Thread LightLan
Ich bin zur Zeit abwesend. Anliegen werden nicht bearbeitet. Ausnahmen bestätigen die Regel. mfg Light Lan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: Uploading multiple images via edit inline give errors when doing auto resizing ..

2007-06-22 Thread LightLan
Ich bin zur Zeit abwesend. Anliegen werden nicht bearbeitet. Ausnahmen bestätigen die Regel. mfg Light Lan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Uploading multiple images via edit inline give errors when doing auto resizing ..

2007-06-22 Thread oliver
Hi I have the following model, which is just for images and is edited inline in a different model. Before I added the def save(self) for the image thumbnail creating, I could upload multiple images in the Admin "Property" model in one go. But now i want to resize each image, and

Re: admin css/images disappeared

2007-06-19 Thread Malcolm Tredinnick
On Tue, 2007-06-19 at 09:55 +, Evan Carmi wrote: > Hi, > > My admin css and images have disappeared. I am running django with > lighttpd. The usual thing anybody is going to need to know to be able to help you with a problem like this is "what changed?". What is

Re: admin css/images disappeared

2007-06-19 Thread Michael K
On Jun 19, 5:55 am, "Evan Carmi" <[EMAIL PROTECTED]> wrote: > Hi, > > My admin css and images have disappeared. I am running django with > lighttpd. My settings contains: > - > # URL prefix for admin media -- CSS, JavaScript and images. Make sure to >

admin css/images disappeared

2007-06-19 Thread Evan Carmi
Hi, My admin css and images have disappeared. I am running django with lighttpd. My settings contains: - # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a 39 # trailing slash. 40 # Examples: "http://foo.com/media/;, "/media/

Re: admin is inserting empty images

2007-06-08 Thread omat
Oops! It was a little early to think the problem was solved. Now I cannot add images at all... And there is no exception, the images I upload are silently ignored. On 7 Haziran, 18:27, omat <[EMAIL PROTECTED]> wrote: > Yes! It worked that way. > > Thanks a lot... > > On 7

Re: admin is inserting empty images

2007-06-07 Thread omat
Yes! It worked that way. Thanks a lot... On 7 Haziran, 18:09, robo <[EMAIL PROTECTED]> wrote: > Have you tried moving core=True to the foreignkey field? > Tell me if this works. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: admin is inserting empty images

2007-06-07 Thread robo
Have you tried moving core=True to the foreignkey field? Tell me if this works. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: admin is inserting empty images

2007-06-07 Thread omat
Google ate my previous message. So, once again... Thanks for the reply robo... If I remove the "core=True" django complains that "there should be at least one field declared as core to edit inline". The problem is that, image and file fields does not behave as one would expect in the admin

Re: admin is inserting empty images

2007-06-07 Thread robo
Try removing the "core = True" in this line: image = models.ImageField(upload_to = 'section/image/', core = True) I had a similar, if not exact, problem that I posted about a month and a half ago. --~--~-~--~~~---~--~~ You received

admin is inserting empty images

2007-06-07 Thread omat
I have the following model which defines a 1-n relation between sections and section images: class Section(models.Model): type = models.ForeignKey(SectionType) title = models.CharField(maxlength = 150, blank = True) class Admin: pass class

Re: Moving Images to Amazon S3

2007-05-31 Thread SanPy
One addition: On 31 mei, 21:35, SanPy <[EMAIL PROTECTED]> wrote: > Try this: > # in your view > raw_image_data = form.cleaned_data['photo']['content'] > thumbnail_content = resize_image(raw_image_data) > filename = form.cleaned_data['photo']['filename'] Change the filename's extension to jpg,

Re: Moving Images to Amazon S3

2007-05-31 Thread SanPy
Try this: # in your view raw_image_data = form.cleaned_data['photo']['content'] thumbnail_content = resize_image(raw_image_data) filename = form.cleaned_data['photo']['filename'] upload_to_s3(filename, thumbnail_content) def resize_image(buf, size=(100, 100)): f = cStringIO.StringIO(buf)

Re: Moving Images to Amazon S3

2007-05-31 Thread Kyle Fox
I think my question wasn't clear: we're having NO problem putting files on S3, that's dead simple (ie what Holovaty blogged about). What we need to do is take an *in-memory Image* and put it directly onto S3. We need a way to convert a PIL Image instance into a format S3 can accept WITHOUT

Re: Moving Images to Amazon S3

2007-05-31 Thread Nic James Ferrier
"=?ISO-8859-1?Q?Fr=E9d=E9ric_Sidler?=" <[EMAIL PROTECTED]> writes: > openfount provide something that does the trick > http://www.openfount.com/blog/s3dfs-for-ec2 > > and adrian holovaty did something like that some weeks ago for > chicagocrime.org >

Re: Moving Images to Amazon S3

2007-05-31 Thread Frédéric Sidler
openfount provide something that does the trick http://www.openfount.com/blog/s3dfs-for-ec2 and adrian holovaty did something like that some weeks ago for chicagocrime.org http://www.holovaty.com/blog/archive/2006/04/07/0927 2007/5/31, Nic James Ferrier <[EMAIL PROTECTED]>: > > > Kyle Fox

Re: Moving Images to Amazon S3

2007-05-31 Thread Nic James Ferrier
Kyle Fox <[EMAIL PROTECTED]> writes: > The S3 API requires the file data to be in the format the > open(myfile).read() returns (whatever that is). > > Is there a way to get the same data from an in-memory Image instance, > so I don't need to save/re-read/delete each thumbnail file? Surely the

Moving Images to Amazon S3

2007-05-31 Thread Kyle Fox
I'm absolutely stuck on this. This question might be more python than django related, but I figured because it deals with Amazon S3, someone here may know how to handle it. Here's what needs to happen: 1. A user uploads an image (part of a Model we have) 2. Create a 100x100 thumbnail using

Images being overridden

2007-05-07 Thread robo
I can fix this? My model is: class Project(models.Model): pict = models.ImageField(upload_to='images/') title = models.CharField(maxlength=50) overview = models.TextField() class Admin: list_display = ('title', 'overview',) class Picture(models.Model): project = models.ForeignKey

Re: migrating 400 images

2007-05-07 Thread Nate Straz
On Mon, May 07, 2007 at 05:14:16PM -, Milan Andric wrote: > Wow, interact() is very cool. Now I just need to find write one that > does a similar thing with html body and the local img srcs recursively > on files within a directory. Is there a library that parses html > pages, I'm sure

<    3   4   5   6   7   8   9   10   >