Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In django what is a SKU?

Tags:

django

When I read django code I often see in models what is called "sku", and "slug". E.g:

name = models.CharField(_("Full Name"), max_length=255, blank=False,
    help_text=_("This is what the product will be called in the default site language.  To add non-default translations, use the Product Translation section below."))
slug = models.SlugField(_("Slug Name"), blank=True,
    help_text=_("Used for URLs, auto-generated from name if blank"), max_length=255)
sku = models.CharField(_("SKU"), max_length=255, blank=True, null=True,
    help_text=_("Defaults to slug if left blank"))

I am not sure what is the relation with the slug URLs.

How and when is this SKU supposed to be used?

like image 850
panchicore Avatar asked Feb 21 '10 22:02

panchicore


People also ask

What is a SKU number?

SKU stands for "stock keeping unit" and is a number that retailers use to differentiate products and track inventory levels. An SKU is typically eight alphanumeric digits long. Products are assigned different SKU numbers based on various characteristics, such as price, manufacturer, color, style, type, and size.

What is SKU structure?

A stock-keeping unit (SKU) is a scannable bar code, most often seen printed on product labels in a retail store. The label allows vendors to automatically track the movement of inventory. The SKU is composed of an alphanumeric combination of eight-or-so characters.


3 Answers

SKU is an abbreviation for Stock-Keeping Unit.

A stock-keeping unit or SKU is a unique identifier for each distinct product and service that can be purchased. SKU use is rooted in data management, enabling the company to systematically track its inventory or product availability, such as in warehouses and retail outlets. They are often assigned and serialized at the merchant level. Each SKU is attached to an item, variant, product line, bundle, service, fee, or attachment.

like image 197
Mark Byers Avatar answered Oct 03 '22 15:10

Mark Byers


A slug is a url-friendly and SEO-friendly identifier for a resource on your website. For a more thorough description and examples you could check out Wordpress' definition. Slugs have a limited allowable character set, hence the custom Django field type.

A SKU is a "Stock Keeping Unit" which is a unique identifier for an item (generally used in retail businesses or manufacturing, but can be used elsewhere). They can be any alpha-numeric character.

like image 39
Gabriel Hurley Avatar answered Oct 03 '22 16:10

Gabriel Hurley


SKU is usually a product id number.

like image 24
brian Avatar answered Oct 03 '22 15:10

brian