django-freeradius, migration problem

22 views
Skip to first unread message

unracer

unread,
Jul 14, 2019, 9:24:23 AM7/14/19
to OpenWISP
Hello all,

After cloning django-freeradius and installing the requirements (with pip install -r requirements-test.txt), I'm trying to migrate but I fail quite miserably. Any idea?

Thanks and best,

unracer


(radius-dev) unracer@openwisp201:~/radius-dev/src/django-freeradius/tests$ ./manage.py migrate
Traceback (most recent call last):
  File "./manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/home/unracer/radius-dev/lib/python3.6/site-packages/django/core/management/__init__.py", line 381, in execute_from_c
    utility.execute()
  File "/home/unracer/radius-dev/lib/python3.6/site-packages/django/core/management/__init__.py", line 357, in execute
    django.setup()
  File "/home/unracer/radius-dev/lib/python3.6/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/home/unracer/radius-dev/lib/python3.6/site-packages/django/apps/registry.py", line 122, in populate
    app_config.ready()
  File "/home/unracer/radius-dev/lib/python3.6/site-packages/django/contrib/admin/apps.py", line 24, in ready
    self.module.autodiscover()
  File "/home/unracer/radius-dev/lib/python3.6/site-packages/django/contrib/admin/__init__.py", line 26, in autodiscover
    autodiscover_modules('admin', register_to=site)
  File "/home/unracer/radius-dev/lib/python3.6/site-packages/django/utils/module_loading.py", line 47, in autodiscover_module
    import_module('%s.%s' % (app_config.name, module_to_search))
  File "/home/unracer/radius-dev/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/unracer/radius-dev/src/django-freeradius/django_freeradius/admin.py", line 6, in <module>
    from .base.admin import (
  File "/home/unracer/radius-dev/src/django-freeradius/django_freeradius/base/admin.py", line 9, in <module>
    from openwisp_utils.admin import ReadOnlyAdmin, TimeReadonlyAdminMixin
ImportError: cannot import name 'ReadOnlyAdmin'

A Stanley

unread,
Jul 14, 2019, 10:12:15 AM7/14/19
to open...@googlegroups.com
I believe its an issue with the requirements file and openwisp utils.  When I was having the same issue I had to pull from the master branch of openwisp-utils in my req file.

--
You received this message because you are subscribed to the Google Groups "OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openwisp+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/openwisp/228b0865-3c39-4812-98e5-8cf067b31e2b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

A Stanley

unread,
Jul 14, 2019, 10:19:31 AM7/14/19
to open...@googlegroups.com
Its this commit to master thats missing from the latest release on PyPi.

A Stanley

unread,
Jul 14, 2019, 10:30:13 AM7/14/19
to open...@googlegroups.com
Sorry for multiple posts but heres the Dockerfile Im using to build Django Freeradius. 


Also the pull request for the official Docker image is pending.


unracer

unread,
Jul 14, 2019, 2:46:03 PM7/14/19
to OpenWISP
You nailed it. After
1) deleting the line:
openwisp-utils[qa]>=0.2.1
from the requirements file and
2) installing openwisp-utils in this way:

I can happily run the migration. Thank you 2stacks!
Reply all
Reply to author
Forward
0 new messages