Hello everyone,
I'm pretty new to Django, so please bear with me.
When I'm defining a model, and I want to return a value to use in the
admin for the information to be displayed as such:
from django.db import models
class Link(models.Model):
name = models.CharField()
url = models.CharField()
position = models.PositiveSmallIntegerField()
def __unicode__(self):
return name
class Admin:
ordering = ['position']
class Meta:
verbose_name_plural = 'Links'
Is it possible to concatenate fields for the def__unicode__(self)
method? I can't seem to find a way to do that, and was just wondering
if it's possible?
Thanks,
Brandon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---