We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Update models search field values in admin


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `portal/models.py`
Content:
```
1 # -*- coding: utf-8 -*-
2 # Code for Life
3 #
4 # Copyright (C) 2016, Ocado Innovation Limited
5 #
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU Affero General Public License as
8 # published by the Free Software Foundation, either version 3 of the
9 # License, or (at your option) any later version.
10 #
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU Affero General Public License for more details.
15 #
16 # You should have received a copy of the GNU Affero General Public License
17 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 #
19 # ADDITIONAL TERMS – Section 7 GNU General Public Licence
20 #
21 # This licence does not grant any right, title or interest in any “Ocado” logos,
22 # trade names or the trademark “Ocado” or any other trademarks or domain names
23 # owned by Ocado Innovation Limited or the Ocado group of companies or any other
24 # distinctive brand features of “Ocado” as may be secured from time to time. You
25 # must not distribute any modification of this program using the trademark
26 # “Ocado” or claim any affiliation or association with Ocado or its employees.
27 #
28 # You are not authorised to use the name Ocado (or any of its trade names) or
29 # the names of any author or contributor in advertising or for publicity purposes
30 # pertaining to the distribution of this program, without the prior written
31 # authorisation of Ocado.
32 #
33 # Any propagation, distribution or conveyance of this program must include this
34 # copyright notice and these terms. You must not misrepresent the origins of this
35 # program; modified versions of the program must be marked as such and not
36 # identified as the original program.
37 from __future__ import absolute_import
38 
39 import re
40 import datetime
41 
42 from django.contrib.auth.models import User
43 from django.db import models
44 from django_countries.fields import CountryField
45 from django.core.cache import cache
46 from django.utils import timezone
47 
48 from online_status.status import CACHE_USERS
49 
50 
51 class UserProfile(models.Model):
52     user = models.OneToOneField(User)
53     can_view_aggregated_data = models.BooleanField(default=False)
54     developer = models.BooleanField(default=False)
55 
56     awaiting_email_verification = models.BooleanField(default=False)
57 
58     def __unicode__(self):
59         return self.user.username
60 
61     def joined_recently(self):
62         now = timezone.now()
63         return now - datetime.timedelta(days=7) <= self.user.date_joined
64 
65 
66 class School(models.Model):
67     name = models.CharField(max_length=200)
68     postcode = models.CharField(max_length=10)
69     town = models.CharField(max_length=200)
70     latitude = models.CharField(max_length=20)
71     longitude = models.CharField(max_length=20)
72     country = CountryField(blank_label='(select country)')
73 
74     class Meta:
75         permissions = (
76             ('view_aggregated_data', "Can see available aggregated data"),
77             ('view_map_data', "Can see schools' location displayed on map")
78         )
79 
80     def __unicode__(self):
81         return self.name
82 
83 
84 class TeacherModelManager(models.Manager):
85     def factory(self, title, first_name, last_name, email, password):
86         from portal.helpers.generators import get_random_username
87 
88         user = User.objects.create_user(
89             username=email,
90             email=email,
91             password=password,
92             first_name=first_name,
93             last_name=last_name)
94 
95         user_profile = UserProfile.objects.create(user=user)
96 
97         return Teacher.objects.create(user=user_profile, new_user=user, title=title)
98 
99 
100 class Teacher(models.Model):
101     title = models.CharField(max_length=35)
102     user = models.OneToOneField(UserProfile)
103     new_user = models.OneToOneField(User, related_name='new_teacher', null=True, blank=True)
104     school = models.ForeignKey(School, related_name='teacher_school', null=True)
105     is_admin = models.BooleanField(default=False)
106     pending_join_request = models.ForeignKey(School, related_name='join_request', null=True)
107 
108     objects = TeacherModelManager()
109 
110     def teaches(self, userprofile):
111         if hasattr(userprofile, 'student'):
112             student = userprofile.student
113             return not student.is_independent() and student.class_field.teacher == self
114 
115     def has_school(self):
116         return self.school is not (None or "")
117 
118     def has_class(self):
119         classes = self.class_teacher.all()
120         return classes.count() != 0
121 
122     def class_(self):
123         if self.has_class():
124             classes = self.class_teacher.all()
125             return classes[0]
126         return None
127 
128     def __unicode__(self):
129         return '%s %s' % (self.user.first_name, self.user.last_name)
130 
131 
132 class Class(models.Model):
133     name = models.CharField(max_length=200)
134     teacher = models.ForeignKey(Teacher, related_name='class_teacher')
135     access_code = models.CharField(max_length=5)
136     classmates_data_viewable = models.BooleanField(default=False)
137     always_accept_requests = models.BooleanField(default=False)
138     accept_requests_until = models.DateTimeField(null=True)
139 
140     def __unicode__(self):
141         return self.name
142 
143     def has_students(self):
144         students = self.students.all()
145         return students.count() != 0
146 
147     def get_logged_in_students(self):
148         ONLINE = 1
149 
150         """This gets all the students who are logged in."""
151         users_status = cache.get(CACHE_USERS)
152         online_users_status = filter(lambda status: status.status == ONLINE, users_status)
153         online_user_ids = map(lambda status: status.user.id, online_users_status)
154 
155         # Query all logged in users based on id list
156         return Student.objects.filter(class_field=self).filter(new_user__id__in=online_user_ids)
157 
158     class Meta:
159         verbose_name_plural = "classes"
160 
161 
162 class StudentModelManager(models.Manager):
163     def schoolFactory(self, klass, name, password):
164         from portal.helpers.generators import get_random_username
165 
166         user = User.objects.create_user(
167             username=get_random_username(),
168             password=password,
169             first_name=name)
170 
171         user_profile = UserProfile.objects.create(user=user)
172         return Student.objects.create(class_field=klass, user=user_profile, new_user=user)
173 
174     def independentStudentFactory(self, username, name, email, password):
175         user = User.objects.create_user(
176             username=username,
177             email=email,
178             password=password,
179             first_name=name)
180 
181         user_profile = UserProfile.objects.create(user=user)
182 
183         return Student.objects.create(user=user_profile, new_user=user)
184 
185 
186 class Student(models.Model):
187     class_field = models.ForeignKey(Class, related_name='students', null=True)
188     user = models.OneToOneField(UserProfile)
189     new_user = models.OneToOneField(User, related_name='new_student', null=True, blank=True)
190     pending_class_request = models.ForeignKey(Class, related_name='class_request', null=True)
191 
192     objects = StudentModelManager()
193 
194     def is_independent(self):
195         return not self.class_field
196 
197     def __unicode__(self):
198         return '%s %s' % (self.new_user.first_name, self.new_user.last_name)
199 
200 
201 def stripStudentName(name):
202     return re.sub('[ \t]+', ' ', name.strip())
203 
204 
205 class Guardian(models.Model):
206     name = models.CharField(max_length=200)
207     children = models.ManyToManyField(Student)
208     user = models.OneToOneField(UserProfile)
209     new_user = models.OneToOneField(User, related_name='new_guardian', null=True, blank=True)
210 
211     def __unicode__(self):
212         return '%s %s' % (self.new_user.first_name, self.new_user.last_name)
213 
214 
215 class EmailVerification(models.Model):
216     user = models.ForeignKey(User, related_name='email_verifications', null=True, blank=True)
217     token = models.CharField(max_length=30)
218     email = models.CharField(max_length=200, null=True, default=None, blank=True)
219     expiry = models.DateTimeField()
220     verified = models.BooleanField(default=False)
221 
222 
223 class FrontPageNews(models.Model):
224     title = models.CharField(max_length=200)
225     text = models.CharField(max_length=1000)
226     link = models.CharField(max_length=500)
227     link_text = models.CharField(max_length=200)
228     added_dstamp = models.DateTimeField()
229 
230     class Meta:
231         verbose_name_plural = "front page news"
232 
233     def __unicode__(self):
234         return self.title
235 
236 
237 from . import handlers  # noqa
238
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/portal/models.py b/portal/models.py
--- a/portal/models.py
+++ b/portal/models.py
@@ -126,7 +126,7 @@
         return None
 
     def __unicode__(self):
-        return '%s %s' % (self.user.first_name, self.user.last_name)
+        return '%s %s' % (self.new_user.first_name, self.new_user.last_name)
 
 
 class Class(models.Model):

{"golden_diff": "diff --git a/portal/models.py b/portal/models.py\n--- a/portal/models.py\n+++ b/portal/models.py\n@@ -126,7 +126,7 @@\n         return None\n \n     def __unicode__(self):\n-        return '%s %s' % (self.user.first_name, self.user.last_name)\n+        return '%s %s' % (self.new_user.first_name, self.new_user.last_name)\n \n \n class Class(models.Model):\n", "issue": "Update models search field values in admin\n\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n# Code for Life\n#\n# Copyright (C) 2016, Ocado Innovation Limited\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Affero General Public License as\n# published by the Free Software Foundation, either version 3 of the\n# License, or (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU Affero General Public License for more details.\n#\n# You should have received a copy of the GNU Affero General Public License\n# along with this program.  If not, see <http://www.gnu.org/licenses/>.\n#\n# ADDITIONAL TERMS \u2013 Section 7 GNU General Public Licence\n#\n# This licence does not grant any right, title or interest in any \u201cOcado\u201d logos,\n# trade names or the trademark \u201cOcado\u201d or any other trademarks or domain names\n# owned by Ocado Innovation Limited or the Ocado group of companies or any other\n# distinctive brand features of \u201cOcado\u201d as may be secured from time to time. You\n# must not distribute any modification of this program using the trademark\n# \u201cOcado\u201d or claim any affiliation or association with Ocado or its employees.\n#\n# You are not authorised to use the name Ocado (or any of its trade names) or\n# the names of any author or contributor in advertising or for publicity purposes\n# pertaining to the distribution of this program, without the prior written\n# authorisation of Ocado.\n#\n# Any propagation, distribution or conveyance of this program must include this\n# copyright notice and these terms. You must not misrepresent the origins of this\n# program; modified versions of the program must be marked as such and not\n# identified as the original program.\nfrom __future__ import absolute_import\n\nimport re\nimport datetime\n\nfrom django.contrib.auth.models import User\nfrom django.db import models\nfrom django_countries.fields import CountryField\nfrom django.core.cache import cache\nfrom django.utils import timezone\n\nfrom online_status.status import CACHE_USERS\n\n\nclass UserProfile(models.Model):\n    user = models.OneToOneField(User)\n    can_view_aggregated_data = models.BooleanField(default=False)\n    developer = models.BooleanField(default=False)\n\n    awaiting_email_verification = models.BooleanField(default=False)\n\n    def __unicode__(self):\n        return self.user.username\n\n    def joined_recently(self):\n        now = timezone.now()\n        return now - datetime.timedelta(days=7) <= self.user.date_joined\n\n\nclass School(models.Model):\n    name = models.CharField(max_length=200)\n    postcode = models.CharField(max_length=10)\n    town = models.CharField(max_length=200)\n    latitude = models.CharField(max_length=20)\n    longitude = models.CharField(max_length=20)\n    country = CountryField(blank_label='(select country)')\n\n    class Meta:\n        permissions = (\n            ('view_aggregated_data', \"Can see available aggregated data\"),\n            ('view_map_data', \"Can see schools' location displayed on map\")\n        )\n\n    def __unicode__(self):\n        return self.name\n\n\nclass TeacherModelManager(models.Manager):\n    def factory(self, title, first_name, last_name, email, password):\n        from portal.helpers.generators import get_random_username\n\n        user = User.objects.create_user(\n            username=email,\n            email=email,\n            password=password,\n            first_name=first_name,\n            last_name=last_name)\n\n        user_profile = UserProfile.objects.create(user=user)\n\n        return Teacher.objects.create(user=user_profile, new_user=user, title=title)\n\n\nclass Teacher(models.Model):\n    title = models.CharField(max_length=35)\n    user = models.OneToOneField(UserProfile)\n    new_user = models.OneToOneField(User, related_name='new_teacher', null=True, blank=True)\n    school = models.ForeignKey(School, related_name='teacher_school', null=True)\n    is_admin = models.BooleanField(default=False)\n    pending_join_request = models.ForeignKey(School, related_name='join_request', null=True)\n\n    objects = TeacherModelManager()\n\n    def teaches(self, userprofile):\n        if hasattr(userprofile, 'student'):\n            student = userprofile.student\n            return not student.is_independent() and student.class_field.teacher == self\n\n    def has_school(self):\n        return self.school is not (None or \"\")\n\n    def has_class(self):\n        classes = self.class_teacher.all()\n        return classes.count() != 0\n\n    def class_(self):\n        if self.has_class():\n            classes = self.class_teacher.all()\n            return classes[0]\n        return None\n\n    def __unicode__(self):\n        return '%s %s' % (self.user.first_name, self.user.last_name)\n\n\nclass Class(models.Model):\n    name = models.CharField(max_length=200)\n    teacher = models.ForeignKey(Teacher, related_name='class_teacher')\n    access_code = models.CharField(max_length=5)\n    classmates_data_viewable = models.BooleanField(default=False)\n    always_accept_requests = models.BooleanField(default=False)\n    accept_requests_until = models.DateTimeField(null=True)\n\n    def __unicode__(self):\n        return self.name\n\n    def has_students(self):\n        students = self.students.all()\n        return students.count() != 0\n\n    def get_logged_in_students(self):\n        ONLINE = 1\n\n        \"\"\"This gets all the students who are logged in.\"\"\"\n        users_status = cache.get(CACHE_USERS)\n        online_users_status = filter(lambda status: status.status == ONLINE, users_status)\n        online_user_ids = map(lambda status: status.user.id, online_users_status)\n\n        # Query all logged in users based on id list\n        return Student.objects.filter(class_field=self).filter(new_user__id__in=online_user_ids)\n\n    class Meta:\n        verbose_name_plural = \"classes\"\n\n\nclass StudentModelManager(models.Manager):\n    def schoolFactory(self, klass, name, password):\n        from portal.helpers.generators import get_random_username\n\n        user = User.objects.create_user(\n            username=get_random_username(),\n            password=password,\n            first_name=name)\n\n        user_profile = UserProfile.objects.create(user=user)\n        return Student.objects.create(class_field=klass, user=user_profile, new_user=user)\n\n    def independentStudentFactory(self, username, name, email, password):\n        user = User.objects.create_user(\n            username=username,\n            email=email,\n            password=password,\n            first_name=name)\n\n        user_profile = UserProfile.objects.create(user=user)\n\n        return Student.objects.create(user=user_profile, new_user=user)\n\n\nclass Student(models.Model):\n    class_field = models.ForeignKey(Class, related_name='students', null=True)\n    user = models.OneToOneField(UserProfile)\n    new_user = models.OneToOneField(User, related_name='new_student', null=True, blank=True)\n    pending_class_request = models.ForeignKey(Class, related_name='class_request', null=True)\n\n    objects = StudentModelManager()\n\n    def is_independent(self):\n        return not self.class_field\n\n    def __unicode__(self):\n        return '%s %s' % (self.new_user.first_name, self.new_user.last_name)\n\n\ndef stripStudentName(name):\n    return re.sub('[ \\t]+', ' ', name.strip())\n\n\nclass Guardian(models.Model):\n    name = models.CharField(max_length=200)\n    children = models.ManyToManyField(Student)\n    user = models.OneToOneField(UserProfile)\n    new_user = models.OneToOneField(User, related_name='new_guardian', null=True, blank=True)\n\n    def __unicode__(self):\n        return '%s %s' % (self.new_user.first_name, self.new_user.last_name)\n\n\nclass EmailVerification(models.Model):\n    user = models.ForeignKey(User, related_name='email_verifications', null=True, blank=True)\n    token = models.CharField(max_length=30)\n    email = models.CharField(max_length=200, null=True, default=None, blank=True)\n    expiry = models.DateTimeField()\n    verified = models.BooleanField(default=False)\n\n\nclass FrontPageNews(models.Model):\n    title = models.CharField(max_length=200)\n    text = models.CharField(max_length=1000)\n    link = models.CharField(max_length=500)\n    link_text = models.CharField(max_length=200)\n    added_dstamp = models.DateTimeField()\n\n    class Meta:\n        verbose_name_plural = \"front page news\"\n\n    def __unicode__(self):\n        return self.title\n\n\nfrom . import handlers  # noqa\n", "path": "portal/models.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\n# Code for Life\n#\n# Copyright (C) 2016, Ocado Innovation Limited\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Affero General Public License as\n# published by the Free Software Foundation, either version 3 of the\n# License, or (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU Affero General Public License for more details.\n#\n# You should have received a copy of the GNU Affero General Public License\n# along with this program.  If not, see <http://www.gnu.org/licenses/>.\n#\n# ADDITIONAL TERMS \u2013 Section 7 GNU General Public Licence\n#\n# This licence does not grant any right, title or interest in any \u201cOcado\u201d logos,\n# trade names or the trademark \u201cOcado\u201d or any other trademarks or domain names\n# owned by Ocado Innovation Limited or the Ocado group of companies or any other\n# distinctive brand features of \u201cOcado\u201d as may be secured from time to time. You\n# must not distribute any modification of this program using the trademark\n# \u201cOcado\u201d or claim any affiliation or association with Ocado or its employees.\n#\n# You are not authorised to use the name Ocado (or any of its trade names) or\n# the names of any author or contributor in advertising or for publicity purposes\n# pertaining to the distribution of this program, without the prior written\n# authorisation of Ocado.\n#\n# Any propagation, distribution or conveyance of this program must include this\n# copyright notice and these terms. You must not misrepresent the origins of this\n# program; modified versions of the program must be marked as such and not\n# identified as the original program.\nfrom __future__ import absolute_import\n\nimport re\nimport datetime\n\nfrom django.contrib.auth.models import User\nfrom django.db import models\nfrom django_countries.fields import CountryField\nfrom django.core.cache import cache\nfrom django.utils import timezone\n\nfrom online_status.status import CACHE_USERS\n\n\nclass UserProfile(models.Model):\n    user = models.OneToOneField(User)\n    can_view_aggregated_data = models.BooleanField(default=False)\n    developer = models.BooleanField(default=False)\n\n    awaiting_email_verification = models.BooleanField(default=False)\n\n    def __unicode__(self):\n        return self.user.username\n\n    def joined_recently(self):\n        now = timezone.now()\n        return now - datetime.timedelta(days=7) <= self.user.date_joined\n\n\nclass School(models.Model):\n    name = models.CharField(max_length=200)\n    postcode = models.CharField(max_length=10)\n    town = models.CharField(max_length=200)\n    latitude = models.CharField(max_length=20)\n    longitude = models.CharField(max_length=20)\n    country = CountryField(blank_label='(select country)')\n\n    class Meta:\n        permissions = (\n            ('view_aggregated_data', \"Can see available aggregated data\"),\n            ('view_map_data', \"Can see schools' location displayed on map\")\n        )\n\n    def __unicode__(self):\n        return self.name\n\n\nclass TeacherModelManager(models.Manager):\n    def factory(self, title, first_name, last_name, email, password):\n        from portal.helpers.generators import get_random_username\n\n        user = User.objects.create_user(\n            username=email,\n            email=email,\n            password=password,\n            first_name=first_name,\n            last_name=last_name)\n\n        user_profile = UserProfile.objects.create(user=user)\n\n        return Teacher.objects.create(user=user_profile, new_user=user, title=title)\n\n\nclass Teacher(models.Model):\n    title = models.CharField(max_length=35)\n    user = models.OneToOneField(UserProfile)\n    new_user = models.OneToOneField(User, related_name='new_teacher', null=True, blank=True)\n    school = models.ForeignKey(School, related_name='teacher_school', null=True)\n    is_admin = models.BooleanField(default=False)\n    pending_join_request = models.ForeignKey(School, related_name='join_request', null=True)\n\n    objects = TeacherModelManager()\n\n    def teaches(self, userprofile):\n        if hasattr(userprofile, 'student'):\n            student = userprofile.student\n            return not student.is_independent() and student.class_field.teacher == self\n\n    def has_school(self):\n        return self.school is not (None or \"\")\n\n    def has_class(self):\n        classes = self.class_teacher.all()\n        return classes.count() != 0\n\n    def class_(self):\n        if self.has_class():\n            classes = self.class_teacher.all()\n            return classes[0]\n        return None\n\n    def __unicode__(self):\n        return '%s %s' % (self.new_user.first_name, self.new_user.last_name)\n\n\nclass Class(models.Model):\n    name = models.CharField(max_length=200)\n    teacher = models.ForeignKey(Teacher, related_name='class_teacher')\n    access_code = models.CharField(max_length=5)\n    classmates_data_viewable = models.BooleanField(default=False)\n    always_accept_requests = models.BooleanField(default=False)\n    accept_requests_until = models.DateTimeField(null=True)\n\n    def __unicode__(self):\n        return self.name\n\n    def has_students(self):\n        students = self.students.all()\n        return students.count() != 0\n\n    def get_logged_in_students(self):\n        ONLINE = 1\n\n        \"\"\"This gets all the students who are logged in.\"\"\"\n        users_status = cache.get(CACHE_USERS)\n        online_users_status = filter(lambda status: status.status == ONLINE, users_status)\n        online_user_ids = map(lambda status: status.user.id, online_users_status)\n\n        # Query all logged in users based on id list\n        return Student.objects.filter(class_field=self).filter(new_user__id__in=online_user_ids)\n\n    class Meta:\n        verbose_name_plural = \"classes\"\n\n\nclass StudentModelManager(models.Manager):\n    def schoolFactory(self, klass, name, password):\n        from portal.helpers.generators import get_random_username\n\n        user = User.objects.create_user(\n            username=get_random_username(),\n            password=password,\n            first_name=name)\n\n        user_profile = UserProfile.objects.create(user=user)\n        return Student.objects.create(class_field=klass, user=user_profile, new_user=user)\n\n    def independentStudentFactory(self, username, name, email, password):\n        user = User.objects.create_user(\n            username=username,\n            email=email,\n            password=password,\n            first_name=name)\n\n        user_profile = UserProfile.objects.create(user=user)\n\n        return Student.objects.create(user=user_profile, new_user=user)\n\n\nclass Student(models.Model):\n    class_field = models.ForeignKey(Class, related_name='students', null=True)\n    user = models.OneToOneField(UserProfile)\n    new_user = models.OneToOneField(User, related_name='new_student', null=True, blank=True)\n    pending_class_request = models.ForeignKey(Class, related_name='class_request', null=True)\n\n    objects = StudentModelManager()\n\n    def is_independent(self):\n        return not self.class_field\n\n    def __unicode__(self):\n        return '%s %s' % (self.new_user.first_name, self.new_user.last_name)\n\n\ndef stripStudentName(name):\n    return re.sub('[ \\t]+', ' ', name.strip())\n\n\nclass Guardian(models.Model):\n    name = models.CharField(max_length=200)\n    children = models.ManyToManyField(Student)\n    user = models.OneToOneField(UserProfile)\n    new_user = models.OneToOneField(User, related_name='new_guardian', null=True, blank=True)\n\n    def __unicode__(self):\n        return '%s %s' % (self.new_user.first_name, self.new_user.last_name)\n\n\nclass EmailVerification(models.Model):\n    user = models.ForeignKey(User, related_name='email_verifications', null=True, blank=True)\n    token = models.CharField(max_length=30)\n    email = models.CharField(max_length=200, null=True, default=None, blank=True)\n    expiry = models.DateTimeField()\n    verified = models.BooleanField(default=False)\n\n\nclass FrontPageNews(models.Model):\n    title = models.CharField(max_length=200)\n    text = models.CharField(max_length=1000)\n    link = models.CharField(max_length=500)\n    link_text = models.CharField(max_length=200)\n    added_dstamp = models.DateTimeField()\n\n    class Meta:\n        verbose_name_plural = \"front page news\"\n\n    def __unicode__(self):\n        return self.title\n\n\nfrom . import handlers  # noqa\n", "path": "portal/models.py"}]}