fix content urls
modified: make_post_sell/models/product.py
This commit is contained in:
parent
909eebfac5
commit
bb95314c0e
1 changed files with 3 additions and 2 deletions
|
|
@ -374,9 +374,10 @@ class Product(RBase, Base):
|
|||
|
||||
https://my.makepostsell.com/p/product-uuid
|
||||
"""
|
||||
p_or_c = "p" if self.is_sellable else "c"
|
||||
if slug:
|
||||
return f"{request.host_url}/p/{self.id}/{self.slug}"
|
||||
return f"{request.host_url}/p/{self.id}"
|
||||
return f"{request.host_url}/{p_or_c}/{self.id}/{self.slug}"
|
||||
return f"{request.host_url}/{p_or_c}/{self.id}"
|
||||
|
||||
def absolute_edit_url(self, request):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue