Rather than querying a local database I would like to use an external API to retrieve the data to display in the django admin. For simplicities sake I have a model, and plan to retrieve a list of names from the API:
class Person(models.Model):
first_name = models.CharField()
last_name = models.CharField()
class Meta:
managed = False
As it is not managed it therefore does not create the person table. What is the order of functions I must override in ModelAdmin to
- Perform the API call instead of the database lookup
- Output the data to a default table in the admin (with first name and last name)
- Disable functions such as to add (as this will just be a lookup table)
- Use the django admin search to query the external api - ie. perform a new request and display the new data.