mirror of
https://github.com/daniviga/django-ram.git
synced 2025-12-26 15:28:31 +01:00
More UI improvements and fix a regression on manufacturer filtering
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import os
|
||||
from urllib.parse import urlparse
|
||||
from django.db import models
|
||||
from django.urls import reverse
|
||||
from django.conf import settings
|
||||
@@ -57,6 +58,10 @@ class Manufacturer(models.Model):
|
||||
},
|
||||
)
|
||||
|
||||
def website_short(self):
|
||||
if self.website:
|
||||
return urlparse(self.website).netloc.replace("www.", "")
|
||||
|
||||
def logo_thumbnail(self):
|
||||
return get_image_preview(self.logo.url)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user