'unicode' object has no attribute 'utcoffset'
<p>In my admin, I am getting errors for only one class, 'unicode' object has no attribute 'utcoffset'. I have looked at a few other similar questions and have been unable to solve it. Any ideas on how to fix it? The traceback is below the class.</p>

<pre><code>class PartRequest(models.Model):
    pub_date = models.DateTimeField('date published', default = '2016-08-10', blank=True)
    user = models.ForeignKey(settings.AUTH_USER_MODEL, default=1)
    part_request_number = models.CharField(_('Part Request Number'),max_length=10, default = number)
    serialnumber = models.CharField(_('Serial Number'),max_length=10, default= snumber)
    partnumber = models.CharField(_('Part Number'), max_length = 500, default = 'e.g. 002109_1')
    build_type = models.ForeignKey(buildtyp, related_name='BuildType', null=True)
    project_manager = models.ForeignKey(Person, related_name = 'Manager', null = True)
    requester = models.ForeignKey(Person, related_name = 'Requester', null = True)
    project_id = models.ForeignKey(Project, related_name = 'Project', null=True)
    ordernumber = models.PositiveIntegerField(_('Order Number'), default=0)
    description = models.CharField(_('Description'), max_length=500)
    quantityrequired = models.PositiveIntegerField(_('Quantity'), default=0)
    sensitivity = models.ForeignKey(sens, related_name='Sensitivity', null=True)
    build_risk = models.ForeignKey(buildrisk, related_name= 'Risk', null=True)
    daterequired = models.DateField(_('Date Required'), default = '2000-08-16')
    image_or_pdf_upload =  models.FileField(upload_to = upload_location, null=True, blank = True)
    material = models.ForeignKey(mat, related_name = 'Material', null=True)
    other_requirements = models.CharField(_('Other Requirements'), max_length = 100, default ='')
    cert = models.CharField(_('Certificate of Conformity'), max_length=50, default ='')
    location = models.ForeignKey(locat, related_name='Location', null=True)
    identification_method = models.ForeignKey(MOI, related_name= 'MOI', null=True)
    packing = models.CharField(_('Packing Specified by End User'),max_length=100, default = 'Please specify here')
    qainfo = models.CharField(_('QA Information with Delivery'),max_length=100, default = 'Please specify here')    
    shipping = models.CharField(_('Shipping Details'),max_length=100, default = 'Please specify here')
    slug = models.SlugField(unique=True, null=True)
    def __unicode__(self):
        return (self.part_request_number)   

    def get_absolute_url(self):
        return "/buildpage/%s/" %(self.slug)

def create_slug(instance, new_slug=None):
    slug = slugify(instance.part_request_number)
    if new_slug is not None:
        slug = new_slug
    qs = PartRequest.objects.filter(slug=slug).order_by("-id")
    exists = qs.exists()
    if exists:
        new_slug = "%s-%s" %(slug, qs.first().id)
        return create_slug(instance, new_slug=new_slug)
    return slug

def pre_save_receiver(sender, instance, *args, **kwargs):
    if not instance.slug:
        instance.slug = create_slug(instance)
pre_save.connect(pre_save_receiver, sender = PartRequest)
</code></pre>

<p>Traceback: </p>

<pre><code>Environment:


Request Method: GET
Request URL: http://127.0.0.1:8000/admin/buildpage/partrequest/add/?_changelist_filters=requester__id__exact%3D2

Django Version: 1.9.2
Python Version: 2.7.10
Installed Applications:
('django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'prodman',
 'video',
 'tande',
 'assets',
 'buildpage',
 'concept',
 'smart_selects')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'django.middleware.security.SecurityMiddleware')


