prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Do not print page title above each page
  Having a h1 HOME on your home page looks stupid. Either remove this completely and show currently selected page in menu, or put page title at top of content by default, so it is there by default  but can be edited away if needed 
  
  
  </issue>
  <code>
  [start of django/comicsite/views.py]
  1 '''
  2 Created on Jun 18, 2012
  3 
  4 Testing views. Each of these views is referenced in urls.py 
  5 
  6 @author: Sjoerd
  7 '''
  8 
  9 from django.http import HttpResponse
  10 from django.http import Http404
  11 from django.shortcuts import render_to_response
  12 from django.template import RequestContext
  13 
  14 from comicsite.models import ComicSite,Page,ComicSiteException
  15 from dataproviders import FileSystemDataProvider
  16 
  17 
  18 def index(request):
  19     return  HttpResponse("ComicSite index page.",context_instance=RequestContext(request))
  20 
  21 
  22 def site(request, site_short_name):
  23     """ show a single COMIC site, default start page """
  24     #TODO: Is it bad to use site name here, which is not the specified key?
  25     
  26     site = getSite(site_short_name)
  27                     
  28     pages = getPages(site_short_name)
  29     
  30     return render_to_response('page.html', {'site': site, 'page': pages[0], "pages":pages },context_instance=RequestContext(request))
  31     
  32 
  33 def page(request, site_short_name, page_title):
  34     """ show a single page on a site """
  35     
  36     try:
  37         p = Page.objects.get(ComicSite__short_name=site_short_name, title=page_title)
  38     except Page.DoesNotExist:                
  39         raise Http404
  40     pages = getPages(site_short_name)
  41     
  42     return render_to_response('page.html', {'site': p.ComicSite, 'page': p, "pages":pages },context_instance=RequestContext(request))
  43                 
  44     
  45     
  46 
  47 def dataPage(request):
  48     """ test function for data provider. Just get some files from provider and show them as list"""
  49     #= r"D:\userdata\Sjoerd\Aptana Studio 3 Workspace\comic-django\django\static\files"
  50     
  51     path = r"D:\userdata\Sjoerd\Aptana Studio 3 Workspace\comic-django\django\static\files"
  52     dp = FileSystemDataProvider.FileSystemDataProvider(path)
  53     images = dp.getImages()
  54     
  55     htmlOut = "available files:"+", ".join(images)
  56     p = createTestPage(html=htmlOut)
  57     pages = [p]
  58     
  59     return render_to_response('page.html', {'site': p.ComicSite, 'page': p, "pages":pages },context_instance=RequestContext(request))
  60 
  61 # ======================================== not called directly from urls.py =========================================
  62 
  63 def getSite(site_short_name):
  64     try:
  65         site = ComicSite.objects.get(short_name=site_short_name)
  66     except ComicSite.DoesNotExist:                
  67         raise Http404   
  68     return site  
  69     
  70     
  71 def getPages(site_short_name):
  72     """ get all pages of the given site from db"""
  73     try:
  74         pages = Page.objects.filter(ComicSite__short_name=site_short_name)
  75     except Page.DoesNotExist:                
  76         raise Http404
  77     return pages
  78 
  79 # trying to follow pep 0008 here, finally.
  80 def site_exists(site_short_name):
  81     try:
  82         site = ComicSite.objects.get(short_name=site_short_name)
  83         return True
  84     except ComicSite.DoesNotExist:                
  85         return False
  86     
  87     
  88 # ======================================================  debug and test ==================================================
  89 def createTestPage(title="testPage",html=""):
  90     """ Create a quick mockup on the ComicSite 'Test'"""
  91     
  92     if site_exists("test"):
  93         #TODO log a warning here, no exception.
  94         raise ComicSiteException("I am creating a spoof ComicSite called 'test' on the fly, by a project called 'test' was already defined in DB. This message should be a warning instead of an exception")                
  95     
  96     # if no site exists by that name, create it on the fly.
  97     site = ComicSite()
  98     site.short_name = "test"
  99     site.name = "Test Page"
  100     site.skin = ""
  101         
  102     return Page(ComicSite=site,title=title,html=html)
  103     
  104 
  105 def givePageHTML(page):
  106     return "<h1>%s</h1> <p>%s</p>" %(page.title ,page.html)
  [end of django/comicsite/views.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/django/comicsite/views.py b/django/comicsite/views.py
  --- a/django/comicsite/views.py
  +++ b/django/comicsite/views.py
  @@ -27,7 +27,7 @@
                       
       pages = getPages(site_short_name)
       
  -    return render_to_response('page.html', {'site': site, 'page': pages[0], "pages":pages },context_instance=RequestContext(request))
  +    return render_to_response('page.html', {'site': site, 'currentpage': pages[0], "pages":pages },context_instance=RequestContext(request))
       
   
   def page(request, site_short_name, page_title):
  @@ -39,7 +39,7 @@
           raise Http404
       pages = getPages(site_short_name)
       
  -    return render_to_response('page.html', {'site': p.ComicSite, 'page': p, "pages":pages },context_instance=RequestContext(request))
  +    return render_to_response('page.html', {'site': p.ComicSite, 'currentpage': p, "pages":pages },context_instance=RequestContext(request))
  
verification_info: {"golden_diff": "diff --git a/django/comicsite/views.py b/django/comicsite/views.py\n--- a/django/comicsite/views.py\n+++ b/django/comicsite/views.py\n@@ -27,7 +27,7 @@\n                     \n     pages = getPages(site_short_name)\n     \n-    return render_to_response('page.html', {'site': site, 'page': pages[0], \"pages\":pages },context_instance=RequestContext(request))\n+    return render_to_response('page.html', {'site': site, 'currentpage': pages[0], \"pages\":pages },context_instance=RequestContext(request))\n     \n \n def page(request, site_short_name, page_title):\n@@ -39,7 +39,7 @@\n         raise Http404\n     pages = getPages(site_short_name)\n     \n-    return render_to_response('page.html', {'site': p.ComicSite, 'page': p, \"pages\":pages },context_instance=RequestContext(request))\n+    return render_to_response('page.html', {'site': p.ComicSite, 'currentpage': p, \"pages\":pages },context_instance=RequestContext(request))\n", "issue": "Do not print page title above each page\nHaving a h1 HOME on your home page looks stupid. Either remove this completely and show currently selected page in menu, or put page title at top of content by default, so it is there by default  but can be edited away if needed \n\n", "before_files": [{"content": "'''\nCreated on Jun 18, 2012\n\nTesting views. Each of these views is referenced in urls.py \n\n@author: Sjoerd\n'''\n\nfrom django.http import HttpResponse\nfrom django.http import Http404\nfrom django.shortcuts import render_to_response\nfrom django.template import RequestContext\n\nfrom comicsite.models import ComicSite,Page,ComicSiteException\nfrom dataproviders import FileSystemDataProvider\n\n\ndef index(request):\n    return  HttpResponse(\"ComicSite index page.\",context_instance=RequestContext(request))\n\n\ndef site(request, site_short_name):\n    \"\"\" show a single COMIC site, default start page \"\"\"\n    #TODO: Is it bad to use site name here, which is not the specified key?\n    \n    site = getSite(site_short_name)\n                    \n    pages = getPages(site_short_name)\n    \n    return render_to_response('page.html', {'site': site, 'page': pages[0], \"pages\":pages },context_instance=RequestContext(request))\n    \n\ndef page(request, site_short_name, page_title):\n    \"\"\" show a single page on a site \"\"\"\n    \n    try:\n        p = Page.objects.get(ComicSite__short_name=site_short_name, title=page_title)\n    except Page.DoesNotExist:                \n        raise Http404\n    pages = getPages(site_short_name)\n    \n    return render_to_response('page.html', {'site': p.ComicSite, 'page': p, \"pages\":pages },context_instance=RequestContext(request))\n                \n    \n    \n\ndef dataPage(request):\n    \"\"\" test function for data provider. Just get some files from provider and show them as list\"\"\"\n    #= r\"D:\\userdata\\Sjoerd\\Aptana Studio 3 Workspace\\comic-django\\django\\static\\files\"\n    \n    path = r\"D:\\userdata\\Sjoerd\\Aptana Studio 3 Workspace\\comic-django\\django\\static\\files\"\n    dp = FileSystemDataProvider.FileSystemDataProvider(path)\n    images = dp.getImages()\n    \n    htmlOut = \"available files:\"+\", \".join(images)\n    p = createTestPage(html=htmlOut)\n    pages = [p]\n    \n    return render_to_response('page.html', {'site': p.ComicSite, 'page': p, \"pages\":pages },context_instance=RequestContext(request))\n\n# ======================================== not called directly from urls.py =========================================\n\ndef getSite(site_short_name):\n    try:\n        site = ComicSite.objects.get(short_name=site_short_name)\n    except ComicSite.DoesNotExist:                \n        raise Http404   \n    return site  \n    \n    \ndef getPages(site_short_name):\n    \"\"\" get all pages of the given site from db\"\"\"\n    try:\n        pages = Page.objects.filter(ComicSite__short_name=site_short_name)\n    except Page.DoesNotExist:                \n        raise Http404\n    return pages\n\n# trying to follow pep 0008 here, finally.\ndef site_exists(site_short_name):\n    try:\n        site = ComicSite.objects.get(short_name=site_short_name)\n        return True\n    except ComicSite.DoesNotExist:                \n        return False\n    \n    \n# ======================================================  debug and test ==================================================\ndef createTestPage(title=\"testPage\",html=\"\"):\n    \"\"\" Create a quick mockup on the ComicSite 'Test'\"\"\"\n    \n    if site_exists(\"test\"):\n        #TODO log a warning here, no exception.\n        raise ComicSiteException(\"I am creating a spoof ComicSite called 'test' on the fly, by a project called 'test' was already defined in DB. This message should be a warning instead of an exception\")                \n    \n    # if no site exists by that name, create it on the fly.\n    site = ComicSite()\n    site.short_name = \"test\"\n    site.name = \"Test Page\"\n    site.skin = \"\"\n        \n    return Page(ComicSite=site,title=title,html=html)\n    \n\ndef givePageHTML(page):\n    return \"<h1>%s</h1> <p>%s</p>\" %(page.title ,page.html)", "path": "django/comicsite/views.py"}]}