Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

trac.wsgi 982 B

123456789101112131415161718192021222324252627
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # Copyright (C) 2008 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. import tempfile
  19. from trac.web.main import dispatch_request
  20. import pkg_resources
  21. def application(environ, start_request):
  22. environ['trac.env_path'] = '/srv/caca.zoy.org/var/lib/trac-test'
  23. if 'PYTHON_EGG_CACHE' not in os.environ:
  24. pkg_resources.set_extraction_path(tempfile.gettempdir())
  25. return dispatch_request(environ, start_request)