Re: how to display only one instance of an object returned by a query.

2010-04-26 Thread ondrey
Hi, if your models look something like this: class Car(models.Model): name = models.CharField() class Photo(models.Model): car = models.ForeignKey(Car) added_date = models.DateField() then you can sort the photo queryset by the related model's (i.e. car's) prope

Re: Using the form field values in templates

2010-01-19 Thread ondrey
Hi, if the form is bound (i.e. form.is_bound is true) then you can access its data attribute, which contains the data entered into the form. If the form is valid (i.e. form.is_valid() is true), then you can access the cleaned_data attributes as well. So for example if you have form like this: f =

Re: newbie tutorial part 1 startproject doesn't create folder and appropriate files

2009-08-04 Thread ondrey
Hi mdsmoker, try running the django-admin.py script like this: python PATH/django-admin.py startproject mysite where PATH is the path to directory containing the django-admin.py. -Ondrej Bohm On Aug 2, 11:47 pm, mdsmoker wrote: > I'm using django 1.1, python 2.5, and windows and i'm bran

Re: how to save a file from a remote server?

2009-02-22 Thread ondrey
On Feb 20, 5:12 pm, Jacob Kaplan-Moss wrote: > On Fri, Feb 20, 2009 at 9:25 AM, ondrey wrote: > > In my view I need to save locally a file (image) from a different > > server so I can further process it. But I can't figure out how to do > > it. Can someone h

how to save a file from a remote server?

2009-02-20 Thread ondrey
like http://wms.server/img?option=val) of the image. I need to save it to local filesystem so I can process it and display the result on my webpage. thanks, Ondrey --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups &q