Re: Class that extends a model that is not a model

2014-03-06 Thread Domagoj Kovač
Thanks Havier, Proxy models also look like something that fit my needs. -- 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 to django-users+unsubscr...@googlegroups.c

Re: Class that extends a model that is not a model

2014-03-05 Thread Javier Guerra Giraldez
On Wed, Mar 5, 2014 at 10:52 AM, Tom Evans wrote: > Your derived classes are models, and they should be models. What they > shouldn't be is have different tables for each model type, there > should be one table that all instances are stored in to, as the data > for each Calculation instance, regar

Re: Class that extends a model that is not a model

2014-03-05 Thread Domagoj Kovač
Thanks Tom, this looks like something that can help me. Thanks! -- 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 to django-users+unsubscr...@googlegroups.com. To pos

Re: Class that extends a model that is not a model

2014-03-05 Thread Tom Evans
On Wed, Mar 5, 2014 at 1:03 PM, Domagoj Kovač wrote: > Hi Guys, > > I have a model called Calculation, this model has fields that are calculated > and saved to the database, this model also hold some common calculation > functions. > > I also have two other classes TrailerCalculation and TruckCalc

Re: Class that extends a model that is not a model

2014-03-05 Thread Domagoj Kovač
I did not try that, and i don't think this would help. Separation to more files doesn't have anything to do with the way works, theoretically your whole code can be just one file. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe

Class that extends a model that is not a model

2014-03-05 Thread Kelly Nicholes
Just a guess, but have you tried putting it in a file not called models.py? -- 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 to django-users+unsubscr...@googlegroups

Class that extends a model that is not a model

2014-03-05 Thread Domagoj Kovač
Hi Guys, I have a model called Calculation, this model has fields that are calculated and saved to the database, this model also hold some common calculation functions. I also have two other classes TrailerCalculation and TruckCalculation they both calculate values of the fields that will be s