Saturday, November 26, 2011

What read database and load values to diccionary?

Hello.

I need load a table to fill one dictionary, next use it in my model.

Example:

def Articles(models.Model):

rules = Here i need load table to fill rules filed...
example: (
('1', 'one'),
('2', 'delete it'),
('3'.....)....
)

descripcion = models.CharField(max_length=100, verbose_name =
'Description of article')
opcions = rules <---- here i need

Thank's.

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

No comments:

Post a Comment