3 ms·
Well, the original article doesn't actually mention ForeignKeys that's why I written may (it only has TextField and IntegerField). Of course nothing stops you f
by spapas82 8y ago
Well, the original article doesn't actually mention ForeignKeys that's why I written may (it only has TextField and IntegerField). Of course nothing stops you from extending them; you'll need to of course add the model where you'll want to create an FK to.
So the MakeField model will have an optional field to denote the class to which you want to create the FK; probably an FK to ContentType would suffice for this field (https://docs.djangoproject.com/en/2.1/ref/contrib/contenttypes/#the-contenttype-model https://docs.djangoproject.com/en/2.1/ref/contrib/contenttyp...).
I know I've written field and FK too many times, I hope it makes sense; if it doesn't tell me and I'll provide a more thorough example.