Stan Redoute Stan Redoute - 9 months ago 94
Python Question

Deleting 'models.py' from Django app

In a project, I'm implementing using

Django
framework, I have two applications:


  1. Application responsible for REST API, containing production
    models.py
    file.

  2. Application responsible for Web client, that uses REST API's models.



Both of them contain vast static files and hierarchy of additional source code, that is why it came to my mind to split this responsibilities into two apps, rather than different
views.py
and
urls.py
files inside of one application.

Because application responsible for Web relies entirely on REST API's models is it a good practice to delete
models.py
file from this application entirely?

Answer Source

The file is only generated for your convenience. If you don't need it, there's no reason to keep it. No part of Django relies on it being present.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download