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.
 
 
 
 
 
 

40 lines
1.6 KiB

# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
def create_currency(apps, schema_editor):
Currency = apps.get_model("store", "Currency")
Currency.objects.get_or_create(title="Казахстанский тенге",
exchange=1.00,
abridgement="тг",
ISO_letter_code="KZT",
HTML_letter_code="₸")
Currency.objects.get_or_create(title="Российский рубль",
exchange=0.18519,
abridgement="руб",
ISO_letter_code="RUB",
HTML_letter_code="₽")
Currency.objects.get_or_create(title="Киргизский сом",
exchange=0.22,
abridgement="сом",
ISO_letter_code="KGS",
HTML_letter_code="С")
Currency.objects.get_or_create(title="Доллар США",
exchange=0.00315,
abridgement="долл",
ISO_letter_code="USD",
HTML_letter_code="$")
class Migration(migrations.Migration):
dependencies = [
('store', '0056_auto_20170306_1823'),
]
operations = [
migrations.RunPython(create_currency)
]