I think it fails when it tries to stip content of name. Should I paste 
stacktrace here. Because I do not get any clue from stacktrace about the 
problem :/


On Monday, December 1, 2014 6:21:00 PM UTC+5, Vijay Khemlani wrote:
>
> Have you tried following the stacktrace that resulted in the error? 
>
> Does it fail when trying to strip the contents of the "name" field?
>
> On Mon, Dec 1, 2014 at 10:16 AM, Danish Ali <[email protected] 
> <javascript:>> wrote:
>
>> I am using admin to enter data.
>> This is the URL from where I am trying to save records: 
>> http://127.0.0.1:8000/admin/product/shop/add/
>>
>>
>> On Monday, December 1, 2014 6:15:08 PM UTC+5, Jani Tiainen wrote:
>>>
>>> On Mon, 1 Dec 2014 04:12:45 -0800 (PST) 
>>> Danish Ali <[email protected]> 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 [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> 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/b6a557f5-5a11-4f02-bc22-2823a49b9495%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/b6a557f5-5a11-4f02-bc22-2823a49b9495%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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 post to this group, send email to [email protected].
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/cdd855a3-322a-4baf-8b46-b8a450ba61a6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to