coding utf-8 from django db import models class Payer models Model nam

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# -*- coding: utf-8 -*-
from django.db import models
class Payer(models.Model):
name = models.CharField(max_length = 400)
def __unicode__(self):
return self.name
class Payment(models.Model):
date = models.DateField()
payer = models.ForeignKey('Payer',)
amount = models.IntegerField()
def __unicode__(self):
return self.desc