#26839: Migrate: TypeError: 'module' object is not callable
--------------------------------+--------------------------------------
     Reporter:  henriquechehad  |                    Owner:  nobody
         Type:  Uncategorized   |                   Status:  closed
    Component:  Migrations      |                  Version:  1.9
     Severity:  Normal          |               Resolution:  needsinfo
     Keywords:                  |             Triage Stage:  Unreviewed
    Has patch:  0               |      Needs documentation:  0
  Needs tests:  0               |  Patch needs improvement:  0
Easy pickings:  0               |                    UI/UX:  0
--------------------------------+--------------------------------------

Comment (by henriquechehad):

 The migration line with issue is it:

 {{{
 ('end_date', models.DateTimeField(default=datetime(2016, 7, 4, 15, 18, 59,
 481979))),
 }}}

 Import:

 {{{
 # -*- coding: utf-8 -*-
 # Generated by Django 1.9.5 on 2016-07-04 15:19
 from __future__ import unicode_literals

 import datetime

 }}}


 I changed "import datetime" to "from datetime import datetime" and fixed
 the issue.

 But I don't know why Django generated migration file using datetime
 instead datetime.datetime.

--
Ticket URL: <https://code.djangoproject.com/ticket/26839#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.946f4cd11437d2aaf2106953e400e575%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to