prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  "Startet studie" in Profile -> Medlemskap requires defined format without specifying it
  "Started studie" is a datefield. The problem is that most browsers (like FF, Chrome) don't render these fields with any additional tools which makes filling them out a pain in the ass (Safari@iOS has that fancy datepicker-shit).
  
  The field requires the format 'yyyy-mm-dd', but does not specify this anywhere. This should be fixed somehow.
  
  
  </issue>
  <code>
  [start of apps/profiles/forms.py]
  1 # -*- coding: utf-8 -*-
  2 
  3 from django import forms
  4 from django.utils.translation import ugettext as _
  5 
  6 from apps.profiles.models import Privacy
  7 from apps.authentication.models import OnlineUser, FIELD_OF_STUDY_CHOICES
  8 
  9 class ProfileForm(forms.ModelForm):
  10 
  11     class Meta:
  12         model = OnlineUser
  13 
  14         fields = ['nickname', 'website', 'phone_number', 'address', 'zip_code', 'allergies', 'mark_rules', ]
  15         widgets = {
  16             'allergies' : forms.Textarea(attrs={'id' : 'allergies'}),
  17         }
  18 
  19     def clean(self):
  20         super(ProfileForm, self).clean()
  21 
  22         cleaned_data = self.cleaned_data
  23 
  24         # ZIP code digits only
  25         zip_code = cleaned_data['zip_code']
  26         if len(zip_code) != 0 and (len(zip_code) != 4 or not zip_code.isdigit()):
  27             self._errors['zip_code'] = self.error_class([_(u"Postnummer må bestå av fire siffer.")])
  28 
  29         return cleaned_data
  30 
  31 class ImageForm(forms.ModelForm):
  32 
  33     class Meta:
  34         model = OnlineUser
  35 
  36         fields = ['image']
  37         widgets = {
  38             'image': forms.FileInput(attrs={'class' : 'hidden-input', 'id' : 'image'}),
  39         }
  40 
  41 class PrivacyForm(forms.ModelForm):
  42 
  43     class Meta:
  44         model = Privacy
  45         exclude = ['user']
  46 
  47 
  48 class MailSettingsForm(forms.ModelForm):
  49 
  50     class Meta:
  51         model = OnlineUser
  52         fields = ['infomail', ]
  53 
  54 
  55 class MembershipSettingsForm(forms.ModelForm):
  56 
  57     def __init__(self, *args, **kwargs):
  58         super(MembershipSettingsForm, self).__init__(*args, **kwargs)
  59         self.fields['started_date'].widget.attrs['class'] = 'hasDatePicker'
  60 
  61     class Meta:
  62         model = OnlineUser
  63         fields = ['field_of_study', 'started_date', ]
  64
  [end of apps/profiles/forms.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/profiles/forms.py b/apps/profiles/forms.py
  --- a/apps/profiles/forms.py
  +++ b/apps/profiles/forms.py
  @@ -61,3 +61,7 @@
       class Meta:
           model = OnlineUser
           fields = ['field_of_study', 'started_date', ]
  +
  +        widgets = {
  +            'started_date' : forms.TextInput(attrs={'placeholder' : 'YYYY-MM-DD'}),
  +        }
  
verification_info: {"golden_diff": "diff --git a/apps/profiles/forms.py b/apps/profiles/forms.py\n--- a/apps/profiles/forms.py\n+++ b/apps/profiles/forms.py\n@@ -61,3 +61,7 @@\n     class Meta:\n         model = OnlineUser\n         fields = ['field_of_study', 'started_date', ]\n+\n+        widgets = {\n+            'started_date' : forms.TextInput(attrs={'placeholder' : 'YYYY-MM-DD'}),\n+        }\n", "issue": "\"Startet studie\" in Profile -> Medlemskap requires defined format without specifying it\n\"Started studie\" is a datefield. The problem is that most browsers (like FF, Chrome) don't render these fields with any additional tools which makes filling them out a pain in the ass (Safari@iOS has that fancy datepicker-shit).\n\nThe field requires the format 'yyyy-mm-dd', but does not specify this anywhere. This should be fixed somehow.\n\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n\nfrom django import forms\nfrom django.utils.translation import ugettext as _\n\nfrom apps.profiles.models import Privacy\nfrom apps.authentication.models import OnlineUser, FIELD_OF_STUDY_CHOICES\n\nclass ProfileForm(forms.ModelForm):\n\n    class Meta:\n        model = OnlineUser\n\n        fields = ['nickname', 'website', 'phone_number', 'address', 'zip_code', 'allergies', 'mark_rules', ]\n        widgets = {\n            'allergies' : forms.Textarea(attrs={'id' : 'allergies'}),\n        }\n\n    def clean(self):\n        super(ProfileForm, self).clean()\n\n        cleaned_data = self.cleaned_data\n\n        # ZIP code digits only\n        zip_code = cleaned_data['zip_code']\n        if len(zip_code) != 0 and (len(zip_code) != 4 or not zip_code.isdigit()):\n            self._errors['zip_code'] = self.error_class([_(u\"Postnummer m\u00e5 best\u00e5 av fire siffer.\")])\n\n        return cleaned_data\n\nclass ImageForm(forms.ModelForm):\n\n    class Meta:\n        model = OnlineUser\n\n        fields = ['image']\n        widgets = {\n            'image': forms.FileInput(attrs={'class' : 'hidden-input', 'id' : 'image'}),\n        }\n\nclass PrivacyForm(forms.ModelForm):\n\n    class Meta:\n        model = Privacy\n        exclude = ['user']\n\n\nclass MailSettingsForm(forms.ModelForm):\n\n    class Meta:\n        model = OnlineUser\n        fields = ['infomail', ]\n\n\nclass MembershipSettingsForm(forms.ModelForm):\n\n    def __init__(self, *args, **kwargs):\n        super(MembershipSettingsForm, self).__init__(*args, **kwargs)\n        self.fields['started_date'].widget.attrs['class'] = 'hasDatePicker'\n\n    class Meta:\n        model = OnlineUser\n        fields = ['field_of_study', 'started_date', ]\n", "path": "apps/profiles/forms.py"}]}