mirror of
https://github.com/daniviga/django-ram.git
synced 2025-08-04 13:17:50 +02:00
Add support for manufacturer filters
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
from urllib.parse import quote_plus
|
||||
|
||||
from django.db import models
|
||||
from django.conf import settings
|
||||
from django.dispatch.dispatcher import receiver
|
||||
@@ -34,6 +36,9 @@ class Manufacturer(models.Model):
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
def safe_name(self):
|
||||
return quote_plus(self.name, safe="&")
|
||||
|
||||
def logo_thumbnail(self):
|
||||
return get_image_preview(self.logo.url)
|
||||
|
||||
@@ -56,6 +61,9 @@ class Company(models.Model):
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
def safe_name(self):
|
||||
return quote_plus(self.name, safe="&")
|
||||
|
||||
def logo_thumbnail(self):
|
||||
return get_image_preview(self.logo.url)
|
||||
|
||||
|
Reference in New Issue
Block a user