[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Savannah-cvs] [SCM] Savane-cleanup framework branch, master, updated. 1
From: |
Sylvain Beucler |
Subject: |
[Savannah-cvs] [SCM] Savane-cleanup framework branch, master, updated. 1b2071aba4dfb51202b2bfecc30b1ba8b7836987 |
Date: |
Sat, 15 May 2010 07:37:47 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Savane-cleanup framework".
The branch, master has been updated
via 1b2071aba4dfb51202b2bfecc30b1ba8b7836987 (commit)
from 4787358ff0ec0238ac17df34700936926518f3ee (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/savane-cleanup/framework.git/commit/?id=1b2071aba4dfb51202b2bfecc30b1ba8b7836987
commit 1b2071aba4dfb51202b2bfecc30b1ba8b7836987
Author: Sylvain Beucler <address@hidden>
Date: Sat May 15 09:37:42 2010 +0200
More documentation on trackers
diff --git a/savane/tracker/models.py b/savane/tracker/models.py
index 95114ca..d4b4955 100644
--- a/savane/tracker/models.py
+++ b/savane/tracker/models.py
@@ -123,7 +123,18 @@ class MemberPermission(models.Model):
class Field(models.Model):
"""
- Fields definition for the 4 trackers (~70 fields each)
+ Site-wide field definitions for the 4 trackers (~70 fields each).
+
+ Most fields cannot be redefined (such as display_type or
+ scope). Usually fields that can be redefined are in FieldUsage,
+ where an entry with special group_id=100 contains the default
+ value.
+
+ However some of the fields in this class can be redefined through
+ similar fields in FieldUsage (display_size and keep_history) - in
+ which case it's not clear whether the default value is in Field or
+ in FieldUsage, at first glance it's defined here, all related
+ values in FieldUsage are set to NULL.
"""
class Meta:
unique_together = (('tracker', 'name'),)
@@ -145,7 +156,7 @@ class Field(models.Model):
label = models.CharField(max_length=255)
description = models.TextField()
scope = models.CharField(max_length=1, choices=SCOPE_CHOICES)
- required = models.BooleanField()
+ required = models.BooleanField(help_text="field cannot be disabled in
configuration")
empty_ok = models.BooleanField()
keep_history = models.BooleanField()
special = models.BooleanField(help_text="field is not entered by the user
but by the system")
@@ -179,17 +190,22 @@ class FieldUsage(models.Model):
show_on_add_members = models.BooleanField("show to project members")
place = models.IntegerField() # new:rank
transition_default_auth = models.CharField(max_lenth=1,
choices=TRANSITION_DEFAULT_AUTH, default='A')
-
- # Specific (bad!) fields for custom fields:
- custom_label = models.CharField(max_length=255, blank=True, null=True)
- custom_description = models.CharField(max_length=255, blank=True,
null=True)
+
+ custom_empty_ok = models.CharField(max_length=1,
choices=CUSTOM_EMPTY_OK_CHOICES,
+ default='0', blank=True, null=True)
+
+ # Some global parameters can be customized
custom_display_size = models.CharField(max_length=255, blank=True,
null=True)
# new:
# custom_display_size_min = models.IntegerField(blank=True, null=True)
# custom_display_size_max = models.IntegerField(blank=True, null=True)
- custom_empty_ok = models.CharField(max_length=1,
choices=CUSTOM_EMPTY_OK_CHOICES,
- default='0', blank=True, null=True)
+ # The default value is in Field.display_size
+ # rather than FieldUsage(group_id=100).custom_display_size
custom_keep_history = models.BooleanField("keep field value changes in
history")
+
+ # Specific (bad!) fields for custom fields (if Field.custom is True):
+ custom_label = models.CharField(max_length=255, blank=True, null=True)
+ custom_description = models.CharField(max_length=255, blank=True,
null=True)
class FieldValue(models.Model):
"""
-----------------------------------------------------------------------
Summary of changes:
savane/tracker/models.py | 32 ++++++++++++++++++++++++--------
1 files changed, 24 insertions(+), 8 deletions(-)
hooks/post-receive
--
Savane-cleanup framework
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Savannah-cvs] [SCM] Savane-cleanup framework branch, master, updated. 1b2071aba4dfb51202b2bfecc30b1ba8b7836987,
Sylvain Beucler <=