I have a django application where one application has many-to-many relationship with a UserProfile. But whenever I do a syncdb, it warns me that app_users is stale field
The following content types are stale and need to be deleted:
Apps | app_users
#settings.py
AUTH_PROFILE_MODULE = 'kprofile.UserProfile'
#Apps/models.py
class app(models.Model):
....
users = models.ManyToManyField(UserProfile)
Now I don't use UserProfile inside view except for some authentication purposes inside rules. And a UserProfile can be attached to an App only from admin interface. How can I stop django syncdb from giving me this false/incorrect warning?
Pay attention to the message. It's not claiming that your field is stale - it's talking about an entry in the Content Types model.
In the shell, do this:
from django.contrib.contenttypes.models import ContentType
ct = ContentType.objects.get(app_label='Apps', model='app_users')
ct.delete()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With