from django.db import models

# Create your models here.

from django.db import models


# Create your models here.

# Model of an Item
class Item(models.Model):
    item_name = models.CharField(max_lenght=100)
    objects = ItemManager()


class ItemManager(models.Manager):

    def create_item(self, item_name):
        item = self.create(item_name=item_name)

Add name field and object manager
Add name field and object manager

  from django.db import models
+ 
  
  # Create your models here.
  
+ # Model of an Item
+ class Item(models.Model):
+     item_name = models.CharField(max_lenght=100)
+     objects = ItemManager()
+ 
+ 
+ class ItemManager(models.Manager):
+ 
+     def create_item(self, item_name):
+         item = self.create(item_name=item_name)
+ 
Add name field and object manager
## Code Before:
from django.db import models

# Create your models here.

## Instruction:
Add name field and object manager
## Code After:
from django.db import models


# Create your models here.

# Model of an Item
class Item(models.Model):
    item_name = models.CharField(max_lenght=100)
    objects = ItemManager()


class ItemManager(models.Manager):

    def create_item(self, item_name):
        item = self.create(item_name=item_name)
