Ticket #21280

WSGI対応

Eröffnet am: 2010-04-04 07:04 Letztes Update: 2011-03-21 15:07

Auswertung:
Verantwortlicher:
Status:
Geschlossen
Komponente:
Meilenstein:
(Keine)
Priorität:
5 - Mittel
Schweregrad:
5 - Mittel
Lösung:
Gefixt
Datei:
Keine

Details

WSGIに対応して欲しい。

Ticket-Verlauf (3/3 Historien)

2010-04-04 07:04 Aktualisiert von: okamototk
  • New Ticket "WSGI対応" created
2010-04-09 21:55 Aktualisiert von: jun66j5
Kommentar

trac/admin/templates/deploy_trac.wsgi を参考に ↓ のような感じで dispatch_request を挿げ替えて...

  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Copyright (C)2008-2009 Edgewall Software
  5. # Copyright (C) 2008 Noah Kantrowitz <noah@coderanger.net>
  6. # All rights reserved.
  7. #
  8. # This software is licensed as described in the file COPYING, which
  9. # you should have received as part of this distribution. The terms
  10. # are also available at http://trac.edgewall.org/wiki/TracLicense.
  11. #
  12. # This software consists of voluntary contributions made by many
  13. # individuals. For the exact contribution history, see the revision
  14. # history and logs, available at http://trac.edgewall.org/log/.
  15. #
  16. # Author: Noah Kantrowitz <noah@coderanger.net>
  17. import os
  18. def application(environ, start_request):
  19. if not 'trac.env_path_parent_dir' in environ:
  20. environ.setdefault('trac.env_path', '${env.path}')
  21. if 'PYTHON_EGG_CACHE' in environ:
  22. os.environ['PYTHON_EGG_CACHE'] = environ['PYTHON_EGG_CACHE']
  23. elif 'trac.env_path' in environ:
  24. os.environ['PYTHON_EGG_CACHE'] = os.path.join(environ['trac.env_path'],
  25. '.egg-cache')
  26. elif 'trac.env_path_parent_dir' in environ:
  27. os.environ['PYTHON_EGG_CACHE'] = os.path.join(environ['trac.env_path_parent_dir'],
  28. '.egg-cache')
  29. from tram.main import dispatch_request
  30. return dispatch_request(environ, start_request)
あとはこのファイルを http://trac.edgewall.org/wiki/TracModWSGI の要領で設置すれば動作すると思います。

2011-03-21 15:07 Aktualisiert von: okamototk
  • Lösung Update from Keine to Gefixt
  • Status Update from Offen to Geschlossen
  • Ticket Close date is changed to 2011-03-21 15:07
Kommentar

TraMのgenshi-jaブランチに追加しました(たいぶ前ですが....)。あとREADME.jaに使い方を追記しました。

Dateianhangliste

Keine Anhänge

Bearbeiten

Please login to add comment to this ticket » Anmelden