-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhandlers.py
More file actions
29 lines (21 loc) · 793 Bytes
/
handlers.py
File metadata and controls
29 lines (21 loc) · 793 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# (c) 2011 by Anton Korenyushkin
from piston.handler import BaseHandler
from django.http import HttpResponse
from django.shortcuts import render_to_response
from django.core.mail import send_mail
from settings import DEBUG
from paths import KAPPA_VERSION
class IDEHandler(BaseHandler):
allowed_methods = ('GET',)
def get(self, request):
return render_to_response(
'ide.html', {'DEBUG': DEBUG, 'KAPPA_VERSION': KAPPA_VERSION})
class ContactHandler(BaseHandler):
allowed_methods = ('POST',)
def post(self, request):
send_mail(
'From ' + (request.data['email'].strip() or 'anonym'),
request.data['message'],
None,
('info@akshell.com', 'main@akshell.flowdock.com',))
return HttpResponse()