Re: Custom_SQL_Method in a Model

2007-09-09 Thread Iapain
You have written a member function to your class, its going to work like charm. But mind it your *baz* doesnt exist in class so you should pass it into your member function. Alternatively see Django custom managers. On Sep 10, 12:27 am, johnny <[EMAIL PROTECTED]> wrote: > I need to define custom

Re: Custom_SQL_Method in a Model

2007-09-09 Thread canen
I don't think it matters much. Depends on how large your models.py is. Just remember to add the new manager as part of the model. On Sep 9, 4:35 pm, johnny <[EMAIL PROTECTED]> wrote: > you create class called PersonManager(models.Manager) and define > my_custom_sql inside there. Do you place thi

Re: Custom_SQL_Method in a Model

2007-09-09 Thread johnny
you create class called PersonManager(models.Manager) and define my_custom_sql inside there. Do you place this class in the same models.py or in a separate file called apps/people/manager.py and then import it where ever you need it? What is the best practice? --~--~-~--~~-