I'm using Django 2.0, Python 3.7, and MySql 5. I recently installed the django_address module. I noticed when I ran my initial migration based on my models.py file ...
from django.db import models
from address.models import AddressField
from phonenumber_field.modelfields import PhoneNumberField
class CoopType(models.Model):
name = models.CharField(max_length=200, null=False)
class Meta:
unique_together = ("name",)
class Coop(models.Model):
type = models.ForeignKey(CoopType, on_delete=None)
address = AddressField(on_delete=models.CASCADE)
enabled = models.BooleanField(default=True, null=False)
phone = PhoneNumberField(null=True)
email = models.EmailField(null=True)
web_site = models.TextField()
It created some address tables, including ...
mysql> show create table address_country;
+-----------------+---------------------------------------------------+
| Table | Create Table |
+-----------------+---------------------------------------------------+
| address_country | CREATE TABLE `address_country` ( |
| | `id` int(11) NOT NULL AUTO_INCREMENT, |
| | `name` varchar(40) COLLATE utf8_bin NOT NULL, |
| | `code` varchar(2) COLLATE utf8_bin NOT NULL, |
| | PRIMARY KEY (`id`), |
| | UNIQUE KEY `name` (`name`) |
| | ) ENGINE=InnoDB |
| | DEFAULT CHARSET=utf8 COLLATE=utf8_bin |
+-----------------+---------------------------------------------------+
However, this table has no data in it. Is there a way to obtain seed data for the table generated by the module or do I need to dig it up on my own?