space0x42 wrote:
> Hi all
hi,

I bet your getting an error since the labels property has no "setter" 
only a getter and you are trying to assign to it.

I'd probably try to rewrite the models with proper model fields instead 
of that label.  But, might not be an option nor good option for someone 
new to Django

An alternative is to write the setter.  This is how I'd do it(I learned 
properties before the @decorator syntax and so use old style syntax)

def _prop_get_labels(self):
    #code that gets labels
def _prop_set_labels(self, labels):
    #code that sets labels
labels = property(_prop_get_labels, _prop_set_lables, doc="""lables!""")

Then your assignment
    article.labels = labels
won't throw an exception, at least not for same reason ;)

-- 
Norman J. Harman Jr.
Senior Web Specialist, Austin American-Statesman
___________________________________________________________________________
It's August!  Keep your cool with the Statesman.  Check out our hot
deals in print and online for back-to-school savings and more!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to