Hi Amit,

Templates have a many2many relationship to config. The intermediate table
which keeps track of how many config objects a template is assigned to does
not have a model defined, because in most cases it's not needed and it's
handled automatically by django, except some special cases in which
additional fields need to be added to this intermediate table (we have a
few of those as well).

You'll still be able to do what you need, I suggest you to start with
studying many2many relationships in Django:
https://docs.djangoproject.com/en/3.0/topics/db/examples/many_to_many/

Best regards
Federico

On Fri, Dec 20, 2019 at 9:52 AM Amit Goyal <amitgoya...@gmail.com> wrote:

> Hi Federico
>
> I want to enable API for config_config_template table but I could not find
> any config_config_template model which can be used in urls.py .
> I was checking in 
> */usr/local/lib/python3.6/site-packages/openwisp_controller/config/models.py
> *but there is no class for this table .
>
> even in base* 
> https://github.com/openwisp/django-netjsonconfig/tree/master/django_netjsonconfig/base
> <https://github.com/openwisp/django-netjsonconfig/tree/master/django_netjsonconfig/base>
>  *,
> No base class mentioned for this class .
>
> Can you please suggest what need to be done for enabling api for this
> table . Please share if any reference .
>
> Thanks
> Amit
>
> --
> 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/057c0c9d-de37-4c8e-80a0-470dfea3a496%40googlegroups.com
> <https://groups.google.com/d/msgid/openwisp/057c0c9d-de37-4c8e-80a0-470dfea3a496%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/CAERYH6X%2Bn1S78AHx3TwtLapWNnSCUULoqS49mKncL_FA%3D9cCsg%40mail.gmail.com.

Reply via email to