Skip to content

Instantly share code, notes, and snippets.

10:31:10 AM Christopher Brown: You ever looked at the staff member stuff?
10:31:23 AM mvp-devs: Lee McFadden: no, i haven't.
10:32:59 AM Christopher Brown: Right now it's not very DRY, and I wanted to see what you guys thought of refactoring it.
10:33:09 AM mvp-devs: Lee McFadden: need another set of eyes on the code for something?
10:33:11 AM mvp-devs: Lee McFadden: ah.
10:33:48 AM Christopher Brown: Replace TeamStaff, ContestStaff, VenueStaff (and I think there's one other XStaff) with StaffPosition, which has a many to many on Resource.
10:34:07 AM Christopher Brown: Team, Contest, Venue are all Resources.
10:34:27 AM mvp-devs: Lee McFadden: that sounds pretty logical to me
10:35:04 AM Christopher Brown: Right now TeamStaff has a team_id field, Contest the same, Venue has a many2many on venues.
10:35:33 AM mvp-devs: Lee McFadden: would have to ask CP though for a definitive answer. it's more of a judgement call really. If refactoring is going to be a major benefit in flexibility then I say go for it.
diff -r c07cda5335f1 tg/dottednamesupport.py
--- a/tg/dottednamesupport.py Sun Nov 29 14:41:33 2009 -0700
+++ b/tg/dottednamesupport.py Fri Jan 08 10:03:10 2010 -0600
@@ -59,16 +59,23 @@
"""
if uri.startswith('local:'):
- uri = uri.replace('local:', tg.config['pylons.package']+'.')
+ package = tg.config['pylons.package']
+ if relativeto: