Guest User

Untitled

a guest
Feb 21st, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.50 KB | None | 0 0
  1. $ pwd
  2. /Users/my_user/my_django_project
  3.  
  4. $ ls -R
  5. ./MySite:
  6. __init__.py migration_settings.py urls.py
  7. local_settings.py settings.py wsgi.py
  8.  
  9. ./app1:
  10. <blah> <blah> <blah>
  11.  
  12. ./app2:
  13. <blah> <blah> <blah>
  14.  
  15. ./app3:
  16. <blah> <blah> <blah>
  17.  
  18. $ ./manage.py runserver --settings=MySite.local_settings 0.0.0.0:8000
  19.  
  20. $ pwd
  21. /Users/my_user/my_django_project
  22.  
  23. $ gunicorn -v
  24. gunicorn (version 19.7.1)
  25.  
  26. $ DJANGO_SETTINGS_MODULE=MySite.local_settings gunicorn MySite.wsgi:application --log-file=-
  27.  
  28. [2018-02-21 19:26:01 -0500] [9038] [INFO] Starting gunicorn 19.7.1
  29. [2018-02-21 19:26:01 -0500] [9038] [INFO] Listening at: http://127.0.0.1:8000 (9038)
  30. [2018-02-21 19:26:01 -0500] [9038] [INFO] Using worker: sync
  31. [2018-02-21 19:26:01 -0500] [9041] [INFO] Booting worker with pid: 9041
  32. [2018-02-21 19:26:01 -0500] [9041] [ERROR] Exception in worker process
  33. Traceback (most recent call last):
  34. File "/Library/Python/2.7/site-packages/gunicorn/arbiter.py", line 578, in spawn_worker
  35. worker.init_process()
  36. File "/Library/Python/2.7/site-packages/gunicorn/workers/base.py", line 126, in init_process
  37. self.load_wsgi()
  38. File "/Library/Python/2.7/site-packages/gunicorn/workers/base.py", line 135, in load_wsgi
  39. self.wsgi = self.app.wsgi()
  40. File "/Library/Python/2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
  41. self.callable = self.load()
  42. File "/Library/Python/2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
  43. return self.load_wsgiapp()
  44. File "/Library/Python/2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
  45. return util.import_app(self.app_uri)
  46. File "/Library/Python/2.7/site-packages/gunicorn/util.py", line 352, in import_app
  47. __import__(module)
  48. File "/Users/my_user/my_django_project/MySite/wsgi.py", line 13, in <module>
  49. from django.core.wsgi import get_wsgi_application
  50. ImportError: No module named django.core.wsgi
  51. [2018-02-21 19:26:01 -0500] [9041] [INFO] Worker exiting (pid: 9041)
  52. [2018-02-21 19:26:01 -0500] [9038] [INFO] Shutting down: Master
  53. [2018-02-21 19:26:01 -0500] [9038] [INFO] Reason: Worker failed to boot.
  54.  
  55. $ pip install django
  56. Requirement already satisfied: django in /Users/my_user/my_virtual_env/lib/python2.7/site-packages
  57.  
  58.  
  59. $ python
  60. Python 2.7.10 (default, Feb 7 2017, 00:08:15)
  61. [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin
  62. Type "help", "copyright", "credits" or "license" for more information.
  63. >>> import django
  64. >>> import django.core
  65. >>> import django.core.wsgi
  66. >>> from django.core.wsgi import get_wsgi_application
  67. >>>
Add Comment
Please, Sign In to add comment