Re: [sqlalchemy] Modification tracking

2013-08-25 Thread Wolfgang Keller
 In an application, I have rather elaborate needs to track changes.

 Now I need to track all modifications to all fields, including the
 relationship list objects. 

One way to accomplish this would be within the database server itself.
With a rule that, instead of updating a record, inserts a new one (and
updates a version column). 

Sincerely,

Wolfgang

-- 
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.


[sqlalchemy] Session() and UnboundLocalError: local variable 'Session' referenced before assignment

2013-08-25 Thread Mohsen Pahlevanzadeh
Dear all,

When i using Session = Session(); i get the following error:

UnboundLocalError: local variable 'Session' referenced before assignment


*Wher's my problem?*

-- 
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.


[sqlalchemy] Re: Session() and UnboundLocalError: local variable 'Session' referenced before assignment

2013-08-25 Thread Lele Gaifax
Mohsen Pahlevanzadeh m.pahlevanza...@gmail.com writes:

 Dear all,

 When i using Session = Session(); i get the following error:

 UnboundLocalError: local variable 'Session' referenced before assignment


 *Wher's my problem?*

The message seems reasonably clear, doesn't it? 

Putting aside the not recommended idiom of *redefining* a symbol in that
way, you should import/define the session maker function from
somewhere before you can use it.

As said, I'd recommend using different names, to avoid confusion, for
example

  session = SessionMaker()

hth, ciao, lele.
-- 
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
l...@metapensiero.it  | -- Fortunato Depero, 1929.

-- 
You received this message because you are subscribed to the Google Groups 
sqlalchemy group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.