taiga-contrib-ldap-auth icon indicating copy to clipboard operation
taiga-contrib-ldap-auth copied to clipboard

AttributeError: module 'django.db.models' has no attribute 'get_model'

Open rafamunozg opened this issue 8 years ago • 3 comments

Hi guys. I'm trying to setup ldap in my instance. I'm following the steps for CentOS to run it on RH7, but I got to a point that when I followed the steps you provided to install the LDAP contribution, I need to keep adding "Installed Apps" to my local.py to avoid errors, but not this one.

I have been adding apps to my local.py based on errors like the following, when trying to run "manage.py runserver"

RuntimeError: Model class taiga.webhooks.models.Webhook doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.

But after adding the taiga.webhooks app, the following error is the one in the title of this post. Have you seen this problem?

The list of installed apps so far is the following: INSTALLED_APPS = [ "django.contrib.auth", "django.contrib.contenttypes", "django.db", "taiga.users", "taiga.userstorage", "taiga.projects", "taiga.projects.history", "taiga.projects.notifications", "taiga.timeline", "taiga.webhooks", "djmail", "easy_thumbnails", "taiga_contrib_ldap_auth", ]

Thanks in advance!

RMG


Edit: Searching a little more, I found this in the django's swappable models repo that I think is relevant to this discussion. It happens that .get_model was deprecated on django 9 and that's the version required by the current version of taiga-back.

Have you gone through that yet? Thanks again.

rafamunozg avatar Oct 24 '16 03:10 rafamunozg

You probably updated Django to 1.10. If so, try reverting to 1.9.

veox avatar Dec 01 '16 17:12 veox

You are right. I installed the docker image available from ipedrazas (https://github.com/ipedrazas/taiga-docker), it worked great that way and I was able to run Taiga, but not the LDAP plugin.

Then I did the manual install and that is also installing a newer version of Django, I'm concerned that the latest version of Taiga will not work on the previous version of Django, but I haven't tried.

Is there any plan to make the plugin compatible with 1.10?

Thanks!

rafamunozg avatar Dec 16 '16 13:12 rafamunozg

Django 1.9 is a dependency of taiga-back AFAIK. I guess once that starts using 1.10, so should this plugin, ~~but not before~~ - or it can be done as mentioned in your link on swappable models.

veox avatar Dec 16 '16 14:12 veox