I created a project say foo. And created an app named admin. But it causes an error
django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: admin”
So I read this and made changes as mentioned there. I marked the label as foo.admin
.
I don't exactly know what the label is, but maybe this is the unique name given to an app to distinguish apps with the same name in case.
So is that mean, everywhere I have to use label
instead of name
?
But it causes another error.
String model references must be of the form 'app_label.ModelName'
.
So I used the name in models as foo.admin
in ForeignKey
parameter. But the same error comes up. But the error persists.
I googled the error and found this. So I changed the ForeignKey
parameter from foo.admin
to admin
. But in either case, I'm having this error.
So in short I want to ask
How to use apps with the same name in the same django project, like Which files are need to be modified and what to write ForeignKey parameters etc.?
(I'm using django 2.0)