Python: How to solve the issue : 'badly formed hexadecimal UUID string' in Django
问题 I have created 'post' model in which I included 'post_id' as the primary key field. When I am trying to create a post, it is raising an error: 'badly formed hexadecimal UUID string'. I would appreciate helping me in solve this. Here's my code. Models.py: class Post(models.Model): post_id = models.UUIDField(primary_key=True, default='uuid.uuid4', editable=False) user = models.ForeignKey(settings.AUTH_USER_MODEL, default=1) from1 = models.CharField(max_length=20) To = models.CharField(max