16 lines
341 B
Python
16 lines
341 B
Python
import logging
|
|
|
|
from django.conf.urls import url
|
|
from django.http import HttpResponse
|
|
|
|
|
|
def helloworld(request):
|
|
logging.getLogger(__name__).error('wat!')
|
|
if 'raise' in request.GET:
|
|
raise Exception('wat!')
|
|
return HttpResponse('Hello world %s' % request.META['REMOTE_ADDR'])
|
|
|
|
urlpatterns = [
|
|
url(r'^$', helloworld),
|
|
]
|