Add POST ability to git pull

This commit is contained in:
Paul committed 2015-03-06 09:10:35 +00:00
1 parent 85415eaf29
commit f0860ae4de
1 file changed
+1
+1
View File
@@ -20,6 +20,7 @@ AUTHORIZE_URL = 'https://publicapi.avans.nl/oauth/saml.php?oauth_token=%s'
consumer = oauth.Consumer(AVANS_KEY, AVANS_SECRET) consumer = oauth.Consumer(AVANS_KEY, AVANS_SECRET)
client = oauth.Client(consumer) client = oauth.Client(consumer)
@csrf_exempt
def git_pull(request): def git_pull(request):
output = subprocess.check_output(["git", "-C", "/var/www/sec1.aii.avans.nl", "pull"]) output = subprocess.check_output(["git", "-C", "/var/www/sec1.aii.avans.nl", "pull"])
return HttpResponse(output) return HttpResponse(output)