Use an external REST API in django admin

214 views
Skip to first unread message

micka

unread,
Jul 16, 2018, 10:16:59 AM7/16/18
to Django users
Hello,

I wish I could use the data from an external API in the administration of Django. I wish I could list, read, edit and create objects but instead of using a postgres database, I would use a REST API.
Do you know a module to do it or resources that could help me?

Thank you !

Vijay Khemlani

unread,
Jul 16, 2018, 2:45:36 PM7/16/18
to django...@googlegroups.com
django rest framework would be your best bet


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/49ac56e6-a259-4fce-a8c2-3be2841021c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

mottaz hejaze

unread,
Jul 16, 2018, 10:16:17 PM7/16/18
to django...@googlegroups.com
even REST API needs a database managments system like postgre or mysql

so the lowest layer is postgre or mysql or mongodb 

the upper layer on top of any one of them , your backend REST API 

read about DMS and REST API




mathieu mickael

unread,
Jul 17, 2018, 2:41:44 AM7/17/18
to django...@googlegroups.com
ok thank you very much

2018-07-17 4:15 GMT+02:00 mottaz hejaze <trapp...@gmail.com>:
even REST API needs a database managments system like postgre or mysql

so the lowest layer is postgre or mysql or mongodb 

the upper layer on top of any one of them , your backend REST API 

read about DMS and REST API




On Mon, 16 Jul 2018, 20:44 Vijay Khemlani, <vkhe...@gmail.com> wrote:
django rest framework would be your best bet


On Mon, Jul 16, 2018 at 10:16 AM micka <mickael.m...@gmail.com> wrote:
Hello,

I wish I could use the data from an external API in the administration of Django. I wish I could list, read, edit and create objects but instead of using a postgres database, I would use a REST API.
Do you know a module to do it or resources that could help me?

Thank you !

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.

To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

Derek

unread,
Jul 18, 2018, 2:26:40 AM7/18/18
to Django users
If you were accessing a third-party API you could have a ForeignDataWrapper table linked to it.  I have never tried this, and not sure if this would conflict with Django's ORM expectations.

Melvyn Sopacua

unread,
Jul 18, 2018, 7:24:12 AM7/18/18
to django...@googlegroups.com
On maandag 16 juli 2018 20:36:00 CEST Vijay Khemlani wrote:
> django rest framework would be your best bet
>
> http://www.django-rest-framework.org/

For prosperity:

No, that would not help at all. DRF is used to *provide* an API to others. He
wants to *use* an API as if it was a model. So save would PUT data to a REST
api and not bother with database storage at all.

While possible, you'll have a hard time writing it as nothing in Django's
models is going to be of any help. Getting it to perform well, is also a hard
for a very simple reason: all your saving and loading is going to go over a
network connection. Not to mention figuring out relations...

However, I don't understand your wish: what is the upside of storing data in a
rest api this way?
--
Melvyn Sopacua
Reply all
Reply to author
Forward
0 new messages