title: Order by name with number Django
body: <p>I have approximately 500 device objects in an sqlite db, with a <code>name</code> field such as:</p>
  <pre><code>Device-0
  Device-1
  Device-2
  Device-3
  ...
  ...
  Device-500
  </code></pre>
  <p>When listing these with django, I want it to list based on the number after the semicolon in the name, as shown above.</p>
  <p>I tried:</p>
  <pre><code>queryset = Device.objects.all().order_by('name')
  </code></pre>
  <p>Also from this <a href="https://stackoverflow.com/questions/2969348/django-ordering-numerical-value-with-order-by">question</a>:</p>
  <pre><code>queryset = Device.objects.annotate(int_sort=Cast(&quot;name&quot;, IntegerField())).order_by(&quot;int_sort&quot;, &quot;name&quot;)
  </code></pre>
  <p>Both of these produce this result:</p>
  <pre><code>Device-0
  Device-1
  Device-10
  Device-100
  Device-101
  ...
  </code></pre>
  <p>Any help would be greatly appreciated.</p>