schooltool-developers team mailing list archive
-
schooltool-developers team
-
Mailing list archive
-
Message #00393
Re: Removing Term Grading
-
To:
schooltool-developers@xxxxxxxxxxxxxxxxxxx
-
From:
Justas <justas@xxxxxx>
-
Date:
Mon, 16 May 2011 11:57:52 +0300
-
In-reply-to:
<BANLkTi=-iHeT866pbt3Y5hMJQ-ePixXA1w@mail.gmail.com>
-
User-agent:
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110424 Thunderbird/3.1.10
On 05/16/2011 07:38 AM, Alan Elkner wrote:
Hey Justas,
I created a new branch,
lp:~aelkner/schooltool.lyceum.journal/remove_term_grading, wherein I
remove all code and views related to term grading.
Wait, I missed something. Why did you remove term grading from
journal???
Additionally, I
added a generations package that has as its first evolve script a
simple script to remove the LyceumTermDataContainer from the app root.
However it crashes when I do make run on an older database with the
following error:
AttributeError: 'LyceumTermDataContainer' object has no attribute '__parent__'
That is probably because the code for that object is no longer there,
making the object broken. I remember Ignas saying that it can be a
tricky two-step process when removing data that necessitates keeping
the code around, waiting for every possible person in the world to
have run the evolve script, and only then removing the code. I'm
hoping you can figure out a way to avoid this being necessary. If
not, I can change my branch to keep the code around for the object's
class definition, getting rid of everything else.
Right, to delete an object you must be able to load it. Well, ok,
you can get around that, but you wouldn't want to. There are few easier
options:
1) keep the minimalistic reference to the old classes, where they were:
class TermGradingData(Persistent):
"""BBB: for evolution script that deletes this object"""
2) temporarily inject the class into the original module from the
evolution script, see evolution my timetable branch.
I vote for option 1; or better yet - do not remove the term grading :)
Justas
Follow ups
References