On 25 Aug 2014 23:32, "Babatunde Akinyanmi" <tundeba...@gmail.com> wrote:
>
> Hi Przemek,
> I'm not sure there's a name attribute for Field and its subclasses.
> Does removing the name attribute work?
>

Oops. I meant argument not attribute

> On 25 Aug 2014 22:19, "Przemek Ciborowski" <cibo...@gmail.com> wrote:
>>
>> Hello guys,
>>
>> I'm really beginner in django.
>> I have extremely simple example:
>>
>> class Vlan(models.Model):
>>     name = models.CharField(max_length=30, name='Vlan name')
>>     number = models.IntegerField(default=0, name='Vlan number')
>>
>>     def __unicode__(self):
>>         return self.name
>>
>> When I'm trying to use admin interface, I got this error:
>>
>> AttributeError at /admin/networks/vlan/add/
>>
>> 'Vlan' object has no attribute 'name'
>>
>> Request Method:
>> POST
>> Request URL:
>> http://127.0.0.1:8000/admin/networks/vlan/add/
>> Django Version:
>> 1.6.6
>> Exception Type:
>> AttributeError
>> Exception Value:
>>
>> 'Vlan' object has no attribute 'name'
>>
>> Exception Location:
>> D:\Scripts\Mercury\networks\models.py in __str__, line 10
>> Python Executable:
>> C:\Python\Main\Scripts\python.exe
>> Python Version:
>> 2.7.8
>>
>> I'm sure that it was working a few days ago. And in meantime I did
django upgrade.
>> What I'm doing wrong, and how I can fix it?
>>
>> Thanks in advance.
>> Przemek.
>>
>> --
>> 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/50470bc3-c7a0-4afd-b655-f7a3cf8304a0%40googlegroups.com
.
>> 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 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/CA%2BWjgXPDJ33DJCPVsgWECABEu_-dnmSi4GTPWtiRXKiX_s%2BuxA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to