If you want to retrieve the model name associated with a ModelForm in Django, you can do so by accessing the Meta
class of the form. Here's how you can achieve this:
# templatetags/form_tags.py
from django import template
register = template.Library()
@register.simple_tag
def get_model_name(form):
return form._meta.model.__name__