{"action":"created","comment":{"url":"https://api.github.com/repos/uclouvain/osis-portal/pulls/comments/71527957","id":71527957,"diff_hunk":"@@ -0,0 +1,66 @@\n+##############################################################################\n+#\n+#    OSIS stands for Open Student Information System. It's an application\n+#    designed to manage the core business of higher education institutions,\n+#    such as universities, faculties, institutes and professional schools.\n+#    The core business involves the administration of students, teachers,\n+#    courses, programs and so on.\n+#\n+#    Copyright (C) 2015-2016 Université catholique de Louvain (http://www.uclouvain.be)\n+#\n+#    This program is free software: you can redistribute it and/or modify\n+#    it under the terms of the GNU General Public License as published by\n+#    the Free Software Foundation, either version 3 of the License, or\n+#    (at your option) any later version.\n+#\n+#    This program is distributed in the hope that it will be useful,\n+#    but WITHOUT ANY WARRANTY; without even the implied warranty of\n+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+#    GNU General Public License for more details.\n+#\n+#    A copy of this license - GNU General Public License - is available\n+#    at the root of the source code of this program.  If not,\n+#    see http://www.gnu.org/licenses/.\n+#\n+##############################################################################\n+from django.shortcuts import get_object_or_404, render, redirect\n+from django.http import *\n+from osis_common.forms import UploadDocumentFileForm\n+from osis_common.models.document_file import DocumentFile\n+\n+\n+def upload_file(request):\n+    documents = DocumentFile.objects.filter(user=request.user).filter(document_type=\"admission\")","path":"admission/views/upload_file.py","position":33,"original_position":33,"commit_id":"c641f9096206cb437855a716e73f23aabe14b6a8","original_commit_id":"c641f9096206cb437855a716e73f23aabe14b6a8","user":{"login":"htmfilho","id":200272,"avatar_url":"https://avatars.githubusercontent.com/u/200272?v=3","gravatar_id":"","url":"https://api.github.com/users/htmfilho","html_url":"https://github.com/htmfilho","followers_url":"https://api.github.com/users/htmfilho/followers","following_url":"https://api.github.com/users/htmfilho/following{/other_user}","gists_url":"https://api.github.com/users/htmfilho/gists{/gist_id}","starred_url":"https://api.github.com/users/htmfilho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htmfilho/subscriptions","organizations_url":"https://api.github.com/users/htmfilho/orgs","repos_url":"https://api.github.com/users/htmfilho/repos","events_url":"https://api.github.com/users/htmfilho/events{/privacy}","received_events_url":"https://api.github.com/users/htmfilho/received_events","type":"User","site_admin":false},"body":"Il ne faut pas faire des consultations dans la view. Créer une function du type `search` dans l'entité DocumentFile.","created_at":"2016-07-20T13:53:02Z","updated_at":"2016-07-20T13:53:02Z","html_url":"https://github.com/uclouvain/osis-portal/pull/218#discussion_r71527957","pull_request_url":"https://api.github.com/repos/uclouvain/osis-portal/pulls/218","_links":{"self":{"href":"https://api.github.com/repos/uclouvain/osis-portal/pulls/comments/71527957"},"html":{"href":"https://github.com/uclouvain/osis-portal/pull/218#discussion_r71527957"},"pull_request":{"href":"https://api.github.com/repos/uclouvain/osis-portal/pulls/218"}}},"pull_request":{"url":"https://api.github.com/repos/uclouvain/osis-portal/pulls/218","id":78119620,"html_url":"https://github.com/uclouvain/osis-portal/pull/218","diff_url":"https://github.com/uclouvain/osis-portal/pull/218.diff","patch_url":"https://github.com/uclouvain/osis-portal/pull/218.patch","issue_url":"https://api.github.com/repos/uclouvain/osis-portal/issues/218","number":218,"state":"open","locked":false,"title":"Issue#51","user":{"login":"chfivet","id":15813887,"avatar_url":"https://avatars.githubusercontent.com/u/15813887?v=3","gravatar_id":"","url":"https://api.github.com/users/chfivet","html_url":"https://github.com/chfivet","followers_url":"https://api.github.com/users/chfivet/followers","following_url":"https://api.github.com/users/chfivet/following{/other_user}","gists_url":"https://api.github.com/users/chfivet/gists{/gist_id}","starred_url":"https://api.github.com/users/chfivet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chfivet/subscriptions","organizations_url":"https://api.github.com/users/chfivet/orgs","repos_url":"https://api.github.com/users/chfivet/repos","events_url":"https://api.github.com/users/chfivet/events{/privacy}","received_events_url":"https://api.github.com/users/chfivet/received_events","type":"User","site_admin":false},"body":"## Il est nécessaire de valider le Pull Request de l'issue#8 de Osis-Common avant celui-ci.\r\n\r\n Inform the ticket you are solving in this pull request: #\r\n\r\nTo have your pull request accepted you have to make sure that:\r\n\r\n- [x] it contains only **well formatted** code, using **4 spaces** for identation and a maximum of **120 characters** per line.\r\n- [x] classes, methods or function names are **not abreviated**.\r\n- [x] the code seems **readable for other developers** who will maintain this code in the future.\r\n- [x] in case complexity is needed, then the code is very **well documented**.\r\n- [x] all files contain the **license header**.\r\n\r\n- Ajout dans Settings de plusieur variable global :\r\nUPLOAD_DIR : Path vers le dossier de stockage des fichiers uploads\r\nCONTENT_TYPES : Liste des types valident\r\nMAX_UPLOAD_SIZE : Taille d'upload maximal                          \r\n\r\n- Création de la vue upload_file : Permet d'avoir un exemple pour l'Upload et le download de fichiers\r\n- Création des urls d'upload et download nécessaire à la vue comme exemple\r\n- Création du template new_file appelé par la vue upload_file comme exemple\r\n- Ajout dans gitignore du dossier stockant les fichiers upload des tests (\"Uploads\")","created_at":"2016-07-20T10:00:36Z","updated_at":"2016-07-20T13:53:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/uclouvain/osis-portal/pulls/218/commits","review_comments_url":"https://api.github.com/repos/uclouvain/osis-portal/pulls/218/comments","review_comment_url":"https://api.github.com/repos/uclouvain/osis-portal/pulls/comments{/number}","comments_url":"https://api.github.com/repos/uclouvain/osis-portal/issues/218/comments","statuses_url":"https://api.github.com/repos/uclouvain/osis-portal/statuses/c641f9096206cb437855a716e73f23aabe14b6a8","head":{"label":"uclouvain:issue#51","ref":"issue#51","sha":"c641f9096206cb437855a716e73f23aabe14b6a8","user":{"login":"uclouvain","id":9862060,"avatar_url":"https://avatars.githubusercontent.com/u/9862060?v=3","gravatar_id":"","url":"https://api.github.com/users/uclouvain","html_url":"https://github.com/uclouvain","followers_url":"https://api.github.com/users/uclouvain/followers","following_url":"https://api.github.com/users/uclouvain/following{/other_user}","gists_url":"https://api.github.com/users/uclouvain/gists{/gist_id}","starred_url":"https://api.github.com/users/uclouvain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uclouvain/subscriptions","organizations_url":"https://api.github.com/users/uclouvain/orgs","repos_url":"https://api.github.com/users/uclouvain/repos","events_url":"https://api.github.com/users/uclouvain/events{/privacy}","received_events_url":"https://api.github.com/users/uclouvain/received_events","type":"Organization","site_admin":false},"repo":{"id":44250834,"name":"osis-portal","full_name":"uclouvain/osis-portal","owner":{"login":"uclouvain","id":9862060,"avatar_url":"https://avatars.githubusercontent.com/u/9862060?v=3","gravatar_id":"","url":"https://api.github.com/users/uclouvain","html_url":"https://github.com/uclouvain","followers_url":"https://api.github.com/users/uclouvain/followers","following_url":"https://api.github.com/users/uclouvain/following{/other_user}","gists_url":"https://api.github.com/users/uclouvain/gists{/gist_id}","starred_url":"https://api.github.com/users/uclouvain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uclouvain/subscriptions","organizations_url":"https://api.github.com/users/uclouvain/orgs","repos_url":"https://api.github.com/users/uclouvain/repos","events_url":"https://api.github.com/users/uclouvain/events{/privacy}","received_events_url":"https://api.github.com/users/uclouvain/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uclouvain/osis-portal","description":"","fork":false,"url":"https://api.github.com/repos/uclouvain/osis-portal","forks_url":"https://api.github.com/repos/uclouvain/osis-portal/forks","keys_url":"https://api.github.com/repos/uclouvain/osis-portal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uclouvain/osis-portal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uclouvain/osis-portal/teams","hooks_url":"https://api.github.com/repos/uclouvain/osis-portal/hooks","issue_events_url":"https://api.github.com/repos/uclouvain/osis-portal/issues/events{/number}","events_url":"https://api.github.com/repos/uclouvain/osis-portal/events","assignees_url":"https://api.github.com/repos/uclouvain/osis-portal/assignees{/user}","branches_url":"https://api.github.com/repos/uclouvain/osis-portal/branches{/branch}","tags_url":"https://api.github.com/repos/uclouvain/osis-portal/tags","blobs_url":"https://api.github.com/repos/uclouvain/osis-portal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uclouvain/osis-portal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uclouvain/osis-portal/git/refs{/sha}","trees_url":"https://api.github.com/repos/uclouvain/osis-portal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uclouvain/osis-portal/statuses/{sha}","languages_url":"https://api.github.com/repos/uclouvain/osis-portal/languages","stargazers_url":"https://api.github.com/repos/uclouvain/osis-portal/stargazers","contributors_url":"https://api.github.com/repos/uclouvain/osis-portal/contributors","subscribers_url":"https://api.github.com/repos/uclouvain/osis-portal/subscribers","subscription_url":"https://api.github.com/repos/uclouvain/osis-portal/subscription","commits_url":"https://api.github.com/repos/uclouvain/osis-portal/commits{/sha}","git_commits_url":"https://api.github.com/repos/uclouvain/osis-portal/git/commits{/sha}","comments_url":"https://api.github.com/repos/uclouvain/osis-portal/comments{/number}","issue_comment_url":"https://api.github.com/repos/uclouvain/osis-portal/issues/comments{/number}","contents_url":"https://api.github.com/repos/uclouvain/osis-portal/contents/{+path}","compare_url":"https://api.github.com/repos/uclouvain/osis-portal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uclouvain/osis-portal/merges","archive_url":"https://api.github.com/repos/uclouvain/osis-portal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uclouvain/osis-portal/downloads","issues_url":"https://api.github.com/repos/uclouvain/osis-portal/issues{/number}","pulls_url":"https://api.github.com/repos/uclouvain/osis-portal/pulls{/number}","milestones_url":"https://api.github.com/repos/uclouvain/osis-portal/milestones{/number}","notifications_url":"https://api.github.com/repos/uclouvain/osis-portal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uclouvain/osis-portal/labels{/name}","releases_url":"https://api.github.com/repos/uclouvain/osis-portal/releases{/id}","deployments_url":"https://api.github.com/repos/uclouvain/osis-portal/deployments","created_at":"2015-10-14T13:54:31Z","updated_at":"2016-05-09T11:59:11Z","pushed_at":"2016-07-20T13:19:44Z","git_url":"git://github.com/uclouvain/osis-portal.git","ssh_url":"git@github.com:uclouvain/osis-portal.git","clone_url":"https://github.com/uclouvain/osis-portal.git","svn_url":"https://github.com/uclouvain/osis-portal","homepage":null,"size":6557,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":76,"forks":1,"open_issues":76,"watchers":0,"default_branch":"dev"}},"base":{"label":"uclouvain:dev","ref":"dev","sha":"e7f317420ff9e3c4cf78a83ea75a8270435a0cea","user":{"login":"uclouvain","id":9862060,"avatar_url":"https://avatars.githubusercontent.com/u/9862060?v=3","gravatar_id":"","url":"https://api.github.com/users/uclouvain","html_url":"https://github.com/uclouvain","followers_url":"https://api.github.com/users/uclouvain/followers","following_url":"https://api.github.com/users/uclouvain/following{/other_user}","gists_url":"https://api.github.com/users/uclouvain/gists{/gist_id}","starred_url":"https://api.github.com/users/uclouvain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uclouvain/subscriptions","organizations_url":"https://api.github.com/users/uclouvain/orgs","repos_url":"https://api.github.com/users/uclouvain/repos","events_url":"https://api.github.com/users/uclouvain/events{/privacy}","received_events_url":"https://api.github.com/users/uclouvain/received_events","type":"Organization","site_admin":false},"repo":{"id":44250834,"name":"osis-portal","full_name":"uclouvain/osis-portal","owner":{"login":"uclouvain","id":9862060,"avatar_url":"https://avatars.githubusercontent.com/u/9862060?v=3","gravatar_id":"","url":"https://api.github.com/users/uclouvain","html_url":"https://github.com/uclouvain","followers_url":"https://api.github.com/users/uclouvain/followers","following_url":"https://api.github.com/users/uclouvain/following{/other_user}","gists_url":"https://api.github.com/users/uclouvain/gists{/gist_id}","starred_url":"https://api.github.com/users/uclouvain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uclouvain/subscriptions","organizations_url":"https://api.github.com/users/uclouvain/orgs","repos_url":"https://api.github.com/users/uclouvain/repos","events_url":"https://api.github.com/users/uclouvain/events{/privacy}","received_events_url":"https://api.github.com/users/uclouvain/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uclouvain/osis-portal","description":"","fork":false,"url":"https://api.github.com/repos/uclouvain/osis-portal","forks_url":"https://api.github.com/repos/uclouvain/osis-portal/forks","keys_url":"https://api.github.com/repos/uclouvain/osis-portal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uclouvain/osis-portal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uclouvain/osis-portal/teams","hooks_url":"https://api.github.com/repos/uclouvain/osis-portal/hooks","issue_events_url":"https://api.github.com/repos/uclouvain/osis-portal/issues/events{/number}","events_url":"https://api.github.com/repos/uclouvain/osis-portal/events","assignees_url":"https://api.github.com/repos/uclouvain/osis-portal/assignees{/user}","branches_url":"https://api.github.com/repos/uclouvain/osis-portal/branches{/branch}","tags_url":"https://api.github.com/repos/uclouvain/osis-portal/tags","blobs_url":"https://api.github.com/repos/uclouvain/osis-portal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uclouvain/osis-portal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uclouvain/osis-portal/git/refs{/sha}","trees_url":"https://api.github.com/repos/uclouvain/osis-portal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uclouvain/osis-portal/statuses/{sha}","languages_url":"https://api.github.com/repos/uclouvain/osis-portal/languages","stargazers_url":"https://api.github.com/repos/uclouvain/osis-portal/stargazers","contributors_url":"https://api.github.com/repos/uclouvain/osis-portal/contributors","subscribers_url":"https://api.github.com/repos/uclouvain/osis-portal/subscribers","subscription_url":"https://api.github.com/repos/uclouvain/osis-portal/subscription","commits_url":"https://api.github.com/repos/uclouvain/osis-portal/commits{/sha}","git_commits_url":"https://api.github.com/repos/uclouvain/osis-portal/git/commits{/sha}","comments_url":"https://api.github.com/repos/uclouvain/osis-portal/comments{/number}","issue_comment_url":"https://api.github.com/repos/uclouvain/osis-portal/issues/comments{/number}","contents_url":"https://api.github.com/repos/uclouvain/osis-portal/contents/{+path}","compare_url":"https://api.github.com/repos/uclouvain/osis-portal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uclouvain/osis-portal/merges","archive_url":"https://api.github.com/repos/uclouvain/osis-portal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uclouvain/osis-portal/downloads","issues_url":"https://api.github.com/repos/uclouvain/osis-portal/issues{/number}","pulls_url":"https://api.github.com/repos/uclouvain/osis-portal/pulls{/number}","milestones_url":"https://api.github.com/repos/uclouvain/osis-portal/milestones{/number}","notifications_url":"https://api.github.com/repos/uclouvain/osis-portal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uclouvain/osis-portal/labels{/name}","releases_url":"https://api.github.com/repos/uclouvain/osis-portal/releases{/id}","deployments_url":"https://api.github.com/repos/uclouvain/osis-portal/deployments","created_at":"2015-10-14T13:54:31Z","updated_at":"2016-05-09T11:59:11Z","pushed_at":"2016-07-20T13:19:44Z","git_url":"git://github.com/uclouvain/osis-portal.git","ssh_url":"git@github.com:uclouvain/osis-portal.git","clone_url":"https://github.com/uclouvain/osis-portal.git","svn_url":"https://github.com/uclouvain/osis-portal","homepage":null,"size":6557,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":76,"forks":1,"open_issues":76,"watchers":0,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/uclouvain/osis-portal/pulls/218"},"html":{"href":"https://github.com/uclouvain/osis-portal/pull/218"},"issue":{"href":"https://api.github.com/repos/uclouvain/osis-portal/issues/218"},"comments":{"href":"https://api.github.com/repos/uclouvain/osis-portal/issues/218/comments"},"review_comments":{"href":"https://api.github.com/repos/uclouvain/osis-portal/pulls/218/comments"},"review_comment":{"href":"https://api.github.com/repos/uclouvain/osis-portal/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/uclouvain/osis-portal/pulls/218/commits"},"statuses":{"href":"https://api.github.com/repos/uclouvain/osis-portal/statuses/c641f9096206cb437855a716e73f23aabe14b6a8"}}}}
{"actor":{"display_login":"htmfilho"}}