title: Django url with IP address
body: <p>I want to make this URL pattern works : <a href="http://myapp.com/api/ipaddress/username" rel="nofollow noreferrer">http://myapp.com/api/ipaddress/username</a> where IP address is an IPv4 and username is the account of a django user.</p>
  
  <p>What is the good regex format to do this at url.py ?</p>
  
  <pre><code>urlpatterns = [
      url(r'^$', view_api, name='api'),
      url(r'^(?P&lt;ip&gt;[0-9.])/(?P&lt;username&gt;\w+)/$', view_ip_check_user, name='ip_check_user'),
  ]
  </code></pre>