{"action":"created","comment":{"url":"https://api.github.com/repos/kbhff/foodnet/pulls/comments/29359460","id":29359460,"diff_hunk":"@@ -0,0 +1,66 @@\n+# -*- coding: utf-8 -*-\n+from django.db import models\n+from django.contrib.auth.models import User\n+from django.db.models.signals import post_save\n+\n+\n+class UserProfile(models.Model):\n+    MALE = 'm'\n+    FEMALE = 'f'\n+    SEX_CHOICES = (\n+        (FEMALE, 'female'),\n+        (MALE, 'male')\n+    )\n+    \n+    user = models.OneToOneField(User)\n+    middlename = models.CharField(max_length=255)\n+    adr1 = models.CharField(max_length=255)\n+    adr2 = models.CharField(max_length=255)\n+    streetno = models.CharField(max_length=255)\n+    floor = models.CharField(max_length=255)\n+    door = models.CharField(max_length=255)\n+    zip = models.CharField(max_length=255)\n+    city = models.CharField(max_length=255)\n+    tel = models.CharField(max_length=255)\n+    tel2 = models.CharField(max_length=255)\n+    sex = models.CharField(max_length=1, choices=SEX_CHOICES)\n+    birthday = models.DateField(null=True)\n+    privacy = models.BooleanField()\n+    created = models.DateTimeField(auto_now_add=True)\n+    changed = models.DateTimeField(auto_now=True)\n+\n+    def _get_full_name(self):\n+        \"Returns member's full name.\"\n+        return '{0} {1} {2}'.format(self.user.firstname, self.middlename,\n+                                    self.user.lastname)\n+    full_name = property(_get_full_name)\n+\n+\n+class Member(models.Model):\n+    number = models.PositiveSmallIntegerField()\n+    user = models.ForeignKey(User)\n+\n+\n+class Division(models.Model):\n+    shortname = models.CharField(max_length=4)\n+    name = models.CharField(max_length=255)\n+    type = models.CharField(max_length=255)\n+    webmembers = models.BooleanField()  # FIXME: should this be here?\n+    contact = models.CharField(max_length=255)\n+\n+\n+class DivisionMembers(models.Model):\n+    member = models.ForeignKey(Member)","path":"foodnet/membership/models.py","position":53,"original_position":53,"commit_id":"88bffb9d83cd1cab235350d2ef8d66e401cdfc13","original_commit_id":"88bffb9d83cd1cab235350d2ef8d66e401cdfc13","user":{"login":"valberg","id":5782,"avatar_url":"https://avatars.githubusercontent.com/u/5782?v=3","gravatar_id":"","url":"https://api.github.com/users/valberg","html_url":"https://github.com/valberg","followers_url":"https://api.github.com/users/valberg/followers","following_url":"https://api.github.com/users/valberg/following{/other_user}","gists_url":"https://api.github.com/users/valberg/gists{/gist_id}","starred_url":"https://api.github.com/users/valberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valberg/subscriptions","organizations_url":"https://api.github.com/users/valberg/orgs","repos_url":"https://api.github.com/users/valberg/repos","events_url":"https://api.github.com/users/valberg/events{/privacy}","received_events_url":"https://api.github.com/users/valberg/received_events","type":"User","site_admin":false},"body":"I would use the `auth.User` model here, that should bind everything user specific together :)","created_at":"2015-04-29T17:32:44Z","updated_at":"2015-04-29T17:32:44Z","html_url":"https://github.com/kbhff/foodnet/pull/1#discussion_r29359460","pull_request_url":"https://api.github.com/repos/kbhff/foodnet/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/kbhff/foodnet/pulls/comments/29359460"},"html":{"href":"https://github.com/kbhff/foodnet/pull/1#discussion_r29359460"},"pull_request":{"href":"https://api.github.com/repos/kbhff/foodnet/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/kbhff/foodnet/pulls/1","id":34274966,"html_url":"https://github.com/kbhff/foodnet/pull/1","diff_url":"https://github.com/kbhff/foodnet/pull/1.diff","patch_url":"https://github.com/kbhff/foodnet/pull/1.patch","issue_url":"https://api.github.com/repos/kbhff/foodnet/issues/1","number":1,"state":"open","locked":false,"title":"Add basic structure for membership app","user":{"login":"pawciobiel","id":1190054,"avatar_url":"https://avatars.githubusercontent.com/u/1190054?v=3","gravatar_id":"","url":"https://api.github.com/users/pawciobiel","html_url":"https://github.com/pawciobiel","followers_url":"https://api.github.com/users/pawciobiel/followers","following_url":"https://api.github.com/users/pawciobiel/following{/other_user}","gists_url":"https://api.github.com/users/pawciobiel/gists{/gist_id}","starred_url":"https://api.github.com/users/pawciobiel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pawciobiel/subscriptions","organizations_url":"https://api.github.com/users/pawciobiel/orgs","repos_url":"https://api.github.com/users/pawciobiel/repos","events_url":"https://api.github.com/users/pawciobiel/events{/privacy}","received_events_url":"https://api.github.com/users/pawciobiel/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-04-28T14:52:08Z","updated_at":"2015-04-29T17:32:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9701bf97f370392fcd50253c6f2d59311a43225d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/kbhff/foodnet/pulls/1/commits","review_comments_url":"https://api.github.com/repos/kbhff/foodnet/pulls/1/comments","review_comment_url":"https://api.github.com/repos/kbhff/foodnet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kbhff/foodnet/issues/1/comments","statuses_url":"https://api.github.com/repos/kbhff/foodnet/statuses/88bffb9d83cd1cab235350d2ef8d66e401cdfc13","head":{"label":"kbhff:add_basic_membership_app","ref":"add_basic_membership_app","sha":"88bffb9d83cd1cab235350d2ef8d66e401cdfc13","user":{"login":"kbhff","id":4189049,"avatar_url":"https://avatars.githubusercontent.com/u/4189049?v=3","gravatar_id":"","url":"https://api.github.com/users/kbhff","html_url":"https://github.com/kbhff","followers_url":"https://api.github.com/users/kbhff/followers","following_url":"https://api.github.com/users/kbhff/following{/other_user}","gists_url":"https://api.github.com/users/kbhff/gists{/gist_id}","starred_url":"https://api.github.com/users/kbhff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbhff/subscriptions","organizations_url":"https://api.github.com/users/kbhff/orgs","repos_url":"https://api.github.com/users/kbhff/repos","events_url":"https://api.github.com/users/kbhff/events{/privacy}","received_events_url":"https://api.github.com/users/kbhff/received_events","type":"Organization","site_admin":false},"repo":{"id":34317253,"name":"foodnet","full_name":"kbhff/foodnet","owner":{"login":"kbhff","id":4189049,"avatar_url":"https://avatars.githubusercontent.com/u/4189049?v=3","gravatar_id":"","url":"https://api.github.com/users/kbhff","html_url":"https://github.com/kbhff","followers_url":"https://api.github.com/users/kbhff/followers","following_url":"https://api.github.com/users/kbhff/following{/other_user}","gists_url":"https://api.github.com/users/kbhff/gists{/gist_id}","starred_url":"https://api.github.com/users/kbhff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbhff/subscriptions","organizations_url":"https://api.github.com/users/kbhff/orgs","repos_url":"https://api.github.com/users/kbhff/repos","events_url":"https://api.github.com/users/kbhff/events{/privacy}","received_events_url":"https://api.github.com/users/kbhff/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kbhff/foodnet","description":"FoodNet is an open source web application that provides simple and flexible infrastructure for organizing food coops and other local community-driven projects.","fork":false,"url":"https://api.github.com/repos/kbhff/foodnet","forks_url":"https://api.github.com/repos/kbhff/foodnet/forks","keys_url":"https://api.github.com/repos/kbhff/foodnet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kbhff/foodnet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kbhff/foodnet/teams","hooks_url":"https://api.github.com/repos/kbhff/foodnet/hooks","issue_events_url":"https://api.github.com/repos/kbhff/foodnet/issues/events{/number}","events_url":"https://api.github.com/repos/kbhff/foodnet/events","assignees_url":"https://api.github.com/repos/kbhff/foodnet/assignees{/user}","branches_url":"https://api.github.com/repos/kbhff/foodnet/branches{/branch}","tags_url":"https://api.github.com/repos/kbhff/foodnet/tags","blobs_url":"https://api.github.com/repos/kbhff/foodnet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kbhff/foodnet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kbhff/foodnet/git/refs{/sha}","trees_url":"https://api.github.com/repos/kbhff/foodnet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kbhff/foodnet/statuses/{sha}","languages_url":"https://api.github.com/repos/kbhff/foodnet/languages","stargazers_url":"https://api.github.com/repos/kbhff/foodnet/stargazers","contributors_url":"https://api.github.com/repos/kbhff/foodnet/contributors","subscribers_url":"https://api.github.com/repos/kbhff/foodnet/subscribers","subscription_url":"https://api.github.com/repos/kbhff/foodnet/subscription","commits_url":"https://api.github.com/repos/kbhff/foodnet/commits{/sha}","git_commits_url":"https://api.github.com/repos/kbhff/foodnet/git/commits{/sha}","comments_url":"https://api.github.com/repos/kbhff/foodnet/comments{/number}","issue_comment_url":"https://api.github.com/repos/kbhff/foodnet/issues/comments{/number}","contents_url":"https://api.github.com/repos/kbhff/foodnet/contents/{+path}","compare_url":"https://api.github.com/repos/kbhff/foodnet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kbhff/foodnet/merges","archive_url":"https://api.github.com/repos/kbhff/foodnet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kbhff/foodnet/downloads","issues_url":"https://api.github.com/repos/kbhff/foodnet/issues{/number}","pulls_url":"https://api.github.com/repos/kbhff/foodnet/pulls{/number}","milestones_url":"https://api.github.com/repos/kbhff/foodnet/milestones{/number}","notifications_url":"https://api.github.com/repos/kbhff/foodnet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kbhff/foodnet/labels{/name}","releases_url":"https://api.github.com/repos/kbhff/foodnet/releases{/id}","created_at":"2015-04-21T09:24:52Z","updated_at":"2015-04-29T10:11:28Z","pushed_at":"2015-04-29T10:11:28Z","git_url":"git://github.com/kbhff/foodnet.git","ssh_url":"git@github.com:kbhff/foodnet.git","clone_url":"https://github.com/kbhff/foodnet.git","svn_url":"https://github.com/kbhff/foodnet","homepage":null,"size":143,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":4,"default_branch":"master"}},"base":{"label":"kbhff:master","ref":"master","sha":"814b20054e0747cb26e9777c80201bbe4d06cda7","user":{"login":"kbhff","id":4189049,"avatar_url":"https://avatars.githubusercontent.com/u/4189049?v=3","gravatar_id":"","url":"https://api.github.com/users/kbhff","html_url":"https://github.com/kbhff","followers_url":"https://api.github.com/users/kbhff/followers","following_url":"https://api.github.com/users/kbhff/following{/other_user}","gists_url":"https://api.github.com/users/kbhff/gists{/gist_id}","starred_url":"https://api.github.com/users/kbhff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbhff/subscriptions","organizations_url":"https://api.github.com/users/kbhff/orgs","repos_url":"https://api.github.com/users/kbhff/repos","events_url":"https://api.github.com/users/kbhff/events{/privacy}","received_events_url":"https://api.github.com/users/kbhff/received_events","type":"Organization","site_admin":false},"repo":{"id":34317253,"name":"foodnet","full_name":"kbhff/foodnet","owner":{"login":"kbhff","id":4189049,"avatar_url":"https://avatars.githubusercontent.com/u/4189049?v=3","gravatar_id":"","url":"https://api.github.com/users/kbhff","html_url":"https://github.com/kbhff","followers_url":"https://api.github.com/users/kbhff/followers","following_url":"https://api.github.com/users/kbhff/following{/other_user}","gists_url":"https://api.github.com/users/kbhff/gists{/gist_id}","starred_url":"https://api.github.com/users/kbhff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kbhff/subscriptions","organizations_url":"https://api.github.com/users/kbhff/orgs","repos_url":"https://api.github.com/users/kbhff/repos","events_url":"https://api.github.com/users/kbhff/events{/privacy}","received_events_url":"https://api.github.com/users/kbhff/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kbhff/foodnet","description":"FoodNet is an open source web application that provides simple and flexible infrastructure for organizing food coops and other local community-driven projects.","fork":false,"url":"https://api.github.com/repos/kbhff/foodnet","forks_url":"https://api.github.com/repos/kbhff/foodnet/forks","keys_url":"https://api.github.com/repos/kbhff/foodnet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kbhff/foodnet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kbhff/foodnet/teams","hooks_url":"https://api.github.com/repos/kbhff/foodnet/hooks","issue_events_url":"https://api.github.com/repos/kbhff/foodnet/issues/events{/number}","events_url":"https://api.github.com/repos/kbhff/foodnet/events","assignees_url":"https://api.github.com/repos/kbhff/foodnet/assignees{/user}","branches_url":"https://api.github.com/repos/kbhff/foodnet/branches{/branch}","tags_url":"https://api.github.com/repos/kbhff/foodnet/tags","blobs_url":"https://api.github.com/repos/kbhff/foodnet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kbhff/foodnet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kbhff/foodnet/git/refs{/sha}","trees_url":"https://api.github.com/repos/kbhff/foodnet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kbhff/foodnet/statuses/{sha}","languages_url":"https://api.github.com/repos/kbhff/foodnet/languages","stargazers_url":"https://api.github.com/repos/kbhff/foodnet/stargazers","contributors_url":"https://api.github.com/repos/kbhff/foodnet/contributors","subscribers_url":"https://api.github.com/repos/kbhff/foodnet/subscribers","subscription_url":"https://api.github.com/repos/kbhff/foodnet/subscription","commits_url":"https://api.github.com/repos/kbhff/foodnet/commits{/sha}","git_commits_url":"https://api.github.com/repos/kbhff/foodnet/git/commits{/sha}","comments_url":"https://api.github.com/repos/kbhff/foodnet/comments{/number}","issue_comment_url":"https://api.github.com/repos/kbhff/foodnet/issues/comments{/number}","contents_url":"https://api.github.com/repos/kbhff/foodnet/contents/{+path}","compare_url":"https://api.github.com/repos/kbhff/foodnet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kbhff/foodnet/merges","archive_url":"https://api.github.com/repos/kbhff/foodnet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kbhff/foodnet/downloads","issues_url":"https://api.github.com/repos/kbhff/foodnet/issues{/number}","pulls_url":"https://api.github.com/repos/kbhff/foodnet/pulls{/number}","milestones_url":"https://api.github.com/repos/kbhff/foodnet/milestones{/number}","notifications_url":"https://api.github.com/repos/kbhff/foodnet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kbhff/foodnet/labels{/name}","releases_url":"https://api.github.com/repos/kbhff/foodnet/releases{/id}","created_at":"2015-04-21T09:24:52Z","updated_at":"2015-04-29T10:11:28Z","pushed_at":"2015-04-29T10:11:28Z","git_url":"git://github.com/kbhff/foodnet.git","ssh_url":"git@github.com:kbhff/foodnet.git","clone_url":"https://github.com/kbhff/foodnet.git","svn_url":"https://github.com/kbhff/foodnet","homepage":null,"size":143,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kbhff/foodnet/pulls/1"},"html":{"href":"https://github.com/kbhff/foodnet/pull/1"},"issue":{"href":"https://api.github.com/repos/kbhff/foodnet/issues/1"},"comments":{"href":"https://api.github.com/repos/kbhff/foodnet/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/kbhff/foodnet/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/kbhff/foodnet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kbhff/foodnet/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/kbhff/foodnet/statuses/88bffb9d83cd1cab235350d2ef8d66e401cdfc13"}}}}