Index work

This commit is contained in:
Daniel Greenfeld 2013-05-18 18:33:43 +02:00
parent f5f94c352c
commit e48641cde9
5 changed files with 2 additions and 37 deletions

View file

@ -153,7 +153,7 @@ class ModelAdmin2(BaseAdmin2):
name='index'
),
url(
regex=r'^create/$',
regex=r'^create/$',
view=self.create_view.as_view(**self.get_create_kwargs()),
name='create'
),

View file

@ -4,7 +4,7 @@
<h1>Index</h1>
<table>
{% for modeladmin in registry.values %}
<tr><td>{{ modeladmin.verbose_name_plural }}</td></tr>
<tr><td><a href="">{{ modeladmin.verbose_name_plural }}</a></td></tr>
{% endfor %}
</table>
{% endblock content %}

View file

@ -1,10 +0,0 @@
<html>
<body>
{% block content %}
{% endblock content %}
</body>
</html>

View file

@ -1,25 +0,0 @@
{% extends "admin2/monkey/base.html" %}
{% block content %}
{% for app in object_list %}
<table class="table table-bordered table-striped">
<thead>
<tr>
<th colspan=3>{{ app.app_name.title }}</th>
</tr>
</thead>
<tbody>
{% for model in app.obj.models %}
<tr>
<td>{{ model.name }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endfor %}
{% endblock content %}