
import os
import sys

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

    from django.core.management import execute_from_command_line

    execute_from_command_line(sys.argv)


import os
import os.path
import sys

if __name__ == "__main__":

    #Include parent directory in the path by default
    path = os.path.abspath('../')
    if path not in sys.path:
        sys.path.append(path)

    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "observatory.settings")

    from django.core.management import execute_from_command_line

    execute_from_command_line(sys.argv)

Add parent directory in path by default
Add parent directory in path by default

  
  import os
+ import os.path
  import sys
  
  if __name__ == "__main__":
+ 
+     #Include parent directory in the path by default
+     path = os.path.abspath('../')
+     if path not in sys.path:
+         sys.path.append(path)
+ 
-     os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
+     os.environ.setdefault("DJANGO_SETTINGS_MODULE", "observatory.settings")
  
      from django.core.management import execute_from_command_line
  
      execute_from_command_line(sys.argv)
  
Add parent directory in path by default
## Code Before:

import os
import sys

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

    from django.core.management import execute_from_command_line

    execute_from_command_line(sys.argv)

## Instruction:
Add parent directory in path by default
## Code After:

import os
import os.path
import sys

if __name__ == "__main__":

    #Include parent directory in the path by default
    path = os.path.abspath('../')
    if path not in sys.path:
        sys.path.append(path)

    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "observatory.settings")

    from django.core.management import execute_from_command_line

    execute_from_command_line(sys.argv)
