On Sat, 2009-01-17 at 00:43 -0800, DragonSlayre wrote: > Hi, > > As I'm relatively new to python and django, I'm unsure how to get the > date and time out of a DateTimeField. > > How I usually work with this sort of thing is to 'python manage.py > shell' and then import whatever class i'm interested in and then do a > dir() on the object to find out what methods and fields it has.
dir() is typically less useful than help(), particularly when you're starting out, since the latter's presentation is better and includes the docstrings. Once you know you're going to be using a module a lot (for example, the datetime module), it's worth going to Python's library reference and spending a few minutes reading the relevant section. You'll likely pick up the overall picture a bit more in that fashion than when just browsing the method names. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

