Hi Melvyn,
2012/7/9 Melvyn Sopacua :
> On 9-7-2012 10:30, Daniel Walz wrote:
>
>> Ok, I did some tests today and read in the django sources.
>> It seems to me, that an abstract model class has no Manager attached,
>> at least not by default.
>
> Because an abstract model has no data. It is a colle
On 9-7-2012 10:30, Daniel Walz wrote:
> Ok, I did some tests today and read in the django sources.
> It seems to me, that an abstract model class has no Manager attached,
> at least not by default.
Because an abstract model has no data. It is a collection of attribute
definitions.
> I see that,
Hi,
2012/7/7 Tomas Neme :
>> and I do
>> for fruit in Fruits.objects.all(): fruit.rott()
>>
>> will anything happen at all? I know in C++ this would work... ;-)
>>
>> on database-level I know how to do it, I just don't know if the django
>> abstraction handles this automalically.
>
> I.. don't kno
> and I do
> for fruit in Fruits.objects.all(): fruit.rott()
>
> will anything happen at all? I know in C++ this would work... ;-)
>
> on database-level I know how to do it, I just don't know if the django
> abstraction handles this automalically.
I.. don't know. I'd think yes, at least I wonder o
Hi again,
2012/7/7 Tomas Neme :
>> The big difference is, -as I see it- I will not get real polymorphism,
>> as the base class would need to do the join on all it's child classes.
>> Is that true?
>
> with abstract models you won't get polymorphism at all, in the
> database level (this is, you WON
> The big difference is, -as I see it- I will not get real polymorphism,
> as the base class would need to do the join on all it's child classes.
> Is that true?
with abstract models you won't get polymorphism at all, in the
database level (this is, you WON'T be able to do Fruit.objects).
You'
Thanks guys for this helpfull discussion
2012/7/5 Tomas Neme :
> [...] I assumed
> he maybe doesn't know about abstract models because he said he's just
> getting started programming (or at least on py/dj) and maybe he wasn't
> sure what behavior he needed, and what were his options.
...although
> Not really. But from the question:
> "But how can I tell south to fill the super class with the data from the
> old schema?"
Well, in aswer to this, and Tom's remarks, you assumed he wanted to
have a new table because he was asking how to populate it, I assumed
he maybe doesn't know about abstra
On 5-7-2012 15:33, Tomas Neme wrote:
> But I don't see how what you say makes sense.
>
> I mean, all the way starting from this:
>
>> No, you /should/ not. You may do this, but you will end up with two
>> tables that /do not share the records/.
>> From the OP's post it's obvious these classes sh
On Thu, Jul 5, 2012 at 2:33 PM, Tomas Neme wrote:
> I wanted to chang the subject because I didn't want to spam someone's
> plead for help into a design discussion, but then I thought, how am I
> gonna make sure this is read by the right people? Also, context would
> be lost, so.. sorry about this
I wanted to chang the subject because I didn't want to spam someone's
plead for help into a design discussion, but then I thought, how am I
gonna make sure this is read by the right people? Also, context would
be lost, so.. sorry about this
But I don't see how what you say makes sense.
I mean, al
On 4-7-2012 22:29, Tomas Neme wrote:
> Besides that, if you don't want actual Base instances, then this is an
> abstract class, and you should do this:
>
> class Base(models.Model):
> eggs
> plants
> class Meta:
> abstract=True
>
> class Foo(Base):
> carpet=
By the way, if you do that, and I'm not crazy, you won't need to do any
migration with south, since the Foo and Bar tables would both have all of
base's columns (because Base is abstract).
If Base can't be abstract (if you want Base instances that are neither Foo
nor Bar), then you'll have to do t
On Behalf Of Lachlan Musicman
Sent: Wednesday, July 04, 2012 1:18 PM
To: django-users@googlegroups.com
Subject: Re: migration via south for inheritance change -> please help
I'd like to know this too - but I think the real answer is "get better at
python" - you are essentially (f
You'll have to migrate your data manually in your migration, yes.
Besides that, if you don't want actual Base instances, then this is an
abstract class, and you should do this:
class Base(models.Model):
eggs
plants
class Meta:
abstract=True
class Foo(Base):
carpet
I'd like to know this too - but I think the real answer is "get better
at python" - you are essentially (from what I can tell) in a django
shell when south pops the "not blank, not null but no data" error -
try pulling in some details from fixtures?
cheers
L.
On Thu, Jul 5, 2012 at 2:30 AM, Danie
...no one?
regards, mcJack
2012/7/2 mcJack :
> Hi all,
>
> I've got a problem migrating some changes in the model, so I tried to solve
> it with south.
> The situation:
> I implemented two classes, which share some functionality. Now that I
> improved a little with python, django and co. I wanted
Hi all,
I've got a problem migrating some changes in the model, so I tried to solve
it with south.
The situation:
I implemented two classes, which share some functionality. Now that I
improved a little with python, django and co. I wanted to use inheritance
for that issue.
The model looks like
18 matches
Mail list logo