mongoengine datetime field and python datetime -


I am facing the following issue which I did not come into my second application. = Me.IntField (required = true, default = 0)

In the shell, I tried the following:

  Sprint = Sprint.obies.jet ( Sequence = 1) Sprint & Sprint: Sprint Object & gt; Sprint.start_date - datetime.utcnow () Tracebacks (Lastest Call Final): File "& lt; stdin>", Line 1, & lt; Module & gt; TypeError: - Unsupported operand type (s) for 'Tuple' and 'datetime.datetime':   

Then I print sprint.start_date, thus typing it instead of dated object Returns to:

  sprint.start_date (& lt; mongoengine.fields.DateTimeField object 0x22b7dd0 & gt ;,)   

So I did

  Sprint .start_date [0] - datetime.utcnow () traceback (last most recent call): File "& lt; stdin>", line 1, & lt; Module & gt; TypeError: - Unsupported operand type (s) for 'DateTimeField' and 'datetime.datetime':   

I did not find this problem in my previous project My existing mongoigin version is 0.6.20 . I picked it up for my current project and was using it for all my projects. I'm using Hurricane as a web server

How to change the Mozenpane date time field to match Python's datetime example.

Thank you in advance for your help.

The error is in the form of a modell definition, one type is the reason for all of this: (

Start_date and end_date have a ',' which is causing noise.

After removing it, roll it. :)

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -