Adding manager class to model during runtime

2010-11-23 Thread Vidja
I'm not sure if it is possible, but I'm trying to add a model manager defined outside of the model.py to a modelclass, in a similar way as I add functions to a model class. (my model classes (> 100) are automatically generated from the database and I don't want to edit that file every time) this i

Adding manager class to model during runtime

2010-11-23 Thread Vidja
I'm not sure if it is possible, but I'm trying to add a model manager defined outside of the model.py to a modelclass, in a similar way as I add functions to a model class. this is how I add a new function to a model class (leaving out ## in models.py class Customer(models.Model): customer_id

Adding manager class to model during runtime

2010-11-23 Thread Vidja
I'm not sure if this is the right way of describing it, but I would like to add a model manager on a model during project loading. This is what I am doing to add new functions to a class: ## in models.py ## class customer(models.Model): customer_id = models.AutoField(primary_key=True) nam