Skip to content

Instantly share code, notes, and snippets.

@steventlamb
Created March 10, 2014 21:55
Show Gist options
  • Save steventlamb/9475291 to your computer and use it in GitHub Desktop.
Save steventlamb/9475291 to your computer and use it in GitHub Desktop.
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