> Den 20. okt. 2015 kl. 14.09 skrev Radek Svarz <radek.sv...@gmail.com>: > > [...] > 1 Milestone is a date stored as a string in form YYYY-MM-DD or a special tag > "today", which means daily changing date (dynamic - the date was not stated, > but until today is some state valid - if today is smaller then the next > milestone). > [...] > Overall current implementation works fine, however we have issues with > reporting questions such as: > > Which items will hit milestones of certain characteristics in December 2015?
If you want the dates to be searchable, then don't store them in a Charfield. Store them in a DateField instead. In fact, always store dates in a DateField. In any case I would create a separate "Milestone" model with an m2m relation to Lifecycle. Put your "today" logic for milestones in this model, instead of using N duplicate date fields. Either use null=True to denote your concept of "today", or add a separate Boolean field "is_today" on the "Milestone" model. Erik -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/DDD53C31-A5F2-4DE9-9848-6BB788E1A08F%40cederstrand.dk. For more options, visit https://groups.google.com/d/optout.