Re: search across models

2013-02-02 Thread Ashwin Kumar
thank you joey, but i want to build search for queries like 1. restaurants in city1 2. city1 restaurants 3. Chinese restaurants 4. Chinese restaurants in city1 5. vegetarian restaurants in city1 6. vegetarian american restaurants the above are exact search queries we get from

Re: Custum save on Foreignkey in Admin

2013-02-02 Thread Rob
Thank you for the reply! I was working on a custom save in models.py, never thought about working on the formset in admin.py Rob -- 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,

Re: On the fly image resize

2013-02-02 Thread mulianto
hi you can use pil , python image lib if you take make your own solution. if want faster solution use other app that do it for you. you can learn from others source code also and creAte your own solution. Sent from my iPhone On 3 Feb 2013, at 04:33, nYmo wrote: > Hi all, > I'm new to djan

Re: On the fly image resize

2013-02-02 Thread Nikhil Verma
Hi I don't understand your question properly but i think this might help you.. #--- # Calculating the aspect ratio of uploaded profile picture # It compresses the image accordingly.This has been studided # from PIL docum

RE: On the fly image resize

2013-02-02 Thread Babatunde Akinyanmi
Hi nymo, I don't know the answer to your question but I can supply some advice. One good thing about open source is that the source is available for you to look at. Download one of such apps, look at the source to see how to creator solved the problem. From there, you can learn a way to do it or ge

Re: On the fly image resize

2013-02-02 Thread Mario Gudelj
Try cloudinary and their python api plugin. On 3 Feb, 2013 7:44 AM, "nYmo" wrote: > Hi all, > I'm new to django and also python but have already some programming > experience. I'm currently creating my first application in django and get > stucked because I'm looking for the best way to resize up

Re: On the fly image resize

2013-02-02 Thread frocco
I use django-imagekit pip install django-imagekit On Saturday, February 2, 2013 3:33:36 PM UTC-5, nYmo wrote: > > Hi all, > I'm new to django and also python but have already some programming > experience. I'm currently creating my first application in django and get > stucked because I'm look

On the fly image resize

2013-02-02 Thread nYmo
Hi all, I'm new to django and also python but have already some programming experience. I'm currently creating my first application in django and get stucked because I'm looking for the best way to resize uploaded images. I'm already so far that I can upload/delete/update my images and show them

django url rewrite without redirect

2013-02-02 Thread Tom Lesters
I'm using django and have hundreds of subdomain url abc.domain.com want to rewrite to domain.com/site/abc/ Is it possible via url-rewriting that the user won't see domain.com/site/abc/ in his browser, but sees abc.domain.com I think this can be done with apache configuration. But my questio

Re: Custum save on Foreignkey in Admin

2013-02-02 Thread Pankaj Singh
http://stackoverflow.com/questions/8294889/override-save-on-django-inlinemodeladmin Sincerely, Pankaj Singh http://about.me/psjinx On Sun, Feb 3, 2013 at 1:34 AM, Pankaj Singh wrote: > Hey Rob, > > You can override save_formset() method of ModelAdmin for this. Create > a method update_total_amo

Re: Custum save on Foreignkey in Admin

2013-02-02 Thread Pankaj Singh
Hey Rob, You can override save_formset() method of ModelAdmin for this. Create a method update_total_amount(self) in your Ticket Model. class TicketAdmin(admin.ModelAdmin): def save_formset(self, request, form, formset, change): instances = formset.save(commit=False) for insta

search across models

2013-02-02 Thread Aswani Kumar
hi all, i have a big question. how can i perform search queries like on following models RESTAURANT_TYPES = ( ('C', 'Chinese'), ('A', 'American'), ('J', 'Japanese'), ) class city (models.Model): name = models.CharField(max_length=200) class restaurants(models.Model): nam

Custum save on Foreignkey in Admin

2013-02-02 Thread Rob
I have two models: class Tickets(models.Model): ticketnumber = models.IntegerField() total_amount = models.DecimalField() class TicketItems(models.Model): name = models.Charfield(max_length=30) ticket = models.ForeignKey(Tickets) price = models.DecimalField() amount = models.In

Re: previous values of custom method in save

2013-02-02 Thread Sammael
Now I'm trying to aviod using *TreeForeignKey. *Unfortunately, with usual * ForeignKey* the behaviuor is the same. -- 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 t