umap/umap/migrations/0004_add_licence.py

22 lines
512 B
Python
Raw Normal View History

# Generated by Django 1.10.3 on 2016-11-26 16:11
from __future__ import unicode_literals
from django.db import migrations
def add_licence(apps, *args):
2023-11-23 11:04:23 -06:00
Licence = apps.get_model("umap", "Licence")
if Licence.objects.count():
return
2023-11-23 11:04:23 -06:00
Licence(name="ODbL", details="http://opendatacommons.org/licenses/odbl/").save()
class Migration(migrations.Migration):
dependencies = [
2023-11-23 11:04:23 -06:00
("umap", "0003_add_tilelayer"),
]
operations = [
migrations.RunPython(add_licence),
]