Subversion Repositories SmartDukaan

Rev

Rev 2448 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2448 Rev 5944
Line 1... Line 1...
1
'''
1
'''
2
Created on 05-Jul-2011
2
Created on 05-Jul-2011
3
 
3
 
4
@author: Chandranshu
4
@author: Chandranshu
5
'''
5
'''
6
from elixir.entity import Entity
-
 
7
from elixir.fields import Field
-
 
8
from sqlalchemy.types import Integer, String
-
 
9
from elixir.options import using_options, using_table_options
-
 
10
 
6
 
11
 
-
 
12
class Test1(Entity):
7
class Test1:
13
    '''
8
    '''
14
    classdocs
9
    classdocs
15
    '''
10
    '''
16
    id = Field(Integer, primary_key=True, autoincrement=True)
11
    def __init__(self):
-
 
12
        pass
-
 
13
 
-
 
14
def main():
17
    name=Field(String(50))
15
    t = Test1()
-
 
16
    t.data = 2
-
 
17
    print t.data
18
    using_options(shortnames=True)
18
    print t.data
-
 
19
    print t.data
-
 
20
    pass
-
 
21
 
19
    using_table_options(mysql_engine="InnoDB")
22
if __name__ == '__main__':
-
 
23
    main()
20
24