Example #1
0
 def get_form(self, form_class=None):
     form = super().get_form(form_class)
     for fld in self.fields:
         form.fields[fld].help_text = getattr(self.object, fld)
     for lt in self.get_link_types():
         k = f'ext_{lt.wikidata_id}'
         form.fields[k] = forms.CharField(
             label=bdtitle(lt), required=False,
             help_text=_("ID only! (do not enter full URL)"))
     return form
Example #2
0
 def get_breadcrumbs(self):
     return (
         self.parent_crumb,
         (bdtitle(self.entity), self.entity.get_absolute_url()),
     )
Example #3
0
def get_roles():
    return ((t.id, bdtitle(t)) for t in Role.objects.order_by('title_he'))
Example #4
0
 def get_breadcrumbs(self):
     return ((bdtitle(self.object), self.object.get_absolute_url()), )
Example #5
0
 def get_title(self):
     return "{}: {}".format(self.action_name, bdtitle(self.object))