so in my models .py file I have 

from django.db import models

# Create your models here.

class Customer(models.Model):
    NAME = models.CharField(max_length=200)
    WEBSITE = models.CharField(max_length=200)
    PHONE = models.CharField(max_length=200)
    EMAIL = models.CharField(max_length=200)
    ADDRESS = models.CharField(max_length=200)
    VMIDS = models.CharField(max_length=200)

def __unicode__(self):
    return self.NAME
#               return self.NAME

class Vms(models.Model):
    VMID  = models.CharField(max_length=200)
    VMNAME = models.CharField(max_length=200)
    VMSTATUS = models.CharField(max_length=200)
    CUSTOMERID = models.ForeignKey(Customer)

class Vmspecs(models.Model):
    CPUS =  models.CharField(max_length=200)
    CORES =  models.CharField(max_length=200)
    MEMORY =  models.CharField(max_length=200)
    HDSPACE =  models.CharField(max_length=200)
    OS =  models.CharField(max_length=200)
    UPTIME = models.CharField(max_length=200)
    VMID = models.ForeignKey(Vms)

On my admin stite it doesnt return self.NAME as the customer name it just 
returns the word customer object for entries and im not sure why.

-- 
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/67338a4c-991a-41a7-acb2-00b66e519f1e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to