silly proxy
This commit is contained in:
parent
244694b2a4
commit
008503d447
|
@ -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 == '':
|
||||
|
|
|
@ -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')),
|
||||
|
|
Loading…
Reference in New Issue
Block a user