我正在使用教程回購,現在我想將其部署到EC2實例中,它不起作用 這裏是回購,我添加的唯一東西是ec2-54-197-26- 105.compute-1.amazonaws.com正在部署Django App
允許主機。我已經離開了實例中運行,所以你可以在ec2-54-197-26-105.compute-1.amazonaws.com
REPO https://bitbucket.org/trackstarz/clab 這裏是輸出訪問
KeyError at /accounts/logout
'en-us'
Request Method: GET
Request URL: http://ec2-54-197-26-105.compute-1.amazonaws.com/accounts/logout
Django Version: 1.11.4
Exception Type: KeyError
Exception Value:
'en-us'
Exception Location: /home/ubuntu/clab/denv/local/lib/python2.7/site-packages/django/urls/resolvers.py in reverse_dict, line 335
Python Executable: /home/ubuntu/clab/denv/bin/python
Python Version: 2.7.6
Python Path:
['/home/ubuntu/clab',
'/home/ubuntu/clab/denv/bin',
'/home/ubuntu/clab/denv/lib/python2.7',
'/home/ubuntu/clab/denv/lib/python2.7/plat-x86_64-linux-gnu',
'/home/ubuntu/clab/denv/lib/python2.7/lib-tk',
'/home/ubuntu/clab/denv/lib/python2.7/lib-old',
'/home/ubuntu/clab/denv/lib/python2.7/lib-dynload',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-x86_64-linux-gnu',
'/usr/lib/python2.7/lib-tk',
'/home/ubuntu/clab/denv/local/lib/python2.7/site-packages',
'/home/ubuntu/clab/denv/lib/python2.7/site-packages']
Server time: Sat, 5 Aug 2017 01:58:31 +0000
Error during template rendering
In template /home/ubuntu/clab/courses/templates/base.html, error at line 16
en-us
6 <title>{% block title %}Educa{% endblock %}</title>
7 <link href="{% static "css/base.css" %}" rel="stylesheet">
8 </head>
9 <body>
10 <div id="header">
11 <a href="/" class="logo">Educa</a>
12 <ul class="menu">
13 {% if request.user.is_authenticated %}
14 <li><a href="{% url "logout" %}">Sign out</a></li>
15 {% else %}
16 <li><a href="{% url "login" %}">Sign in</a></li>
我不是確定從哪裏開始。 requirement.txt具有以下 的Django Django的 ,括號 gunicorn
預先感謝您。
您在第16行的模板中有錯誤。錯誤很明顯。 –