(My English is not so good so I'll just try to be simple, sorry guys)
So I have a model TopList which has a slug field so I can look up its
object by slug.
class TopList(models.Model):
name = models.CharField(max_length=200)
slug = models.SlugField(max_length=200, default='')
def __
Hello,
you have an error here:
|defsave(self,*args,**kwargs):
super().save(*args,**kwargs)
self.set_slug()
|
self.set_slug() should be before super().save().
Regards,
Antonis Christofides
http://djangodeployment.com
On 2016-12-10 02:26, Viet Phuong wrote:
> (My English is
2 matches
Mail list logo