title: Deconfiguration of the DJANGO_SETTINGS_MODULE variable (irreparable)
body: <p>The fact is that I have a VPS in Digital Ocean with Ubuntu 18.04. I installed everything necessary starting with the typical apt update and upgrade, then pip, virtualenvwrapper, django and postgresql, started with runserver and tried in the browser the django and django-admin test page, all perfect for a few days.</p>
  
  <p>After a few days, I upgraded my system again with apt update and upgrade, and the django application stopped working, with the error <strong>"You must either define the variable DJANGO_SETTINGS_MODULE variable or call settings.configure () before accessing settings. "</strong></p>
  
  <p>I have tried many things without finding the solution; I have reinstalled virtualenvwraper, django, virtual environments and project, but it still does not work as before.
  I have also tried to assign the variable manually with  <strong>export DJANGO_SETTINGS_MODULE = settings</strong> and it says that the module can not be found.</p>
  
  <p>Any idea of ​​what has happened to my system?
  I would like to try all the possibilities before deleting the droplet and reinstalling everything.</p>