Ticket #20109: default-manage-py.patch

File default-manage-py.patch, 755 bytes (added by jamercee, 7 years ago)

django-manage.py patch (git-diff formatted)

  • django/conf/project_template/manage.py

    diff --git a/django/conf/project_template/manage.py b/django/conf/project_template/manage.py
    index 391dd88..656deaf 100755
    a b  
    11#!/usr/bin/env python
     2import inspect
    23import os
    34import sys
    45
    56if __name__ == "__main__":
     7    __script__ = inspect.getfile(inspect.currentframe())
     8    __script__ = os.path.realpath(os.path.abspath(__script__))
     9    __dname__  = os.path.dirname(os.path.dirname(__script__))
     10    if __dname__ not in sys.path:
     11        sys.path.insert(0, __dname__)
     12
    613    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings")
    714
    815    from django.core.management import execute_from_command_line
Back to Top