Sam's Lists | 28 Mar 07:53
Picon

Versioning not defined.

I hope you don't mind another question.  :)

I'd like to try versioning but I"m doing something wrong.

I added the line
versions = Versioning()
to my sqlobject class as the docs show.

But I get --- NameError: name 'Versioning' is not defined

I easy_installed version 0.10---and still have this problem.  This is under Turbogears...I'm assuming that it is actually using my version 0.10.  Is there an easy way to confirm this?

I am importing all of sqlobject---so that's not it.  Any ideas?

Do I have to do something special if the class already existed and I'm now adding versioning?

Thanks!


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss
Oleg Broytmann | 28 Mar 12:11
X-Face
Picon
Favicon

Re: Versioning not defined.

On Fri, Mar 28, 2008 at 03:55:15AM -0300, Sam's Lists wrote:
> But I get --- NameError: name 'Versioning' is not defined

from sqlobject.versioning import Versioning

Oleg.
--

-- 
     Oleg Broytmann            http://phd.pp.ru/            phd <at> phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
Sam's Lists | 29 Mar 03:04
Picon

Re: Versioning not defined.

Okay...great!  That works well.

Now the next step....I have a bunch of existing tables with data in them to which I want to add versioning.  I was sort of hoping that the version tables would just spring magically into existence but obviously they don't.  How do I create them?  Hopefully there is some function I can call somewhere or some program I can run?

I looked through the source code and found a createVersionTable that looks like it might be helpful.  But I'm not sure how to call it, and I'm especially not sure what to pass into it.

Thanks!

On Fri, Mar 28, 2008 at 8:11 AM, Oleg Broytmann <phd <at> phd.pp.ru> wrote:

On Fri, Mar 28, 2008 at 03:55:15AM -0300, Sam's Lists wrote:
> But I get --- NameError: name 'Versioning' is not defined

from sqlobject.versioning import Versioning

Oleg.
--
    Oleg Broytmann            http://phd.pp.ru/            phd <at> phd.pp.ru
          Programmers don't die, they just GOSUB without RETURN.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss
Oleg Broytmann | 30 Mar 19:13
X-Face
Picon
Favicon

Re: Versioning not defined.

On Fri, Mar 28, 2008 at 11:04:12PM -0300, Sam's Lists wrote:
> Now the next step....I have a bunch of existing tables with data in them to
> which I want to add versioning.  I was sort of hoping that the version
> tables would just spring magically into existence but obviously they don't.
> How do I create them?  Hopefully there is some function I can call somewhere
> or some program I can run?
> 
> I looked through the source code and found a createVersionTable that looks
> like it might be helpful.  But I'm not sure how to call it, and I'm
> especially not sure what to pass into it.

class Test(SQLObject):
   data = Versioning()

Test.data.versionClass.createTable(ifNotExists=True)

Oleg.
--

-- 
     Oleg Broytmann            http://phd.pp.ru/            phd <at> phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace

Gmane