Last active
December 5, 2018 16:17
-
-
Save sdcasas/a5e9e386f8ac885d1502058a702dad13 to your computer and use it in GitHub Desktop.
Revisions
-
sdcasas revised this gist
Dec 5, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,5 +12,5 @@ class ProyectoEstado(models.Model): pc = Sesion.objects.get(pk = 1) ProyectoEstado.objects.create( fecha_cambio_estado = pc.sesion.fecha + pc.sesion.hora, # error ) -
sdcasas renamed this gist
Dec 5, 2018 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
sdcasas renamed this gist
Dec 5, 2018 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
sdcasas created this gist
Dec 5, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ # django orm DateTimeField = DateField +TimeField # models.py class Sesion(models.Model): fecha = models.DateField(null=True, blank=True) hora = models.TimeField(null=True, blank=True) class ProyectoEstado(models.Model): fecha_cambio_estado = models.DateTimeField() # shell pc = Sesion.objects.get(pk = 1) ProyectoEstado.objects.create( fecha_cambio_estado = pc.sesion.fecha + pc.sesion.hora, )