Created
May 27, 2017 08:20
-
-
Save okwow123/5af13e740f4c79d9a3f1b5843d56bdf1 to your computer and use it in GitHub Desktop.
model2
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
| # Create your models here. | |
| from __future__ import unicode_literals | |
| from django.db import models | |
| #from django.contrib.auth.models import User | |
| class Store(models.Model): | |
| store_email=models.CharField(max_length=50,primary_key=True) | |
| #store_id = models.OneToOneField(User,on_delete=models.CASCADE,primary_key=True) | |
| #store_id = models.ForeignKey(User, unique=True) | |
| #store_email = models.CharField(max_length=100) | |
| store_name=models.CharField(max_length=50) | |
| store_address=models.CharField(max_length=50) | |
| store_image=models.ImageField() | |
| store_reward=models.IntegerField(default=0) | |
| class Meta: | |
| verbose_name = "Store" | |
| verbose_name_plural = "Store" | |
| def __unicode__(self): | |
| return self.service_name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment