Skip to content

Instantly share code, notes, and snippets.

@ikedumancas
Created June 9, 2018 19:21
Show Gist options
  • Select an option

  • Save ikedumancas/906bdd5308d97478b81a4ce10a5f91e8 to your computer and use it in GitHub Desktop.

Select an option

Save ikedumancas/906bdd5308d97478b81a4ce10a5f91e8 to your computer and use it in GitHub Desktop.
Django Admin: Change ModelAdmin method string representation with short_description
class SampleModelAdmin(admin.ModelAdmin):
def sample_method_you_want_to_display_in_admin_fields(self, obj):
...
return something
sample_method_you_want_to_display_in_admin_fields.short_description = "Text you want to Show as Label"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment