title: (Django) Split frontend and backend
body: <p>I want to split front (<a href="http://brunch.io/" rel="nofollow">Brunch</a>) and back (<a href="https://www.djangoproject.com/" rel="nofollow">Django</a>). I have this folder structure:</p>
  
  <pre><code>backend
    mydjangoapp
    static
      mydjangoapp
        image
        javascripts
        stylesheets
        index.html
  
  frontend
    app
    public
      image
      javascripts
      stylesheets
      index.html
  </code></pre>
  
  <p>So for example, path to stylesheet inside <strong>index.html</strong> would be:</p>
  
  <ul>
  <li><strong>[Backend]</strong> <code>static/mydjangoapp/stylesheets/app.css</code></li>
  <li><strong>[Frontend]</strong> <code>/stylesheets/app.css</code></li>
  </ul>
  
  <p>I use <strong>frontend paths</strong> to test frontend locally with brunch server and <strong>backend paths</strong> with django app on deploy. Currently deploy procedure looks like this:</p>
  
  <ol>
  <li>brunch build</li>
  <li>move content of <strong>public</strong> folder to <code>backend/static/mydjangoapp</code></li>
  <li>change all paths inside <strong>index.html</strong>, <strong>app.js</strong> etc. to match backend
  static path.</li>
  </ol>
  
  <p>Not very convenient. Is there a way to do it automatically? I guess i could change static paths in backend to match frontend or write a script to do it. But its not really a proper solution, is it? There must be a way to render <strong>index.html</strong> directly from <strong>frontend</strong> folder and load static files without changing paths. Tried to google it, but no luck.</p>