Change / modify app labels urls in Django Admin


We can update app labels / application name and urls in Django Admin without change the application name folder. For instance:

1
2
App name : student_insurance
Admin : /student_insurance

What we want:

1
2
App name : student_insurance
Admin : /student-insurance

By:

1
2
3
4
5
6
class YourModel(models.Model):
    ….

    class Meta:
        app_label = string_with_title("student-insurance", "Student Insurance")
        db_table = "stundent_insurance_yourmodel"

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.