mirror of
https://github.com/inventree/InvenTree.git
synced 2026-10-05 18:01:14 +00:00
Reverse url lookup for Part model
This commit is contained in:
1 parent
f9db3b680d
commit
0bc5617825
3 files changed
+23
-4
No files matched your search
@@ -89,7 +89,7 @@ class Part(models.Model):
|
||||
"""
|
||||
|
||||
def get_absolute_url(self):
|
||||
return '/part/{id}/'.format(id=self.id)
|
||||
return reverse('part-detail', kwargs={'pk': self.id})
|
||||
|
||||
# Short name of the part
|
||||
name = models.CharField(max_length=100, unique=True, help_text='Part name (must be unique)')
|
||||
|
||||
Reference in new issue
Block a user