2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-12-14 00:09:56 +00:00

Add 'keywords' field to Part

- Shows up in search results
This commit is contained in:
Oliver Walters
2019-05-14 17:23:20 +10:00
parent 7447561f77
commit 02033c2157
6 changed files with 43 additions and 13 deletions

View File

@@ -179,8 +179,9 @@ class Part(models.Model):
Attributes:
name: Brief name for this part
variant: Optional variant number for this part - Must be unique for the part name
description: Longer form description of the part
category: The PartCategory to which this part belongs
description: Longer form description of the part
keywords: Optional keywords for improving part search results
IPN: Internal part number (optional)
URL: Link to an external page with more information about this part (e.g. internal Wiki)
image: Image of this part
@@ -250,6 +251,8 @@ class Part(models.Model):
description = models.CharField(max_length=250, blank=False, help_text='Part description')
keywords = models.CharField(max_length=250, blank=True, help_text='Part keywords to improve visibility in search results')
category = models.ForeignKey(PartCategory, related_name='parts',
null=True, blank=True,
on_delete=models.DO_NOTHING,