nach lagem hin und her darf ich mich jetzt doch in django einarbeiten.
soweit klappt auch alles, allerdings habe ich ein problem bei der nutzung von templates.
in der settings.py steht:
Code: Alles auswählen
TEMPLATE_DIRS = (
'/opt/webapps/sshmanager/themes/default'
)
Code: Alles auswählen
def notification(request):
template = loader.get_template("news/note.html")
context = Context({"notification" : Notification.objects.all() })
return HttpResponse(template.render(context))
Code: Alles auswählen
<h1>News-Übersicht</h1>
{% for n in notification.objects.all %}
<div class="kontainer">
<div class="titelzeile">
<div class="titel">{{ n.title|escape }}</div>
<div class="zeitstempel">{{ n.timestamp }}</div>
<div style="clear: both"></div>
</div>
<div class="text">
{{ n.notification|escape|linebreaksbr }}
<div class="link_unten">
<a href="{{ n.id }}/">Details</a>
</div>
</div>
</div>
{% endfor %}
es scheint also, als ob die tags nicht ausgeführt werden. seht ihr da noch einen fehler ?