edit form save almost working
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
{% block nav -%}
|
||||
<a href="/">Home</a>
|
||||
<a href="/object/update/{{object.id}}">Edit</a>
|
||||
{%- endblock %}
|
||||
|
||||
{% block content -%}
|
||||
@@ -35,7 +36,7 @@
|
||||
<ul>
|
||||
{% for instance in relation.instances %}
|
||||
<li>
|
||||
<b>{{instance.related.name}}</b>
|
||||
<b><a href="/object/detail/{{instance.related.id}}">{{instance.related.name}}</a></b>
|
||||
|
||||
{% if instance.properties %}
|
||||
<br>
|
||||
@@ -61,4 +62,37 @@
|
||||
|
||||
{% endfor %}
|
||||
|
||||
|
||||
|
||||
{% for relation in reciprocal_relations %}
|
||||
<h3>{{relation.model.reciprocal_name}}</h3>
|
||||
|
||||
<ul>
|
||||
{% for instance in relation.instances %}
|
||||
<li>
|
||||
<b><a href="/object/detail/{{instance.related.id}}">{{instance.related.name}}</a></b>
|
||||
|
||||
{% if instance.properties %}
|
||||
<br>
|
||||
<small>
|
||||
{% for property in instance.properties %}
|
||||
{%- if 0 != loop.index0 -%}
|
||||
;
|
||||
{%- endif -%}
|
||||
{% for value in property.values %}
|
||||
{%- if loop.first -%}
|
||||
<i>{{ property.model.name }}:</i>
|
||||
{%- else -%}
|
||||
,
|
||||
{% endif -%}
|
||||
{{ value.value | print_typed_value }}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</small>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endfor %}
|
||||
|
||||
{%- endblock %}
|
||||
|
||||
Reference in New Issue
Block a user