Ich benutze ein Tutorial Repo, und jetzt, dass ich es zu einer EC2-Instanz bereitstellen will funktioniert es Hier ist das Repo, das einzige, was ich hinzugefügt habe, war die ec2-54-197-26- 105.compute-1.amazonaws.comBereitstellen von Django App
zu zulässigen Host. Ich habe das Beispiel links laufen, so dass Sie es ec2-54-197-26-105.compute-1.amazonaws.com
zugreifen könnenREPO https://bitbucket.org/trackstarz/clab Hier ist die Ausgabe
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>
Ich bin nicht sicher, wo ich hier anfangen soll. requirement.txt hat folgende django django-Klammern gunicorn
Vielen Dank im Voraus.
Sie haben einen Fehler in Ihrer Vorlage in Zeile 16. Der Fehler ist klar. –