1# -*- coding: utf-8 -*- 

2 

3from django.db import models, migrations 

4 

5 

6def forwards_func(apps, schema_editor): 

7 # We get the model from the versioned app registry; 

8 # if we directly import it, it'll be the wrong version 

9 MailingList = apps.get_model('core', 'MailingList') 

10 db_alias = schema_editor.connection.alias 

11 MailingList.objects.using(db_alias).bulk_create([ 

12 MailingList(name='alioth-debian-net', domain='alioth-lists.debian.net', 

13 archive_url_template='https://alioth-lists.debian.net/pipermail/{user}/'), 

14 ]) 

15 

16 

17class Migration(migrations.Migration): 

18 

19 dependencies = [ 

20 ('core', '0015_delete_runningjob'), 

21 ] 

22 

23 operations = [ 

24 migrations.RunPython( 

25 forwards_func, 

26 ), 

27 ]