Skip to content

Instantly share code, notes, and snippets.

@okwow123
Created May 27, 2017 08:19
Show Gist options
  • Select an option

  • Save okwow123/dad287feabeb57f7cf630d2a80ae6f71 to your computer and use it in GitHub Desktop.

Select an option

Save okwow123/dad287feabeb57f7cf630d2a80ae6f71 to your computer and use it in GitHub Desktop.
model1
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from datetime import date
from store.models import Store
class Cmanage(models.Model):
class Meta:
unique_together = (('user_email', 'store_email'),)
#cmanage_id = models.AutoField(primary_key=True,default=0)
user_email=models.CharField(max_length=50)
store_email=models.ForeignKey(Store)
#store_id = models.ForeignKey(User, unique=True)
#store_email=models.CharField(max_length=50,primary_key=True)
#user_email=models.CharField(max_length=50)
#store_name=models.CharField(max_length=50)
#store_address=models.CharField(max_length=50)
#store_image=models.ImageField()
#store_reward=models.IntegerField(default=0)
#store_rdate = models.DateTimeField(auto_now_add=True, blank=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment