Multiple django sites on Apache / Windows / mod_wsgi - problem with win32

前端 未结 5 454
一向
一向 2020-12-19 07:09

I have two django sites that use the same database and share some of the code. The main parent site is an extranet for staff and contractors, while the second site exposes s

5条回答
  •  [愿得一人]
    2020-12-19 07:49

    I ran into this on version 217, but I needed pywin32. Implementing fix from here https://stackoverflow.com/a/10928148/80516 seems to work.

    Bug is reported, but not resolved:

    https://sourceforge.net/tracker/?func=detail&aid=2905909&group_id=78018&atid=551954

    Temporary solution is comment out two lines in win32/lib/pywintypes.py:

    if sys.version_info < (3,0):
        #next two lines are problematic!!!!!
        #assert sys.modules[modname] is old_mod 
        #assert mod is old_mod
        pass
    else:
        assert sys.modules[modname] is not old_mod
        assert sys.modules[modname] is mod
        # as above - re-reset to the *old* module object then update globs.
        sys.modules[modname] = old_mod
        globs.update(mod.__dict__)
    

提交回复
热议问题