Import error

18 views
Skip to first unread message

ANSHUL DUTT SHARMA

unread,
Dec 8, 2019, 6:11:28 AM12/8/19
to OpenWISP
Hi, Actually I encountered a problem while solving this issue https://github.com/openwisp/openwisp-utils/issues/42#issue-459047446  and would really appreciate if someone would help. I tried customizing the function but an error shows up saying it cant import the admin_site or any other class that I am writing in the admin.py file inside the admin_theme. Do I need to change some local settings as well because changing anything in the admin.py file isnt reflecting any change in the localhost.
Screenshot from 2019-12-08 16-34-58.png
Screenshot from 2019-12-08 16-38-30.png

Ajay Tripathi

unread,
Dec 8, 2019, 6:58:20 AM12/8/19
to OpenWISP
Hi,

On Sun, Dec 8, 2019 at 4:41 PM ANSHUL DUTT SHARMA <anshul...@gmail.com> wrote:
Hi, Actually I encountered a problem while solving this issue https://github.com/openwisp/openwisp-utils/issues/42#issue-459047446  and would really appreciate if someone would help. I tried customizing the function but an error shows up saying it cant import the admin_site or any other class that I am writing in the admin.py file inside the admin_theme. Do I need to change some local settings as well because changing anything in the admin.py file isnt reflecting any change in the localhost.


The error seems to be a setup related issue. Can you please share what changes cause the error?
( Most probably, running `pip uninstall openwisp_utils; python setup.py develop` will solve it. )



--
Best, 
Ajay Tripathi

ANSHUL DUTT SHARMA

unread,
Dec 8, 2019, 7:06:04 AM12/8/19
to OpenWISP
Hi
I am sending the admin.py file. The commented part is the original code and the non commented part is mine. An error is coming that it cant import the class MyAdminsite neither can it import any other function or admin_site. I will also try resetting up the program and notify
you if it works.
Screenshot from 2019-12-08 17-31-21.png
Message has been deleted

Yousra Younus

unread,
Dec 8, 2019, 7:15:16 AM12/8/19
to open...@googlegroups.com
what is the problem

On Sun, 8 Dec 2019, 4:38 p.m. ANSHUL DUTT SHARMA, <anshul...@gmail.com> wrote:
Actually I wanted to ask if  some change in local settings is required if I change the admin.py file.


On Sunday, December 8, 2019 at 4:41:28 PM UTC+5:30, ANSHUL DUTT SHARMA wrote:
Hi, Actually I encountered a problem while solving this issue https://github.com/openwisp/openwisp-utils/issues/42#issue-459047446  and would really appreciate if someone would help. I tried customizing the function but an error shows up saying it cant import the admin_site or any other class that I am writing in the admin.py file inside the admin_theme. Do I need to change some local settings as well because changing anything in the admin.py file isnt reflecting any change in the localhost.

--
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/7ce2a92f-61fd-48f2-918c-ea54159a7944%40googlegroups.com.

ANSHUL DUTT SHARMA

unread,
Dec 8, 2019, 7:21:54 AM12/8/19
to open...@googlegroups.com
Admin_site or any other function in admin.py file isnt being imported

ANSHUL DUTT SHARMA

unread,
Dec 9, 2019, 4:00:11 AM12/9/19
to open...@googlegroups.com
It worked by resetting up!!


--
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.
Reply all
Reply to author
Forward
0 new messages