#21954: 1.7a1 - Migration syntax error ----------------------------+--------------------------------------- Reporter: caulagi | Owner: Type: Bug | Status: closed Component: Migrations | Version: 1.7-alpha-1 Severity: Normal | Resolution: invalid Keywords: | Triage Stage: Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 ----------------------------+--------------------------------------- Changes (by loic84):
* status: new => closed * needs_better_patch: => 0 * resolution: => invalid * needs_tests: => 0 * needs_docs: => 0 Comment: Hi @caulagi, the problem is that you are not using a callable for the default value of `created` but an actual `datetime` object. Try `created = models.DateTimeField(default=timezone.now)` instead; notice the missing parentheses after "timezone.now". -- Ticket URL: <https://code.djangoproject.com/ticket/21954#comment:1> 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 django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/065.7803bbda09920783bd7a2f91066ac6b9%40djangoproject.com. For more options, visit https://groups.google.com/groups/opt_out.