
from django.db import models


DIRECTION_CHOICES = (
    ("I", "Incoming"),
    ("O", "Outgoing"))


class HttpTesterMessage(models.Model):
    direction = models.CharField(max_length=1, choices=DIRECTION_CHOICES)
    identity = models.CharField(max_length=100)
    text = models.TextField()


from django.db import models


DIRECTION_CHOICES = (
    ("I", "Incoming"),
    ("O", "Outgoing"))


class HttpTesterMessage(models.Model):
    direction = models.CharField(max_length=1, choices=DIRECTION_CHOICES)
    identity = models.CharField(max_length=100)
    text = models.TextField()

    class Meta(object):
        # Ordering by id will order by when they were created, which is
        # typically what we want
        ordering = ['id']

Sort HTTP Tester Message model by id so they'll naturally be displayed in the order they were added. Branch: feature/httptester-update
Sort HTTP Tester Message model by id so they'll naturally be displayed in the order they were added.
Branch: feature/httptester-update

  
  from django.db import models
  
  
  DIRECTION_CHOICES = (
      ("I", "Incoming"),
      ("O", "Outgoing"))
  
  
  class HttpTesterMessage(models.Model):
      direction = models.CharField(max_length=1, choices=DIRECTION_CHOICES)
      identity = models.CharField(max_length=100)
      text = models.TextField()
  
+     class Meta(object):
+         # Ordering by id will order by when they were created, which is
+         # typically what we want
+         ordering = ['id']
+ 
Sort HTTP Tester Message model by id so they'll naturally be displayed in the order they were added. Branch: feature/httptester-update
## Code Before:

from django.db import models


DIRECTION_CHOICES = (
    ("I", "Incoming"),
    ("O", "Outgoing"))


class HttpTesterMessage(models.Model):
    direction = models.CharField(max_length=1, choices=DIRECTION_CHOICES)
    identity = models.CharField(max_length=100)
    text = models.TextField()

## Instruction:
Sort HTTP Tester Message model by id so they'll naturally be displayed in the order they were added. Branch: feature/httptester-update
## Code After:

from django.db import models


DIRECTION_CHOICES = (
    ("I", "Incoming"),
    ("O", "Outgoing"))


class HttpTesterMessage(models.Model):
    direction = models.CharField(max_length=1, choices=DIRECTION_CHOICES)
    identity = models.CharField(max_length=100)
    text = models.TextField()

    class Meta(object):
        # Ordering by id will order by when they were created, which is
        # typically what we want
        ordering = ['id']
