Created
April 6, 2017 05:47
-
-
Save hassanabidpk/2babced3d34c784175f8261030dfa675 to your computer and use it in GitHub Desktop.
For Medium blog post
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
class Restaurant(models.Model): | |
name = models.CharField(max_length=200) | |
description = models.TextField(blank=True) | |
image = models.ImageField(upload_to="restaurants/images/", null=True, blank=True) | |
def __str__(self): | |
return "{}".format(self.name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment