title: How to properly runserver on different settings for Django?
body: <p>I have a basic django rest API. I want to separate some of my settings for dev and prod just for organizational purposes. I'm also just learning about separating environments. I've read a few things, but I can't seem to get it working the way I want it to.</p>
  
  <p>The hierarchy looks like this:</p>
  
  <pre><code>- djangorest
    - api
      - __init__.py
      - models.py
      - views.py
      - urls.py
      - etc..
    - djangorest
      - __init__.py
      - settings.py
      - urls.py
      - wsgi.py
  </code></pre>
  
  <p>Right now, when I run the server, I do a simple:</p>
  
  <pre><code>python3 manage.py runserver
  </code></pre>
  
  <p>That command reads the settings from settings.py and runs it appropriately but I've looked around on how to separate the settings into prod vs dev and it doesn't work right.</p>
  
  <p>I want to be able to have:</p>
  
  <pre><code>commonsettings.py
  dev.py
  prod.py
  </code></pre>
  
  <p>In commonsettings, it'll just have whatever's in both dev and prod. I've tried running:</p>
  
  <pre><code>python3 manage.py runserver --settings=settings.dev
  </code></pre>
  
  <p>But it gives me an error saying there is no module named 'setting'.</p>
  
  <p>Please help. Thank you!</p>