You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

21 lines
673 B

# Generated by Django 2.0.6 on 2018-11-09 14:03
from django.db import migrations
from django.contrib.staticfiles.storage import staticfiles_storage
def add_gift_certificates(apps, schema_editor):
GiftCertificate = apps.get_model('payment', 'GiftCertificate')
for price in [1000, 2000, 3000, 5000, 10000]:
GiftCertificate.objects.create(price=price,
cover=staticfiles_storage.url('img/gift-certificates/%d.jpg' % price))
class Migration(migrations.Migration):
dependencies = [
('payment', '0027_auto_20181109_1402'),
]
operations = [
migrations.RunPython(add_gift_certificates),
]