예제 #1
0
 def default_change_form_template(self):
     """
     Determine what the actual `change_form_template` should be.
     """
     opts = self.model._meta
     app_label = opts.app_label
     return select_template_name((
         "admin/{0}/{1}/change_form.html".format(app_label, opts.object_name.lower()),
         "admin/{0}/change_form.html".format(app_label),
         "admin/change_form.html"
     ))
예제 #2
0
 def default_change_form_template(self):
     """
     Determine what the actual `change_form_template` should be.
     """
     opts = self.model._meta
     app_label = opts.app_label
     return select_template_name((
         f"admin/{app_label}/{opts.object_name.lower()}/change_form.html",
         f"admin/{app_label}/change_form.html",
         "admin/change_form.html",
     ))
예제 #3
0
 def default_change_form_template(self):
     """
     Determine what the actual `change_form_template` should be.
     """
     opts = self.model._meta
     app_label = opts.app_label
     return select_template_name(
         ("admin/{0}/{1}/change_form.html".format(app_label,
                                                  opts.object_name.lower()),
          "admin/{0}/change_form.html".format(app_label),
          "admin/change_form.html"))