Restores missing object_detail template.

This commit is contained in:
Johnny 2018-10-26 23:27:54 +00:00
parent e6899e9c0a
commit 661f34f25e
2 changed files with 45 additions and 0 deletions

View file

@ -0,0 +1,42 @@
{% extends "base.html" %}
{% block titleblock %}
{{ view.page_title }} ({{ object }})
{% endblock %}
{% block content %}
{% load addclass %}
<div class="row">
<div class="col">
<div class="card">
<div class="card-body">
<h1 class="card-title">{{ view.page_title }}</h1>
<hr />
<div class="row">
<!-- left/avatar column -->
<div class="col-lg-3 col-sm-12">
<img class="d-flex mr-3" src="http://placehold.jp/250x250.png" alt="Image of {{ object }}">
</div>
<!-- end left/avatar column -->
<!-- right/content column -->
<div class="col-lg-9 col-sm-12">
<dl>
{% for attribute, value in attribute_list.items %}
<dt>{{ attribute }}</dt>
<dd>{{ value }}</dd>
{% endfor %}
</dl>
</div>
<!-- end right/content column -->
</div>
</div>
</div>
</div>
</div>
{% endblock %}

View file

@ -659,6 +659,9 @@ class CharacterDetailView(CharacterMixin, ObjectDetailView):
a character, owned by them or not.
"""
# -- Django constructs --
template_name = 'website/object_detail.html'
# -- Evennia constructs --
# What attributes to display for this object
attributes = ['name', 'desc']