1

How to display data from external service in Django admin?Rather than querying a local database I would like to use an external API to retrieve the data to display in the django admin

class Order(models.Model):

service = models.ForeignKey('Service', on_delete=models.CASCADE, related_name='orders')
number = models.CharField(...)
creation_date = models.DateTimeField(...)
...

@register(Order,site=admin_site)

class OrderAdmin(ImportExportMixin, SimpleHistoryAdmin):

  1. Perform the API call instead of the database lookup and show data from API in orders model in admin panel.

Is there any way to achieve this

1 Answers1

0

May be dadfes ?

Check out demo app

estin
  • 3,051
  • 1
  • 24
  • 31