prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Ability to format company-url
  ![screenshot from 2014-01-29 17 32 37](https://f.cloud.github.com/assets/1758308/2031524/225447e4-8903-11e3-9de0-90237ad655ba.png)
  Like in this case, this ugly url should be formated to vimsa.no or the like. 
  
  
  </issue>
  <code>
  [start of apps/companyprofile/models.py]
  1 from django.db import models
  2 from django.utils.translation import ugettext_lazy as _
  3 from filebrowser.fields import FileBrowseField
  4 
  5 class Company(models.Model):
  6 
  7     IMAGE_FOLDER = "images/companies"
  8     IMAGE_EXTENSIONS = ['.jpg', '.jpeg', '.gif', '.png', '.tif', '.tiff']
  9 
  10 
  11     name = models.CharField(_(u"bedriftsnavn"), max_length=100)
  12     short_description = models.TextField(_(u"kort beskrivelse"), max_length=200)
  13     long_description = models.TextField(_(u"utdypende beskrivelse"), blank=True, null=True)
  14     image = FileBrowseField(_(u"bilde"), 
  15         max_length=200, directory=IMAGE_FOLDER,
  16         extensions=IMAGE_EXTENSIONS, null=False, blank=False)
  17     site = models.URLField(_(u"hjemmeside"))
  18     email_address = models.EmailField(_(u"epostaddresse"), max_length=75, blank=True, null=True)
  19     phone_number = models.CharField(_(u"telefonnummer"), max_length=20, blank=True, null=True)
  20 
  21     def __unicode__(self):
  22         return self.name
  23 
  24     class Meta:
  25         verbose_name = _(u"Bedrift")
  26         verbose_name_plural = _(u"Bedrifter")
  27
  [end of apps/companyprofile/models.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/apps/companyprofile/models.py b/apps/companyprofile/models.py
  --- a/apps/companyprofile/models.py
  +++ b/apps/companyprofile/models.py
  @@ -14,7 +14,7 @@
       image = FileBrowseField(_(u"bilde"), 
           max_length=200, directory=IMAGE_FOLDER,
           extensions=IMAGE_EXTENSIONS, null=False, blank=False)
  -    site = models.URLField(_(u"hjemmeside"))
  +    site = models.CharField(_(u"hjemmeside"), max_length=100)
       email_address = models.EmailField(_(u"epostaddresse"), max_length=75, blank=True, null=True)
       phone_number = models.CharField(_(u"telefonnummer"), max_length=20, blank=True, null=True)
  
verification_info: {"golden_diff": "diff --git a/apps/companyprofile/models.py b/apps/companyprofile/models.py\n--- a/apps/companyprofile/models.py\n+++ b/apps/companyprofile/models.py\n@@ -14,7 +14,7 @@\n     image = FileBrowseField(_(u\"bilde\"), \n         max_length=200, directory=IMAGE_FOLDER,\n         extensions=IMAGE_EXTENSIONS, null=False, blank=False)\n-    site = models.URLField(_(u\"hjemmeside\"))\n+    site = models.CharField(_(u\"hjemmeside\"), max_length=100)\n     email_address = models.EmailField(_(u\"epostaddresse\"), max_length=75, blank=True, null=True)\n     phone_number = models.CharField(_(u\"telefonnummer\"), max_length=20, blank=True, null=True)\n", "issue": "Ability to format company-url\n![screenshot from 2014-01-29 17 32 37](https://f.cloud.github.com/assets/1758308/2031524/225447e4-8903-11e3-9de0-90237ad655ba.png)\nLike in this case, this ugly url should be formated to vimsa.no or the like. \n\n", "before_files": [{"content": "from django.db import models\nfrom django.utils.translation import ugettext_lazy as _\nfrom filebrowser.fields import FileBrowseField\n\nclass Company(models.Model):\n\n    IMAGE_FOLDER = \"images/companies\"\n    IMAGE_EXTENSIONS = ['.jpg', '.jpeg', '.gif', '.png', '.tif', '.tiff']\n\n\n    name = models.CharField(_(u\"bedriftsnavn\"), max_length=100)\n    short_description = models.TextField(_(u\"kort beskrivelse\"), max_length=200)\n    long_description = models.TextField(_(u\"utdypende beskrivelse\"), blank=True, null=True)\n    image = FileBrowseField(_(u\"bilde\"), \n        max_length=200, directory=IMAGE_FOLDER,\n        extensions=IMAGE_EXTENSIONS, null=False, blank=False)\n    site = models.URLField(_(u\"hjemmeside\"))\n    email_address = models.EmailField(_(u\"epostaddresse\"), max_length=75, blank=True, null=True)\n    phone_number = models.CharField(_(u\"telefonnummer\"), max_length=20, blank=True, null=True)\n\n    def __unicode__(self):\n        return self.name\n\n    class Meta:\n        verbose_name = _(u\"Bedrift\")\n        verbose_name_plural = _(u\"Bedrifter\")\n", "path": "apps/companyprofile/models.py"}]}