Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to disable absolute url in Django admin? #70

Open
agusmakmun opened this issue Nov 9, 2021 · 0 comments
Open

How to disable absolute url in Django admin? #70

agusmakmun opened this issue Nov 9, 2021 · 0 comments
Labels

Comments

@agusmakmun
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant