{"action":"created","comment":{"url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/pulls/comments/35417247","id":35417247,"diff_hunk":"@@ -0,0 +1,143 @@\n+# import re\n+from django import forms\n+# from PIL import Image\n+from django.contrib.auth.models import User\n+from django.utils.translation import ugettext_lazy as _\n+# from django.core.exceptions import ValidationError\n+import time\n+\n+\n+class RegistrationForm(forms.Form):\n+\n+    username = forms.RegexField(\n+        regex=r'^\\w+$',\n+        widget=forms.TextInput(attrs=dict(required=True, max_length=30)),\n+        label=_(\"Username\"),\n+        error_messages={'invalid': _(\"This value must contain only letters, \\\n+         numbers and underscores.\")})\n+    password1 = forms.CharField(\n+        widget=forms.PasswordInput(\n+            attrs=dict(\n+                required=True,\n+                max_length=4,\n+                render_value=False,\n+                type='password')),\n+        label=_(\"PIN\"))\n+    year = forms.IntegerField(\n+        widget=forms.TextInput(attrs={'type': 'number'}),\n+        label=_(\"Year\"))\n+    month = forms.IntegerField(\n+        widget=forms.TextInput(attrs={'type': 'number'}),\n+        label=_(\"Month\"))\n+    day = forms.IntegerField(\n+        widget=forms.TextInput(attrs={'type': 'number'}),\n+        label=_(\"Day\"))","path":"app/forms.py","position":34,"original_position":34,"commit_id":"3223484055a221d14d571034f81bbe2eca80c24d","original_commit_id":"3223484055a221d14d571034f81bbe2eca80c24d","user":{"login":"smn","id":1065,"avatar_url":"https://avatars.githubusercontent.com/u/1065?v=3","gravatar_id":"","url":"https://api.github.com/users/smn","html_url":"https://github.com/smn","followers_url":"https://api.github.com/users/smn/followers","following_url":"https://api.github.com/users/smn/following{/other_user}","gists_url":"https://api.github.com/users/smn/gists{/gist_id}","starred_url":"https://api.github.com/users/smn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smn/subscriptions","organizations_url":"https://api.github.com/users/smn/orgs","repos_url":"https://api.github.com/users/smn/repos","events_url":"https://api.github.com/users/smn/events{/privacy}","received_events_url":"https://api.github.com/users/smn/received_events","type":"User","site_admin":false},"body":"Would it make sense to make these ChoiceFields with sensible defaults? Would again save on validation and we can rely on the phone's own widget set which could arguably be a better UX.","created_at":"2015-07-24T12:25:04Z","updated_at":"2015-07-24T12:25:04Z","html_url":"https://github.com/praekelt/molo-ndoh-yep/pull/4#discussion_r35417247","pull_request_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/praekelt/molo-ndoh-yep/pulls/comments/35417247"},"html":{"href":"https://github.com/praekelt/molo-ndoh-yep/pull/4#discussion_r35417247"},"pull_request":{"href":"https://api.github.com/repos/praekelt/molo-ndoh-yep/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/pulls/4","id":40564669,"html_url":"https://github.com/praekelt/molo-ndoh-yep/pull/4","diff_url":"https://github.com/praekelt/molo-ndoh-yep/pull/4.diff","patch_url":"https://github.com/praekelt/molo-ndoh-yep/pull/4.patch","issue_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/issues/4","number":4,"state":"open","locked":false,"title":"Feature - Registration, User Profile view/edit and PIN reset","user":{"login":"techaffinity","id":1660265,"avatar_url":"https://avatars.githubusercontent.com/u/1660265?v=3","gravatar_id":"","url":"https://api.github.com/users/techaffinity","html_url":"https://github.com/techaffinity","followers_url":"https://api.github.com/users/techaffinity/followers","following_url":"https://api.github.com/users/techaffinity/following{/other_user}","gists_url":"https://api.github.com/users/techaffinity/gists{/gist_id}","starred_url":"https://api.github.com/users/techaffinity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/techaffinity/subscriptions","organizations_url":"https://api.github.com/users/techaffinity/orgs","repos_url":"https://api.github.com/users/techaffinity/repos","events_url":"https://api.github.com/users/techaffinity/events{/privacy}","received_events_url":"https://api.github.com/users/techaffinity/received_events","type":"User","site_admin":false},"body":"The build that is associated with Registration feature includes user registration, user login, user profile view and edit/update and reset PIN. The update that covers validations and basic CSS alignment in the pages.","created_at":"2015-07-22T13:30:48Z","updated_at":"2015-07-24T12:25:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b2e69e45a09c88804e8aac71e417ed5c7adbd266","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/pulls/4/commits","review_comments_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/pulls/4/comments","review_comment_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/pulls/comments{/number}","comments_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/issues/4/comments","statuses_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/statuses/3223484055a221d14d571034f81bbe2eca80c24d","head":{"label":"praekelt:feature-registration","ref":"feature-registration","sha":"3223484055a221d14d571034f81bbe2eca80c24d","user":{"login":"praekelt","id":81810,"avatar_url":"https://avatars.githubusercontent.com/u/81810?v=3","gravatar_id":"","url":"https://api.github.com/users/praekelt","html_url":"https://github.com/praekelt","followers_url":"https://api.github.com/users/praekelt/followers","following_url":"https://api.github.com/users/praekelt/following{/other_user}","gists_url":"https://api.github.com/users/praekelt/gists{/gist_id}","starred_url":"https://api.github.com/users/praekelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praekelt/subscriptions","organizations_url":"https://api.github.com/users/praekelt/orgs","repos_url":"https://api.github.com/users/praekelt/repos","events_url":"https://api.github.com/users/praekelt/events{/privacy}","received_events_url":"https://api.github.com/users/praekelt/received_events","type":"Organization","site_admin":false},"repo":{"id":36718677,"name":"molo-ndoh-yep","full_name":"praekelt/molo-ndoh-yep","owner":{"login":"praekelt","id":81810,"avatar_url":"https://avatars.githubusercontent.com/u/81810?v=3","gravatar_id":"","url":"https://api.github.com/users/praekelt","html_url":"https://github.com/praekelt","followers_url":"https://api.github.com/users/praekelt/followers","following_url":"https://api.github.com/users/praekelt/following{/other_user}","gists_url":"https://api.github.com/users/praekelt/gists{/gist_id}","starred_url":"https://api.github.com/users/praekelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praekelt/subscriptions","organizations_url":"https://api.github.com/users/praekelt/orgs","repos_url":"https://api.github.com/users/praekelt/repos","events_url":"https://api.github.com/users/praekelt/events{/privacy}","received_events_url":"https://api.github.com/users/praekelt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/praekelt/molo-ndoh-yep","description":"NDoH Youth Empowerment Platform built using Molo","fork":false,"url":"https://api.github.com/repos/praekelt/molo-ndoh-yep","forks_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/forks","keys_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/keys{/key_id}","collaborators_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/teams","hooks_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/hooks","issue_events_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/issues/events{/number}","events_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/events","assignees_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/assignees{/user}","branches_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/branches{/branch}","tags_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/tags","blobs_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/git/refs{/sha}","trees_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/git/trees{/sha}","statuses_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/statuses/{sha}","languages_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/languages","stargazers_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/stargazers","contributors_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/contributors","subscribers_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/subscribers","subscription_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/subscription","commits_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/commits{/sha}","git_commits_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/git/commits{/sha}","comments_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/comments{/number}","issue_comment_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/issues/comments{/number}","contents_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/contents/{+path}","compare_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/compare/{base}...{head}","merges_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/merges","archive_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/downloads","issues_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/issues{/number}","pulls_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/pulls{/number}","milestones_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/milestones{/number}","notifications_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/labels{/name}","releases_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/releases{/id}","created_at":"2015-06-02T08:20:23Z","updated_at":"2015-06-26T12:16:19Z","pushed_at":"2015-07-24T06:56:05Z","git_url":"git://github.com/praekelt/molo-ndoh-yep.git","ssh_url":"git@github.com:praekelt/molo-ndoh-yep.git","clone_url":"https://github.com/praekelt/molo-ndoh-yep.git","svn_url":"https://github.com/praekelt/molo-ndoh-yep","homepage":null,"size":242,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":0,"default_branch":"develop"}},"base":{"label":"praekelt:develop","ref":"develop","sha":"d4cbc436d012986587bed1decd34e4f5fd036bab","user":{"login":"praekelt","id":81810,"avatar_url":"https://avatars.githubusercontent.com/u/81810?v=3","gravatar_id":"","url":"https://api.github.com/users/praekelt","html_url":"https://github.com/praekelt","followers_url":"https://api.github.com/users/praekelt/followers","following_url":"https://api.github.com/users/praekelt/following{/other_user}","gists_url":"https://api.github.com/users/praekelt/gists{/gist_id}","starred_url":"https://api.github.com/users/praekelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praekelt/subscriptions","organizations_url":"https://api.github.com/users/praekelt/orgs","repos_url":"https://api.github.com/users/praekelt/repos","events_url":"https://api.github.com/users/praekelt/events{/privacy}","received_events_url":"https://api.github.com/users/praekelt/received_events","type":"Organization","site_admin":false},"repo":{"id":36718677,"name":"molo-ndoh-yep","full_name":"praekelt/molo-ndoh-yep","owner":{"login":"praekelt","id":81810,"avatar_url":"https://avatars.githubusercontent.com/u/81810?v=3","gravatar_id":"","url":"https://api.github.com/users/praekelt","html_url":"https://github.com/praekelt","followers_url":"https://api.github.com/users/praekelt/followers","following_url":"https://api.github.com/users/praekelt/following{/other_user}","gists_url":"https://api.github.com/users/praekelt/gists{/gist_id}","starred_url":"https://api.github.com/users/praekelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praekelt/subscriptions","organizations_url":"https://api.github.com/users/praekelt/orgs","repos_url":"https://api.github.com/users/praekelt/repos","events_url":"https://api.github.com/users/praekelt/events{/privacy}","received_events_url":"https://api.github.com/users/praekelt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/praekelt/molo-ndoh-yep","description":"NDoH Youth Empowerment Platform built using Molo","fork":false,"url":"https://api.github.com/repos/praekelt/molo-ndoh-yep","forks_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/forks","keys_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/keys{/key_id}","collaborators_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/teams","hooks_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/hooks","issue_events_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/issues/events{/number}","events_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/events","assignees_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/assignees{/user}","branches_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/branches{/branch}","tags_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/tags","blobs_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/git/refs{/sha}","trees_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/git/trees{/sha}","statuses_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/statuses/{sha}","languages_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/languages","stargazers_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/stargazers","contributors_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/contributors","subscribers_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/subscribers","subscription_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/subscription","commits_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/commits{/sha}","git_commits_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/git/commits{/sha}","comments_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/comments{/number}","issue_comment_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/issues/comments{/number}","contents_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/contents/{+path}","compare_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/compare/{base}...{head}","merges_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/merges","archive_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/downloads","issues_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/issues{/number}","pulls_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/pulls{/number}","milestones_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/milestones{/number}","notifications_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/labels{/name}","releases_url":"https://api.github.com/repos/praekelt/molo-ndoh-yep/releases{/id}","created_at":"2015-06-02T08:20:23Z","updated_at":"2015-06-26T12:16:19Z","pushed_at":"2015-07-24T06:56:05Z","git_url":"git://github.com/praekelt/molo-ndoh-yep.git","ssh_url":"git@github.com:praekelt/molo-ndoh-yep.git","clone_url":"https://github.com/praekelt/molo-ndoh-yep.git","svn_url":"https://github.com/praekelt/molo-ndoh-yep","homepage":null,"size":242,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/praekelt/molo-ndoh-yep/pulls/4"},"html":{"href":"https://github.com/praekelt/molo-ndoh-yep/pull/4"},"issue":{"href":"https://api.github.com/repos/praekelt/molo-ndoh-yep/issues/4"},"comments":{"href":"https://api.github.com/repos/praekelt/molo-ndoh-yep/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/praekelt/molo-ndoh-yep/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/praekelt/molo-ndoh-yep/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/praekelt/molo-ndoh-yep/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/praekelt/molo-ndoh-yep/statuses/3223484055a221d14d571034f81bbe2eca80c24d"}}}}