3 ms·
> You may even be able to have referential consistency using a ForeignKey field Since you say "you may" ... , do you happen to see any problem that may arise w
by babayega2 8y ago
> You may even be able to have referential consistency using a ForeignKey field
Since you say "you may" ... , do you happen to see any problem that may arise with this implementation ?
- spapas82 8y agoWell, 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.