Skip to content

Instantly share code, notes, and snippets.

@goyalrohit
Created March 24, 2018 11:26
Show Gist options
  • Save goyalrohit/ec99d96d3e6fa95d3767ec46773905a5 to your computer and use it in GitHub Desktop.
Save goyalrohit/ec99d96d3e6fa95d3767ec46773905a5 to your computer and use it in GitHub Desktop.
from django.db import models
from cms.models.pluginmodel import CMSPlugin
class Daily_Specials(CMSPlugin):
name = models.CharField(max_length=200)
image = models.ImageField(upload_to="daily_specials")
description = models.TextField()
url = models.CharField(max_length=200)
class Meta:
verbose_name = "Daily Special"
verbose_name_plural = "Daily Specials"
def __unicode__(self):
return "%s" % (self.name, )
class Menu_Item(CMSPlugin):
name = models.CharField(max_length=200)
image = models.ImageField(upload_to="menu_items")
price = models.CharField(max_length=200)
description = models.TextField()
url = models.CharField(max_length=200)
def __unicode__(self):
return "%s" % (self.name,)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment