How I'm be able to query a multiple data in single model?

How do I able to query if have three Car Models Car A, Car B andCar C and I wanted to switch this position base on their ordering? How do I able to perform that and what class based view should I use or just a function-based view?

Original DB : Car A --> Car B --> Car C

Alter DB : Car C --> Car B --> Car A

class CarColor(models.Model):
        colors = models.CharField(max_length=50)
        def __str__(self) -> str:
            return self.colors
    class Car(models.Model):
        car_name = models.CharField(max_length=50)
        car_model = models.CharField(max_length=200)
        car_description = models.TextField(max_length=200)
        car_color = models.ForeignKey(CarColor, on_delete=models.CASCADE)
        car_image = models.ImageField(null=True, blank=True, upload_to='media', default='imageholder.png')
        date_manufactured = models.DateTimeField(auto_now_add=True)
        def get_absolute_url(self):
            """ After creating or updating a Car, this function will be triggered and redirection using reverse"""
            return reverse("car_detail", kwargs={"pk":})
        class Meta:
            ordering = ['date_manufactured']
        def __str__(self):
            return f'{self.car_name}'
Back to Top