I advice against monkey patching, we did a lot of clean up lately and if we
go back to shortcuts we'll soon be filled again with a lot of maintenance
work.

I think we should make the change in the modules to accommodate the
deployment we're implementing in docker-openwisp.
Better to invest in that rather than monkey patching, don't you think? Can
you open an issue in openwisp-utils please?

Can you also open issues to resolve the several monkey patching or
additions done in docker-openwisp so we allow to do those things in the
base openwisp modules?
For example, the celery beat tasks that replicate the management commands.
If we create issues I'm sure new contributors over time will help us out in
case we don't have time to do all of those.

Federico

On Wed, Jan 29, 2020 at 11:19 PM Ajay Tripathi <ajay3...@gmail.com> wrote:

> I want to monkey patch TopologyAdmin to change `receive_url` function,
> for that, I want to access TopologyAdmin.receive_url_querystring_arg,
>
> However, I get
> ```
> AttributeError: type object 'TopologyAdmin' has no attribute
> 'receive_url_querystring_arg'
> ```
>
> 1. I created a new django project
> 2. Follow:
> https://github.com/openwisp/openwisp-network-topology#setup-integrate-in-an-existing-django-project
> 3. Do the following commands in `python manage.py shell`
> ```
>
> from openwisp_utils.admin import ReceiveUrlAdmin
> from openwisp_network_topology.admin import TopologyAdmin
> TopologyAdmin.receive_url_querystring_arg
>
> ```
>
> I tried the same thing inside the network-topology's manage.py shell and
> it worked.
> Is there a different way to access it from a different project?
>
>
>
>
> Thanks,
> Ajay Tripathi
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/openwisp/8666004c-0b8b-44ee-a30b-20844e064ecb%40googlegroups.com
> <https://groups.google.com/d/msgid/openwisp/8666004c-0b8b-44ee-a30b-20844e064ecb%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/openwisp/CAERYH6WXmh80TLiGSA-z8SUA0YX535Sa0%3D9pTak_3k5mLnj1Ag%40mail.gmail.com.

Reply via email to