old_contents: from django.shortcuts import render_to_response
  from django.template import RequestContext
  from django.template.loader import get_template
  from django.http import HttpResponse
  
  from scipy_central.utils import get_IP_address
  
  import logging
  logger = logging.getLogger('scipycentral')
  logger.debug('Initializing pages::views.py')
  
  def front_page(request):
      return render_to_response('pages/front-page.html', {},
                                context_instance=RequestContext(request))
  
  
  def about_page(request):
      return render_to_response('pages/about-page.html', {},
                                context_instance=RequestContext(request))
  
  
  def licence_page(request):
      return render_to_response('pages/about-licenses.html', {},
                                context_instance=RequestContext(request))
  
  
  def markup_help(request):
      return render_to_response('pages/markup-help.html', {},
                                context_instance=RequestContext(request))
  
  
  def csrf_failure(request, reason=''):
      """ Provides a better output to the user when they don't have cookies
      enabled on their computer.
      """
      ip = get_IP_address(request)
      logger.info('CSRF failure from %s for request "%s", coming from "%s"' %\
                  (ip, request.path, request.META['HTTP_REFERER']))
      return render_to_response('pages/please-enable-cookies.html', {},
                                context_instance=RequestContext(request))
  
  
  def not_implemented_yet(request):
      """ Track how often users uncover items that haven't been implemented, so
      we can prioritize them
      """
      ip = get_IP_address(request)
      logger.info('Not implemented yet [%s] for request "%s"' % (ip, request.path))
      t = get_template('pages/not-implemented-yet.html')
      html = t.render(RequestContext(request))
      return HttpResponse(html, status=200)
  
  
  def page_404_error(request):
      """ Override Django's 404 handler, because we want to log this also.
      """
      ip = get_IP_address(request)
      logger.info('404 from %s for request "%s"' % (ip, request.path))
      t = get_template('404.html')
      html = t.render(RequestContext(request))
      return HttpResponse(html, status=404)
  
  
  def page_500_error(request):
      """ Override Django's 500 handler, because we want to log this also.
      """
      ip = get_IP_address(request)
      logger.error('500 from %s for request "%s"' % (ip, request.path))
      t = get_template('500.html')
      html = t.render(RequestContext(request))
      return HttpResponse(html, status=500)
  
  
  
new_contents: from django.shortcuts import render_to_response
  from django.template import RequestContext
  from django.template.loader import get_template
  from django.http import HttpResponse
  
  from scipy_central.utils import get_IP_address
  
  import logging
  logger = logging.getLogger('scipycentral')
  logger.debug('Initializing pages::views.py')
  
  def front_page(request):
      return render_to_response('pages/front-page.html', {},
                                context_instance=RequestContext(request))
  
  
  def about_page(request):
      return render_to_response('pages/about-page.html', {},
                                context_instance=RequestContext(request))
  
  
  def licence_page(request):
      return render_to_response('pages/about-licenses.html', {},
                                context_instance=RequestContext(request))
  
  
  def markup_help(request):
      return not_implemented_yet(request)
      #return render_to_response('pages/markup-help.html', {},
      #                          context_instance=RequestContext(request))
  
  
  def csrf_failure(request, reason=''):
      """ Provides a better output to the user when they don't have cookies
      enabled on their computer.
      """
      ip = get_IP_address(request)
      logger.info('CSRF failure from %s for request "%s", coming from "%s"' %\
                  (ip, request.path, request.META['HTTP_REFERER']))
      return render_to_response('pages/please-enable-cookies.html', {},
                                context_instance=RequestContext(request))
  
  
  def not_implemented_yet(request):
      """ Track how often users uncover items that haven't been implemented, so
      we can prioritize them
      """
      ip = get_IP_address(request)
      logger.info('Not implemented yet [%s] for request "%s"' % (ip, request.path))
      t = get_template('pages/not-implemented-yet.html')
      html = t.render(RequestContext(request))
      return HttpResponse(html, status=200)
  
  
  def page_404_error(request):
      """ Override Django's 404 handler, because we want to log this also.
      """
      ip = get_IP_address(request)
      logger.info('404 from %s for request "%s"' % (ip, request.path))
      t = get_template('404.html')
      html = t.render(RequestContext(request))
      return HttpResponse(html, status=404)
  
  
  def page_500_error(request):
      """ Override Django's 500 handler, because we want to log this also.
      """
      ip = get_IP_address(request)
      logger.error('500 from %s for request "%s"' % (ip, request.path))
      t = get_template('500.html')
      html = t.render(RequestContext(request))
      return HttpResponse(html, status=500)
  
  
  
subject: Remove feature