Issue 1379490
Created on 2005-12-13 13:18 by schlatterbeck, last changed 2006-01-20 02:37 by richard.
File name |
Uploaded |
Description |
Edit |
Remove |
patch-labelprop
|
schlatterbeck,
2005-12-13 13:18
|
Patch to introduce labelprop setting |
|
|
patch-label+orderprop-doc
|
schlatterbeck,
2006-01-16 10:38
|
documentation update for setlabelprop/setorderprop |
|
|
msg3395 |
Author: [hidden] (schlatterbeck) |
Date: 2005-12-13 13:18 |
|
I've seen at least two cases where the current
implementation of labelprop fails for me:
- I have an "address" class for customer data. This
class does not have a key. Customers can haven an
(academic) title attribute. This is not very suitable
as labelprop :-)
- If a class has neither title nor a key nor a name,
the chosen labelprop is very likely "activity". Not
very suitable either.
The attached patch adds a new method setlabelprop to
hyperdb.py that is intended to be used similar to
setkey, it sets the property name that should be used
for labels. It sets the class attribute _labelprop.
The patch modifies the labelprop member function of
Class to return the class attribute _labelprop if set.
I have also removed three redundant copies of the
labelprop method (checked with diff!) from all three
backends (rdbms used a common labelprop implementation)
and moved the modified version of labelprop to hyperdb.
The patch is tested only with the postgres backend.
The patch fixes both usecases outlined at the top and
does not break existing code (modulo bugs I may have
introduced). The refactoring benefits the roundup codebase.
-- Ralf
|
msg3396 |
Author: [hidden] (schlatterbeck) |
Date: 2006-01-16 10:38 |
|
Logged In: YES
user_id=34818
Update of documentation: doc/customizing.txt
The attached patch (against CVS from some minutes ago)
updates the documentation for the new setlabelprop method.
It also documents setorderprop detailed in the following
feature-request:
https://sourceforge.net/tracker/index.php?func=detail&aid=1379534&group_id=31577&atid=402791
So you may need only half of this patch if setorderprop is
not implemented.
|
msg3397 |
Author: [hidden] (richard) |
Date: 2006-01-20 02:37 |
|
Logged In: YES
user_id=6405
applied, thanks!
|
|
Date |
User |
Action |
Args |
2005-12-13 13:18:09 | schlatterbeck | create | |
|