silly proxy

This commit is contained in:
Sanj 2011-08-11 01:12:39 +05:30
parent 244694b2a4
commit 008503d447
2 changed files with 14 additions and 0 deletions

View File

@ -1,6 +1,19 @@
# Create your views here.
from settings import IRC_SERVER, DEFAULT_CHANNEL
from django.shortcuts import render_to_response
import urllib2
from django.http import HttpResponse
'''
PLEASE DELETE THIS VIEW. IT IS FOR SOME TOTALLY UNRELATED NONSENSE
'''
def proxyTmp(request):
url = request.GET.get("url", "")
if url != '':
txt = urllib2.urlopen(url).read()
return HttpResponse(txt)
else:
return HttpResponse('wha?')
def main(request, channel):
if channel == '':

View File

@ -7,6 +7,7 @@ from django.conf.urls.defaults import *
urlpatterns = patterns('',
# Example:
# (r'^campchat/', include('campchat.foo.urls')),
(r'proxy$', 'chat.views.proxyTmp'),
(r'(?P<channel>.*)', 'chat.views.main'),
# Uncomment the admin/doc line below to enable admin documentation:
# (r'^admin/doc/', include('django.contrib.admindocs.urls')),