Template error:
In template /Library/Python/2.7/site-packages/django/contrib/admin/templates/admin/change_form.html, error at line 33
   'unicode' object has no attribute 'utcoffset'   23 : {% endblock %}
   24 : {% endif %}
   25 : 
   26 : {% block content %}&lt;div id="content-main"&gt;
   27 : {% block object-tools %}
   28 : {% if change %}{% if not is_popup %}
   29 :   &lt;ul class="object-tools"&gt;
   30 :     {% block object-tools-items %}
   31 :     &lt;li&gt;
   32 :         {% url opts|admin_urlname:'history' original.pk|admin_urlquote as history_url %}
   33 :         &lt;a href="{% add_preserved_filters histo ry_url %}" class= "historylink"&gt;{% trans "History" %}&lt;/a&gt;
   34 :     &lt;/li&gt;
   35 :     {% if has_absolute_url %}&lt;li&gt;&lt;a href="{{ absolute_url }}" class="viewsitelink"&gt;{% trans "View on site" %}&lt;/a&gt;&lt;/li&gt;{% endif %}
   36 :     {% endblock %}
   37 :   &lt;/ul&gt;
   38 : {% endif %}{% endif %}
   39 : {% endblock %}
   40 : &lt;form {% if has_file_field %}enctype="multipart/form-data" {% endif %}action="{{ form_url }}" method="post" id="{{ opts.model_name }}_form" novalidate&gt;{% csrf_token %}{% block form_top %}{% endblock %}
   41 : &lt;div&gt;
   42 : {% if is_popup %}&lt;input type="hidden" name="{{ is_popup_var }}" value="1" /&gt;{% endif %}
   43 : {% if to_field %}&lt;input type="hidden" name="{{ to_field_var }}" value="{{ to_field }}" /&gt;{% endif %}


Traceback:

File "/Library/Python/2.7/site-packages/django/core/handlers/base.py" in get_response
  174.                     response = self.process_exception_by_middleware(e, request)

File "/Library/Python/2.7/site-packages/django/core/handlers/base.py" in get_response
  172.                     response = response.render()

File "/Library/Python/2.7/site-packages/django/template/response.py" in render
  160.             self.content = self.rendered_content

File "/Library/Python/2.7/site-packages/django/template/response.py" in rendered_content
  137.         content = template.render(context, self._request)

File "/Library/Python/2.7/site-packages/django/template/backends/django.py" in render
  95.             return self.template.render(context)

File "/Library/Python/2.7/site-packages/django/template/base.py" in render
  206.                     return self._render(context)

File "/Library/Python/2.7/site-packages/django/template/base.py" in _render
  197.         return self.nodelist.render(context)

File "/Library/Python/2.7/site-packages/django/template/base.py" in render
  992.                 bit = node.render_annotated(context)

File "/Library/Python/2.7/site-packages/django/template/base.py" in render_annotated
  959.             return self.render(context)

File "/Library/Python/2.7/site-packages/django/template/loader_tags.py" in render
  173.         return compiled_parent._render(context)

File "/Library/Python/2.7/site-packages/django/template/base.py" in _render
  197.         return self.nodelist.render(context)

File "/Library/Python/2.7/site-packages/django/template/base.py" in render
  992.                 bit = node.render_annotated(context)

File "/Library/Python/2.7/site-packages/django/template/base.py" in render_annotated
  959.             return self.render(context)

File "/Library/Python/2.7/site-packages/django/template/loader_tags.py" in render
  173.         return compiled_parent._render(context)

File "/Library/Python/2.7/site-packages/django/template/base.py" in _render
  197.         return self.nodelist.render(context)

File "/Library/Python/2.7/site-packages/django/template/base.py" in render
  992.                 bit = node.render_annotated(context)

File "/Library/Python/2.7/site-packages/django/template/base.py" in render_annotated
  959.             return self.render(context)

File "/Library/Python/2.7/site-packages/django/template/loader_tags.py" in render
  69.                 result = block.nodelist.render(context)

File "/Library/Python/2.7/site-packages/django/template/base.py" in render
  992.                 bit = node.render_annotated(context)

File "/Library/Python/2.7/site-packages/django/template/base.py" in render_annotated
  959.             return self.render(context)

File "/Library/Python/2.7/site-packages/django/template/loader_tags.py" in render
  69.                 result = block.nodelist.render(context)

