File "C:\Python27\Lib\site-packages\file_picker\forms.py,line 5 in <module>
from django.db.models import Q,get_model
ImportError:cannot import name get_model
I am using django 1.9.7 and file_picker 0.2.2 I don't seem to have any solution to this problem
Try using django.apps instead:
from django.apps import apps
apps.get_model('Model')
https://docs.djangoproject.com/en/dev/ref/applications/#django.apps.AppConfig.get_model
Try this,
from django.apps import apps
model_obj = apps.get_model('app_name', 'model_name')
Where "app_name" is your app name and "model_name" is your model name.
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