import os
import sys

import dotenv

dotenv.read_dotenv()

if __name__ == "__main__":
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "opencanada.settings")

    from django.core.management import execute_from_command_line

    execute_from_command_line(sys.argv)

import os
import sys
import warnings

import dotenv

with warnings.catch_warnings():
    warnings.simplefilter("ignore")
    dotenv.read_dotenv()

if __name__ == "__main__":
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "opencanada.settings")

    from django.core.management import execute_from_command_line

    execute_from_command_line(sys.argv)

Disable the warning about .env files not being present.
Disable the warning about .env files not being present.

  import os
  import sys
+ import warnings
  
  import dotenv
  
+ with warnings.catch_warnings():
+     warnings.simplefilter("ignore")
- dotenv.read_dotenv()
+     dotenv.read_dotenv()
  
  if __name__ == "__main__":
      os.environ.setdefault("DJANGO_SETTINGS_MODULE", "opencanada.settings")
  
      from django.core.management import execute_from_command_line
  
      execute_from_command_line(sys.argv)
  
Disable the warning about .env files not being present.
## Code Before:
import os
import sys

import dotenv

dotenv.read_dotenv()

if __name__ == "__main__":
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "opencanada.settings")

    from django.core.management import execute_from_command_line

    execute_from_command_line(sys.argv)

## Instruction:
Disable the warning about .env files not being present.
## Code After:
import os
import sys
import warnings

import dotenv

with warnings.catch_warnings():
    warnings.simplefilter("ignore")
    dotenv.read_dotenv()

if __name__ == "__main__":
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "opencanada.settings")

    from django.core.management import execute_from_command_line

    execute_from_command_line(sys.argv)
