Re: South data-migration and custom save() method

2013-12-22 Thread Christian Schmitt
That's what i do in south, sometimes.

But sometimes you have a bigger table with initial data, like a table with 
predefined prices. and it wouldn't be that cool to instantiate 20.000 or 
more prices manually.

Am Sonntag, 22. Dezember 2013 12:06:02 UTC+1 schrieb Andrew Godwin:
>
> It won't load initial_data fixtures - those are being deprecated for 
> migrated apps - but you could still call loaddata with a custom one, I 
> guess. I'd personally recommend moving away from fixtures and just 
> instantiating objects directly using the ORM inside data migrations.
>
> Andrew
>
>
> On Sat, Dec 21, 2013 at 10:45 PM, Christian Schmitt <
> c.sc...@briefdomain.de > wrote:
>
>> I didn't found anything in the docs... So... could I stil load a fixture 
>> with a migration? Like here: 
>> http://south.readthedocs.org/en/latest/fixtures.html
>>
>> Am Freitag, 20. Dezember 2013 17:41:22 UTC+1 schrieb Andrew Godwin:
>>>
>>> This will also be true for django.db.migrations; there's no way we can 
>>> serialise save methods as part of the model for later use in migrations. If 
>>> you want to use complex save logic in migrations, you'll have to copy it 
>>> into the migration file (which also means the migration will keep working 
>>> as originally written if you later change what the save method does).
>>>
>>> Andrew
>>>
>>>
>>> On Fri, Dec 20, 2013 at 4:15 PM, Val Neekman  wrote:
>>>
 South (latest) has a limitation where it ignores a custom save() method 
 in the model class.
  
 I am wondering if that is going to be true for the new South in the 
 core in Django 1.7?

 Thanks,

 Val

  -- 
 You received this message because you are subscribed to the Google 
 Groups "Django developers" group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to django-develop...@googlegroups.com.
 To post to this group, send email to django-d...@googlegroups.com.

 Visit this group at http://groups.google.com/group/django-developers.
 To view this discussion on the web visit https://groups.google.com/d/
 msgid/django-developers/CADy_H8ERxnyrzf5UGOTPt1%
 3DUmj46himOBJ3w%2BBrxL49u_E3qyA%40mail.gmail.com.
 For more options, visit https://groups.google.com/groups/opt_out.

>>>
>>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-develop...@googlegroups.com .
>> To post to this group, send email to 
>> django-d...@googlegroups.com
>> .
>> Visit this group at http://groups.google.com/group/django-developers.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-developers/c219ae48-16fe-4149-91c6-d49fe6cc7a26%40googlegroups.com
>> .
>>
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/a54f5360-1519-4a29-aa25-7cb9fe869c13%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: South data-migration and custom save() method

2013-12-22 Thread Andrew Godwin
It won't load initial_data fixtures - those are being deprecated for
migrated apps - but you could still call loaddata with a custom one, I
guess. I'd personally recommend moving away from fixtures and just
instantiating objects directly using the ORM inside data migrations.

Andrew


On Sat, Dec 21, 2013 at 10:45 PM, Christian Schmitt <
c.schm...@briefdomain.de> wrote:

> I didn't found anything in the docs... So... could I stil load a fixture
> with a migration? Like here:
> http://south.readthedocs.org/en/latest/fixtures.html
>
> Am Freitag, 20. Dezember 2013 17:41:22 UTC+1 schrieb Andrew Godwin:
>>
>> This will also be true for django.db.migrations; there's no way we can
>> serialise save methods as part of the model for later use in migrations. If
>> you want to use complex save logic in migrations, you'll have to copy it
>> into the migration file (which also means the migration will keep working
>> as originally written if you later change what the save method does).
>>
>> Andrew
>>
>>
>> On Fri, Dec 20, 2013 at 4:15 PM, Val Neekman  wrote:
>>
>>> South (latest) has a limitation where it ignores a custom save() method
>>> in the model class.
>>>
>>> I am wondering if that is going to be true for the new South in the core
>>> in Django 1.7?
>>>
>>> Thanks,
>>>
>>> Val
>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django developers" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-develop...@googlegroups.com.
>>> To post to this group, send email to django-d...@googlegroups.com.
>>>
>>> Visit this group at http://groups.google.com/group/django-developers.
>>> To view this discussion on the web visit https://groups.google.com/d/
>>> msgid/django-developers/CADy_H8ERxnyrzf5UGOTPt1%
>>> 3DUmj46himOBJ3w%2BBrxL49u_E3qyA%40mail.gmail.com.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Django developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to django-developers@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/c219ae48-16fe-4149-91c6-d49fe6cc7a26%40googlegroups.com
> .
>
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAFwN1up%3DO1GReVuo_24%2BwtB_%3DBuJj7sDzdYzh6ThDCQybSaGUg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: South data-migration and custom save() method

