Hi,

I have a model, Books. On the main page of the site, I want to pull
and display the details for a random book.

What I would like to do is create a method to the model, say
random_id, so that object.random_id will access a random instance.

Would I define a function in the model definition or a manager in
models.py?

Obviously a newbie is asking so please excuse the lack of clarity.

Thanks,

Hani


--~--~---------~--~----~------------~-------~--~----~
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