Building our Django project, when updating the production site, we got this error on the log: Error was: ‘str’ object has no attribute ‘_default_manager’

I was puzzled because on the others sites with the same exact code (using git here), the project worked flawless. We tried using fresh databases, desactivating the django’s admin site, etc.

The problem got solved when I deleted some *.pyc from two of he apps used, specially the one used for the authenticaion. So…remember: If you get some strange error, try deleting those *.pyc!

PD: The error happened again. This time, I got solved it by entering this code before admin.autodiscover() from the main

from django.db.models.loading import cache as model_cache
if not model_cache.loaded:

I got the solution from here:

It’s just a workaround. Hope it works for you!

Empezando con esto. Trabajando tan pronto tenga un poco más de tiempo. Este espero que sea un blog tanto en español como en inglés.

Just starting with this, building it up as soon I have some time. Both in english & spanish flavours.