2013-12-21 Thread Christian Schmitt
I didn't found anything in the docs... So... could I stil load a fixture 
with a migration? Like here: 
http://south.readthedocs.org/en/latest/fixtures.html

Am Freitag, 20. Dezember 2013 17:41:22 UTC+1 schrieb Andrew Godwin:
>
> This will also be true for django.db.migrations; there's no way we can 
> serialise save methods as part of the model for later use in migrations. If 
> you want to use complex save logic in migrations, you'll have to copy it 
> into the migration file (which also means the migration will keep working 
> as originally written if you later change what the save method does).
>
> Andrew
>
>
> On Fri, Dec 20, 2013 at 4:15 PM, Val Neekman  > wrote:
>
>> South (latest) has a limitation where it ignores a custom save() method 
>> in the model class.
>>
>> I am wondering if that is going to be true for the new South in the core 
>> in Django 1.7?
>>
>> Thanks,
>>
>> Val
>>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-develop...@googlegroups.com .
>> To post to this group, send email to 
>> django-d...@googlegroups.com
>> .
>> Visit this group at http://groups.google.com/group/django-developers.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-developers/CADy_H8ERxnyrzf5UGOTPt1%3DUmj46himOBJ3w%2BBrxL49u_E3qyA%40mail.gmail.com
>> .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/c219ae48-16fe-4149-91c6-d49fe6cc7a26%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: South data-migration and custom save() method

2013-12-20 Thread Val Neekman
Yep, this is what I currently do and I was just hoping for a cleaner
solution in 1.7. That's all.
Thanks for django.db.migrations Andrew.

Val





On Fri, Dec 20, 2013 at 11:41 AM, Andrew Godwin  wrote:

> This will also be true for django.db.migrations; there's no way we can
> serialise save methods as part of the model for later use in migrations. If
> you want to use complex save logic in migrations, you'll have to copy it
> into the migration file (which also means the migration will keep working
> as originally written if you later change what the save method does).
>
> Andrew
>
>
> On Fri, Dec 20, 2013 at 4:15 PM, Val Neekman  wrote:
>
>> South (latest) has a limitation where it ignores a custom save() method
>> in the model class.
>>
>> I am wondering if that is going to be true for the new South in the core
>> in Django 1.7?
>>
>> Thanks,
>>
>> Val
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Django developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-developers+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-developers@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-developers.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-developers/CADy_H8ERxnyrzf5UGOTPt1%3DUmj46himOBJ3w%2BBrxL49u_E3qyA%40mail.gmail.com
>> .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to django-developers@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/CAFwN1ura0utpBXaQ9armeYwRRbM6eCQYWiMecYuUpMCj94DuCg%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CADy_H8Gx2sydztS9HojAZJbgRHEQHiOopwnbsG77tCb5%2BZEc0g%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: South data-migration and custom save() method

2013-12-20 Thread Andrew Godwin
This will also be true for django.db.migrations; there's no way we can
serialise save methods as part of the model for later use in migrations. If
you want to use complex save logic in migrations, you'll have to copy it
into the migration file (which also means the migration will keep working
as originally written if you later change what the save method does).

Andrew


On Fri, Dec 20, 2013 at 4:15 PM, Val Neekman  wrote:

> South (latest) has a limitation where it ignores a custom save() method in
> the model class.
>
> I am wondering if that is going to be true for the new South in the core
> in Django 1.7?
>
> Thanks,
>
> Val
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to django-developers@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/CADy_H8ERxnyrzf5UGOTPt1%3DUmj46himOBJ3w%2BBrxL49u_E3qyA%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAFwN1ura0utpBXaQ9armeYwRRbM6eCQYWiMecYuUpMCj94DuCg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


South data-migration and custom save() method

2013-12-20 Thread Val Neekman
South (latest) has a limitation where it ignores a custom save() method in
the model class.

I am wondering if that is going to be true for the new South in the core in
Django 1.7?

Thanks,

Val

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CADy_H8ERxnyrzf5UGOTPt1%3DUmj46himOBJ3w%2BBrxL49u_E3qyA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.