Skip to content

Instantly share code, notes, and snippets.

@kshepp
Last active January 18, 2016 18:15
Show Gist options
  • Save kshepp/bbef99712023663887f5 to your computer and use it in GitHub Desktop.
Save kshepp/bbef99712023663887f5 to your computer and use it in GitHub Desktop.
class Cafe(models.Model):
cafe = models.TextField()
<!--Below is where the image upload is located in the model-->
file_up = models.FileField(blank=True)
url = AutoSlugField(populate_from='cafe', editable=True,unique=True, blank=True)
cityName = models.ForeignKey(City)
established = models.CharField(max_length=10, blank=True)
latitude = models.DecimalField(max_digits= 7, decimal_places=4)
longitude = models.DecimalField(max_digits= 7, decimal_places=4)
closed = models.CharField(max_length=10, blank=True)
description = models.TextField(blank=True)
needsReview = models.BooleanField(default=False)
def __unicode__(self):
return self.cafe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment