merge from @rivo

This commit is contained in:
Daniel Greenfeld 2013-05-19 09:53:37 +02:00
parent e963553361
commit 29fc882c4b
3 changed files with 29 additions and 17 deletions

View file

@ -45,7 +45,7 @@ class Admin2(object):
def get_urls(self):
urlpatterns = patterns('',
url(r'^$', self.index_view.as_view(**self.get_index_kwargs()), name='index'),
url(r'^$', self.index_view.as_view(**self.get_index_kwargs()), name='dashboard'),
)
for model, modeladmin in self.registry.iteritems():
app_label = model._meta.app_label

View file

@ -1,21 +1,33 @@
<!DOCTYPE html>
<html>
<head>
<title>django-admin2</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap -->
<link href="{{ STATIC_URL }}themes/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
</head>
<body>
<div class="container-fluid">
{% block content %}{% endblock %}
<head>
<meta charset="utf-8">
<a href="{% url 'admin2:index' %}">Index</a>
</div>
<title>django-admin2</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap -->
<link href="{{ STATIC_URL }}themes/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
</head>
<body>
<div class="navbar navbar-inverse navbar-static-top">
<div class="navbar-inner">
<div class="container-fluid">
<a class="brand" href="{% url 'admin2:dashboard' %}">Django-Admin2</a>
<script src="http://code.jquery.com/jquery.js"></script>
<script src="{{ STATIC_URL }}themes/bootstrap/js/bootstrap.min.js"></script>
{% block extrajs %}{% endblock %}
<ul class="nav pull-right">
<li><a href="TODO">Log out</a></li>
</ul>
</div>
</div>
</div>
</body>
<div class="container-fluid">
{% block content %}{% endblock %}
</div>
<script src="http://code.jquery.com/jquery.js"></script>
<script src="{{ STATIC_URL }}themes/bootstrap/js/bootstrap.min.js"></script>
{% block extrajs %}{% endblock %}
</body>
</html>

View file

@ -129,5 +129,5 @@ class ModelAddFormView(AdminModel2Mixin, generic.CreateView):
class ModelDeleteView(AdminModel2Mixin, generic.DeleteView):
success_url = "../../"
default_template_name = "model_delete.html"
default_template_name = "model_delete_form.html"
permission_type = 'delete'