I registered an app to the django admin with:
from django.contrib import admin
from MyProject.myapp.models import Model1, Model2
class HyperlinkAdmin(admin.ModelAdmin):
pass
class Model2Admin(admin.ModelAdmin):
pass
admin.site.register(Hyperlink, HyperlinkAdmin)
admin.site.register(Model2, Model2Admin)
Model1=
class Hyperlink(models.Model):
url = models.URLField()
Now when I go to admin/myapp change page I see:
Hyperlink
Hyperlink object
Hyperlink object
Hyperlink object
Hyperlink object
Hyperlink object
I would like to display the name of my URL instead of "Hyperlink object" which does not tell me anything about the link behind that.
How can I achieve this?
Thanks for the time!