On Mon, 1 Dec 2014 04:12:45 -0800 (PST)
Danish Ali <dan...@jotixtech.com> wrote:

> Hello,
> 
> I am getting this error: Error: 'NoneType' object has no attribute 'strip'
> I have created a model and I am trying to autofill slug field in it. When I 
> save the record in database I get this error: Error: 'NoneType' object has 
> no attribute 'strip'
> 
> My model is:
> 
> from django.db import models
> from autoslug import AutoSlugField
> 
> # Create your models here.
> 
> class Shop(models.Model):
>     name = models.CharField(max_length=200)
>     image = models.CharField(max_length=200)
>     description = models.TextField()
>     slug = models.SlugField(null=True, blank=True)
>     slug = AutoSlugField(populate_from='name')
> 
> 
> If I remove: slug = AutoSlugField(populate_from='name') then it works fine. 
> So, can someone tell me what is the issue here?

How are you trying to set data and trying to save to database (used commands 
would be helpful)

-- 

Jani Tiainen

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/20141201151426.2fdd643f%40jns42-l.w2k.keypro.fi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to