Skip to content

How to disable absolute url in Django admin? #70

@agusmakmun

Description

@agusmakmun

I have an error TemplateDoesNotExist, after checking out the root cause is the models has get_absolute_url, meanwhile that view doesn't have any templates found.

def get_absolute_url(self):
    return reverse("pinax_announcements:announcement_detail", args=[self.pk])

As docs said https://github.com/pinax/pinax-announcements#templates:

Default templates are provided by the pinax-templates app in the announcements section of that project.

Meanwhile, in my case I don't really need this template, because I'm just using default Django admin to reach out the announcements.

So, what I'm thinking is, probably we can just disable the View on site button or maybe can also disable/remove the get_absolute_url in admin page. But, how I can achieve this?

Let say, not just focus on pinax-announcements, this probably happens in another case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions