Status: New
Owner: ----

New issue 73 by haineault: Enhancement request for created_at/last_update  
fields
http://code.google.com/p/django-wikiapp/issues/detail?id=73

The fields "created_at" and "last_update" in models.py are not using the
most efficient syntax;

     from datetime import datetime

     created_at  = models.DateTimeField(default=datetime.now)
     last_update = models.DateTimeField(blank=True, null=True)

This is the syntax used everywhere in the file for those field .. there is
a better way to do this;

     created_at  = models.DateTimeField(auto_now_add=True)
     last_update = models.DateTimeField(auto_now=True)

http://docs.djangoproject.com/en/dev/ref/models/fields/#datetimefield

Beside "last_update" should never null, creation should count as an update.

Regards

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pinax-updates" 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/pinax-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to