diff --git a/djadmin2/templates/admin2/bootstrap/model_edit_form.html b/djadmin2/templates/admin2/bootstrap/model_edit_form.html index 2fac865..76f8a45 100644 --- a/djadmin2/templates/admin2/bootstrap/model_edit_form.html +++ b/djadmin2/templates/admin2/bootstrap/model_edit_form.html @@ -2,10 +2,21 @@ {% block content %} -
- {% csrf_token %} - {{ form.as_p }} - -
+
+
+

Change {{ model }}

+
+
+ + +
+
+
+ {% csrf_token %} + {{ form.as_p }} + +
+
+
{% endblock content %} diff --git a/djadmin2/views.py b/djadmin2/views.py index 0b4cb41..5cf8c83 100644 --- a/djadmin2/views.py +++ b/djadmin2/views.py @@ -113,6 +113,11 @@ class ModelEditFormView(AdminModel2Mixin, generic.UpdateView): default_template_name = "model_edit_form.html" permission_type = 'change' + def get_context_data(self, **kwargs): + context = super(ModelEditFormView, self).get_context_data(**kwargs) + context['model'] = self.get_model()._meta.verbose_name + return context + class ModelAddFormView(AdminModel2Mixin, generic.CreateView): form_class = None