openwisp / openwisp-ipam

IP address space administration module of OpenWISP
https://openwisp.io/docs/dev/ipam/
BSD 3-Clause "New" or "Revised" License
104 stars 51 forks source link

openwisp_users.models.User doesn't declare an explicit app_label #122

Closed DavidMeu closed 3 years ago

DavidMeu commented 3 years ago

Recieving the following error for manage.py makemigrations after extending both openwisp_ipam and opwnwisp_usersapps.

    from openwisp_ipam.base.models import AbstractIpAddress, AbstractSubnet
  File "Desktop\ipam-service\venv\lib\site-packages\openwisp_ipam\base\models
.py", line 10, in <module>
    from openwisp_users.models import Organization
  File "Desktop\ipam-service\venv\lib\site-packages\openwisp_users\models.py"
, line 18, in <module>
    class User(AbstractUser):
  File "Desktop\ipam-service\venv\lib\site-packages\django\db\models\base.py"
, line 113, in __new__
    raise RuntimeError(
RuntimeError: Model class openwisp_users.models.User doesn't declare an explicit app_label and isn't in an application in INSTA
LLED_APPS.
pandafy commented 3 years ago

Hi @DavidMeu! This issue seems to be fixed in the latest master. Check https://github.com/openwisp/openwisp-ipam/pull/58. I suggest you to use the master branch of openwisp-ipam. Please use one of the support channels described here if have any doubts: https://openwisp.org/support.html

DavidMeu commented 2 years ago

@pandafy Shouldn't that be on a stable version of openwisp-ipam?

I suggest you to use the master branch

Don't think this is a best practice.

pandafy commented 2 years ago

Don't think this is a best practice.

We are in works for publishing a new release of OpenWISP. But until then, the only way to use fixes is to use the master branch. You can pin to a specific commit if you want to.