Hi there, I seem to find a particular scenario a lot and I'm wondering if someone can help me with it. I'm working on a project where I am selecting from a series of actions to take on a server. These actions need to be defined in a child class because there is code associated with them. However, because I want to select them in a form it benefits me to have a row in a table with a description for each action. Is there any elegant way that people have used to couple a table row with a python class? The only way I can think of is to hard code the relationships between rows and classes but it seems a brutal way of doing it. I could put the name of the class in a field in the table but that doesn't seem quite right either.

What would be nice is something like the @register decorator so that each class registers with the 'name' field in its row and a dictionary could be built when the server is started, but I cannot find any information on how to create another decorator that works like @register.

Any other ideas?  Thanks.

--
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to