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:POSTRequest URL:
http://127.0.0.1:8000/admin/networks/vlan/add/Django Version:1.6.6Exception 
Type:AttributeErrorException Value:

'Vlan' object has no attribute 'name'

Exception Location:D:\Scripts\Mercury\networks\models.py in __str__, line 
10Python 
Executable:C:\Python\Main\Scripts\python.exePython 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.

Reply via email to