Created
March 10, 2014 21:55
-
-
Save steventlamb/9475291 to your computer and use it in GitHub Desktop.
This file contains 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 Activity(models.Model): | |
name = models.CharField(max_length=50, verbose_name="Name of Activity") | |
class Person(models.Model): | |
name = models.CharField(max_length=50, verbose_name="Person's name") | |
address = models.CharField(max_length=255) | |
info = models.TextField(verbose_name="Info on Person") | |
hobby = models.ForeignKey(Activity) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment