I have a model called Project,

class Project(models.Model):
    name = models.CharField(max_length=50, unique=True)
    technology = models.ForeignKey(Technology, 
related_name='projects',on_delete=models.CASCADE)
    chipName = models.CharField(max_length=50)
    is_swarm = models.NullBooleanField(default=0, blank=True, null=True)
    p_state = models.ForeignKey(ProjectStage, related_name='projects', 
default=6,on_delete=models.CASCADE)
    project_poc = models.TextField()
    bto_date = models.DateField(blank=True, null=True)
    mto_date = models.DateField(blank=True, null=True)
    description = models.CharField(max_length=500, null=True)
    last_updated = models.DateTimeField(auto_now_add=True)


    def __str__(self):
        return self.name

    def save(self, *args, **kwargs):
        """
        Overriding base save method to set the default values for few fields 
based on user inputs.
        """

        if not self.mto_date:
            self.mto_date = self.bto_date + timedelta(days=15)

        super().save(*args, **kwargs)

In my views.py, I am trying to get Projects.objects.all() but I get this 
error : ValueError: invalid literal for int() with base 10: b'17 
04:47:27.864928'

What could be the issue? I am using Django 2.2.1 and Python 3.6 versions.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/507aa871-5f40-4e87-acef-c5871f742767%40googlegroups.com.

Reply via email to