darklow / django-suit

Modern theme for Django admin interface
http://djangosuit.com/
Other
2.31k stars 701 forks source link

AttributeError: module 'posts.models' has no attribute 'image_upload_to #668

Open rahul6612 opened 6 years ago

rahul6612 commented 6 years ago

while running python manage.py makemigrations i am getting error

models.py

here another image_upload_to part is in same models.py but it is in comment

_remember this section( image_uploadto) is in comment

error is:

field=models.ImageField(blank=True, null=True, upload_to=posts.models.image_upload_to), AttributeError: module 'posts.models' has no attribute 'image_upload_to' _how it possible this part (field=models.ImageField(blank=True, null=True, upload_to=posts.models.image_uploadto) is in comment any idea?

darklow commented 6 years ago

Does error goes away if you remove django suit from INSTALLED_APPS? I think this is not related to Django Suit

rahul6612 commented 6 years ago

there is no django suit in INSTALLED_APPS.

Aditya-Rajgor commented 2 years ago

Just ran into the same issue, just remove all the migration files and run the migrations again, it should work!