File "/Library/Python/2.7/site-packages/django/template/base.py" in render
  992.                 bit = node.render_annotated(context)

File "/Library/Python/2.7/site-packages/django/template/base.py" in render_annotated
  959.             return self.render(context)

File "/Library/Python/2.7/site-packages/django/template/defaulttags.py" in render
  220.                     nodelist.append(node.render_annotated(context))

File "/Library/Python/2.7/site-packages/django/template/base.py" in render_annotated
  959.             return self.render(context)

File "/Library/Python/2.7/site-packages/django/template/loader_tags.py" in render
  209.                 return template.render(context)

File "/Library/Python/2.7/site-packages/django/template/base.py" in render
  208.                 return self._render(context)

File "/Library/Python/2.7/site-packages/django/template/base.py" in _render
  197.         return self.nodelist.render(context)

File "/Library/Python/2.7/site-packages/django/template/base.py" in render
  992.                 bit = node.render_annotated(context)

File "/Library/Python/2.7/site-packages/django/template/base.py" in render_annotated
  959.             return self.render(context)

File "/Library/Python/2.7/site-packages/django/template/defaulttags.py" in render
  220.                     nodelist.append(node.render_annotated(context))

File "/Library/Python/2.7/site-packages/django/template/base.py" in render_annotated
  959.             return self.render(context)

File "/Library/Python/2.7/site-packages/django/template/defaulttags.py" in render
  220.                     nodelist.append(node.render_annotated(context))

File "/Library/Python/2.7/site-packages/django/template/base.py" in render_annotated
  959.             return self.render(context)

File "/Library/Python/2.7/site-packages/django/template/defaulttags.py" in render
  326.                 return nodelist.render(context)

File "/Library/Python/2.7/site-packages/django/template/base.py" in render
  992.                 bit = node.render_annotated(context)

File "/Library/Python/2.7/site-packages/django/template/base.py" in render_annotated
  959.             return self.render(context)

File "/Library/Python/2.7/site-packages/django/template/defaulttags.py" in render
  326.                 return nodelist.render(context)

File "/Library/Python/2.7/site-packages/django/template/base.py" in render
  992.                 bit = node.render_annotated(context)

File "/Library/Python/2.7/site-packages/django/template/base.py" in render_annotated
  959.             return self.render(context)

File "/Library/Python/2.7/site-packages/django/template/base.py" in render
  1049.         return render_value_in_context(output, context)

File "/Library/Python/2.7/site-packages/django/template/base.py" in render_value_in_context
  1026.     value = force_text(value)

File "/Library/Python/2.7/site-packages/django/utils/encoding.py" in force_text
  78.                 s = six.text_type(s)

File "/Library/Python/2.7/site-packages/django/utils/html.py" in &lt;lambda&gt;
  381.         klass.__unicode__ = lambda self: mark_safe(klass_unicode(self))

File "/Library/Python/2.7/site-packages/django/forms/boundfield.py" in __str__
  43.         return self.as_widget()

File "/Library/Python/2.7/site-packages/django/forms/boundfield.py" in as_widget
  101.         return force_text(widget.render(name, self.value(), attrs=attrs))

File "/Library/Python/2.7/site-packages/django/forms/widgets.py" in render
  832.             value = self.decompress(value)

File "/Library/Python/2.7/site-packages/django/forms/widgets.py" in decompress
  904.             value = to_current_timezone(value)

File "/Library/Python/2.7/site-packages/django/forms/utils.py" in to_current_timezone
  190.     if settings.USE_TZ and value is not None and timezone.is_aware(value):

File "/Library/Python/2.7/site-packages/django/utils/timezone.py" in is_aware
  340.     return value.utcoffset() is not None

Exception Type: AttributeError at /admin/buildpage/partrequest/add/
Exception Value: 'unicode' object has no attribute 'utcoffset'
</code></pre>

<p>The default value for your <code>pub_date</code> field is a string. It should be an instance of <code>datetime.date</code>.</p>

python sql django unicode