title: Using the reserved word "class" as field name in Django and Django REST Framework
body: <h1>Description of the problem</h1>
  
  <p>Taxonomy is the science of defining and naming groups of biological organisms on the basis of shared characteristics. Organisms are grouped together into taxa (singular: taxon) and these groups are given a taxonomic rank. The principal ranks in modern use are domain, kingdom, phylum, class, order, family, genus and species.
  More information on <a href="https://en.wikipedia.org/wiki/Taxonomy_(biology)" rel="noreferrer">Taxonomy</a> and <a href="https://en.wikipedia.org/wiki/Taxonomic_rank" rel="noreferrer">Taxonomic ranks</a> in Wikipedia.</p>
  
  <p>Following the example for the <strong>red fox</strong> in the article <strong>Taxonomic rank</strong> in <em>Wikipedia</em> I need to create a JSON output like this:</p>
  
  <pre><code>{
      "species": "vulpes",
      "genus": "Vulpes",
      "family": "Canidae",
      "order": "Carnivora",
      "<b>class</b>": "Mammalia",
      "phylum": "Chordata",
      "kingdom": "Animalia",
      "domain": "Eukarya"
  }
  </code></pre>
  
  <p>Since Django REST Framework creates the keys based on the field names, the problem arises with the taxonomic rank <strong>class</strong> (bold in the example) as it is a reserved word in Python and can't be used as a variable name.</p>
  
  <h1>What I have tried</h1>
  
  <p>A model class created in Django would look like this:</p>
  
  <pre><code>class Species(models.Model):
      species = models.CharField()
      genus = models.CharField()
      family = models.CharField()
      # class = models.CharField() - class is reserved word in Python
      # class_ = models.CharField() - Django doesn't allow field names
      # ending with underscore. That wouldn't be either a satisfying solution.
      # further fields
  </code></pre>
  
  <h1>Question</h1>
  
  <p>Is there any possible way to solve this problem and generate the desired output?
  If not, what is the best practice to work around this problem?</p>