<p>I am trying to mock-up an API and am using separate apps within Django to represent different web services. I would like App A to take in a link that corresponds to App B and parse the <code>json</code> response. </p>

<p>Is there a way to dynamically construct the url to App B so that I can test the code in development and not change to much before going into production? The problem is that I can't use localhost as part of a link. </p>

<p>I am currently using urllib, but eventually I would like to do something less hacky and better fitting with the web services <code>REST</code> paradigm.</p>

I would only put UI logic in the Form class and put any application logic in its own class:
```
```
class Form1 : Form
 {  
    void Button1_Click
     { 
       Program.DoCommand1();
     }
 }

static class Program
{
  internal static void DoCommand1() {/* ... */}
}
```
```