Break statement in Djnago template

2009-12-10 Thread guptha
Hi group, Is there any break statement in Django template like one in java to break for loop as an element if found . {% for enqhasparent in enqhasparentobjs %} {% ifequal enobj.id enqhasparent.enquiry.id %} {{enobj.student_name|capfirst}} {%

Problem with Image field saving

2009-12-03 Thread guptha
Hi group , I am getting error like "Key 'fathers_photo' not found in {{fatherprofileform.as_p}} Here FatherProfileForm does not represent UserProfile model .In this case how can the error be rectified ? Ganesh -- You received this message because you are subscribed to the Google Groups

How to lookup tables which has ForeignKey relationship

2009-11-17 Thread guptha
hi group, class Parent(models.Model): user = models.ForeignKey(User,unique=True) school=models.ForeignKey(School) def __unicode__(self): return self.user.username class Student(models.Model): user = models.ForeignKey(User,unique=True) school=models.ForeignKey(School)

problem with Imageloading

2009-07-23 Thread guptha
My requirement is ,user uploaded image has to be saved in Database after a custom validation for size and has to display to user. In models.py class Marketplace(models.Model): title_name=models.CharField(max_length=125) photo1 = models.ImageField(upload_to=

Re: How to get the value of ForeignKey

2009-03-09 Thread guptha
loan_type:Fixed Bank ... .. Finace ... ... loan_type:Floating Bank ... .. Finace ... ... On Mar 9, 4:00 pm, Malcolm Tredinnick <malc...@pointy-stick.com> wrote: > On Mon, 2009-03-09 at 03:54 -0700, guptha wrote: > > hi gp, > > In models.py > > &

How to get the value of ForeignKey

2009-03-09 Thread guptha
hi gp, In models.py class BankerCategory(models.Model): name = models.CharField(max_length=125,unique=True) class Banker(models.Model): bankercategory = models.ForeignKey(BankerCategory) class Homeloan(models.Model): banker =

Re: how to use post_save signals

2009-02-17 Thread guptha
hi, thanks a lot for your clarification i have tried it in models.py ,overriding parent save method and everything works fine On Feb 17, 11:56 am, Malcolm Tredinnick wrote: > On Mon, 2009-02-16 at 22:38 -0800, gganesh wrote: > > hi, > > i wrote > > def

how to make a field uneditable in admin site

2009-02-16 Thread guptha
hi , i need to know how to create a non editable field in admin site .I tried , one like below acct_number=models.CharField(max_lenght=100,editable=False) but it doesn't work please any other ideas, --~--~-~--~~~---~--~~ You received this message because you

how to use post_save signals

2009-02-14 Thread guptha
hi , In models.py i have class Customer(...) bill_no=models.CharFeild(...) All i need to access the field 'bill_no' and assign a value, In views.py i wrote from django.db.models.signals import post_save from mypro.myapp import Customer def