title: How to make custom url prefix in django
body: <p>Have a little problem, tried to google it, but get nothing.
  What I need:
  Configure a URL for app in Django, like this:</p>
  
  <pre><code>/myproject/myapp/models.py
  class MyApp(models.Model):
      name = models.CharField()
      ....
  
  /myproject/myapp/views.py
  def make_something_with_app(app_id):
      # will make smthing cool
  </code></pre>
  
  <p>Let's think, my site has a <code>"example.com"</code> address, and we have two objects in DB from <code>MyApp model - app1(id=0), app2(id=1)</code>.
  So, what I need?
  When we go to the <code>app1.example.com</code>, we call <code>make_something_with_app(0)</code>, and when we go to the <code>app2.example.co</code>m, we call <code>make_something_with_app(1)</code></p>
  
  <p>Is there a way to make it? Thanks.</p>