Question: I am trying to create a Django application where each User has one model attached to them ( a list of Plants ) and that model is composed of individual plants. I already know I can have the plants connected to the plant list through a many-to-one relationship using foreign key as shown down below:

```
class PlantList(models.Model):
    plant_list_id = models.AutoField(primary_key=True)

class Plant(models.Model):
    plantlist = models.ForeignKey(PlantList, on_delete = models.CASCADE)
    name = models.CharField(max_length = 20)
    wateringInterval = models.PositiveSmallIntegerField()

```

However, I want each user to have a plant list attached to them that can be displayed uniquely for each user, according to the plants that they add to their list. How would I make it so that each user has a plant list?

I was trying to have it inside the register form but couldn't figure out how to do it and I wanted each plantlist to have a unique ID so that I can add plants to it easier.

```
class AddNewPlant(forms.Form):
    name = forms.CharField(label='Name',max_length = 20)
    wateringInterval = forms.IntegerField(label='Watering Interval')

```

Answer: 
Use generic structure with Numeric protocol.

```
struct Example<T:Numeric> {
    var string: String
    init(number: T) {
        self.string = "\(number)"
    }
}

```
You can have a look at how swift does this with its String-initializer:

```
struct Example {
    init<Number>(number: Number) where Number: BinaryInteger {
        string = String(number)
    }
}

```