Skip to content

Instantly share code, notes, and snippets.

@qingfeng
Created October 29, 2009 08:01
Show Gist options
  • Save qingfeng/221256 to your computer and use it in GitHub Desktop.
Save qingfeng/221256 to your computer and use it in GitHub Desktop.
from django.db import models
class People(models.Model):
"""
>>> p = People()
>>> p.save()
>>> p.name
'123'
"""
name = models.CharField(blank=True, max_length=100)
def save(self):
a = "123"
self.name = a
super(People,self).save()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment