Funny thing still happens when we try to upload an image


#1

At chapter 4 of IC, I added Django’s unicode() method to our model. My model is:

class Thing(Timestamp):
    name = models.CharField(max_length=255)
    description = models.TextField()
    slug = models.SlugField(unique=True)
    user = models.OneToOneField(User, blank=True, null=True)

    def __unicode__(self):
        return self.name

    # new helper method
    def get_absolute_url(self):
        return "/things/%s/" % self.slug

I also followed your preceding instructions but still it showed :

Here is my github repository, I hope you will look it and suggests the ways to fix it: https://github.com/ohid1986/myhellowebapp

Regards,
Ohid


#2

Did you try restarting your local server? Sometimes things don’t populate immediately. Let me know if it’s indeed still not working!


#3

Thanks for your reply. I solved this problem. I am using python 3.4 so when I use str(self), the problem gone.


#4

Ah thanks for the update!