Update of /cvsroot/sqlobject/SQLObject/examples
In directory sc8-pr-cvs1:/tmp/cvs-serv17015/examples
Modified Files:
codebits.py config.py people.py personaddress.py setup.py
simpleperson.py userrole.py
Log Message:
And while we are at it, run reindent.py
Index: codebits.py
===================================================================
RCS file: /cvsroot/sqlobject/SQLObject/examples/codebits.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** codebits.py 30 Nov 2003 21:46:11 -0000 1.4
--- codebits.py 4 Dec 2003 16:46:31 -0000 1.5
***************
*** 122,126 ****
firstName = StringCol()
lastName = StringCol()
!
def _get_employee(self):
value = Employee.selectBy(person=self)
--- 122,126 ----
firstName = StringCol()
lastName = StringCol()
!
def _get_employee(self):
value = Employee.selectBy(person=self)
***************
*** 194,198 ****
city = StringCol()
state = StringCol(length=2)
!
latitude = FloatCol()
longitude = FloatCol()
--- 194,198 ----
city = StringCol()
state = StringCol(length=2)
!
latitude = FloatCol()
longitude = FloatCol()
***************
*** 201,205 ****
SQLObject._init(self, id)
self._coords = SOCoords(self)
!
def _get_coords(self):
return self._coords
--- 201,205 ----
SQLObject._init(self, id)
self._coords = SOCoords(self)
!
def _get_coords(self):
return self._coords
***************
*** 256,258 ****
print "Showing page %i of %i" % (start/size + 1, total/size + 1)
## end snippet
-
--- 256,257 ----
Index: config.py
===================================================================
RCS file: /cvsroot/sqlobject/SQLObject/examples/config.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** config.py 28 Jun 2003 22:17:36 -0000 1.1
--- config.py 4 Dec 2003 16:46:31 -0000 1.2
***************
*** 14,16 ****
conn = DBMConnection('database/')
conn = MySQLConnection(user='test', db='test')
-
--- 14,15 ----
Index: people.py
===================================================================
RCS file: /cvsroot/sqlobject/SQLObject/examples/people.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** people.py 14 Mar 2003 03:52:15 -0000 1.5
--- people.py 4 Dec 2003 16:46:31 -0000 1.6
***************
*** 37,41 ****
notNull=1),
StringCol('firstName', length=30,
! notNull=1),
StringCol('middleInitial', length=1, default=None),
StringCol('lastName', length=50, notNull=1)]
--- 37,41 ----
notNull=1),
StringCol('firstName', length=30,
! notNull=1),
StringCol('middleInitial', length=1, default=None),
StringCol('lastName', length=50, notNull=1)]
***************
*** 52,56 ****
f.close()
return v
!
def _set_image(self, value):
# assume we get a string for the image
--- 52,56 ----
f.close()
return v
!
def _set_image(self, value):
# assume we get a string for the image
***************
*** 58,62 ****
f.write(value)
f.close()
!
def _del_image(self, value):
# I usually wouldn't include a method like this, but for
--- 58,62 ----
f.write(value)
f.close()
!
def _del_image(self, value):
# I usually wouldn't include a method like this, but for
Index: personaddress.py
===================================================================
RCS file: /cvsroot/sqlobject/SQLObject/examples/personaddress.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** personaddress.py 28 Jun 2003 22:17:36 -0000 1.1
--- personaddress.py 4 Dec 2003 16:46:31 -0000 1.2
***************
*** 22,26 ****
zip = StringCol(length=9)
person = ForeignKey('Person')
! ## end snippet
def reset():
--- 22,26 ----
zip = StringCol(length=9)
person = ForeignKey('Person')
! ## end snippet
def reset():
***************
*** 29,33 ****
Address.dropTable(ifExists=True)
Address.createTable()
!
reset()
--- 29,33 ----
Address.dropTable(ifExists=True)
Address.createTable()
!
reset()
Index: setup.py
===================================================================
RCS file: /cvsroot/sqlobject/SQLObject/examples/setup.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** setup.py 28 Jun 2003 22:17:36 -0000 1.1
--- setup.py 4 Dec 2003 16:46:31 -0000 1.2
***************
*** 17,20 ****
value.dropTable(ifExists=True)
value.createTable()
-
-
--- 17,18 ----
Index: simpleperson.py
===================================================================
RCS file: /cvsroot/sqlobject/SQLObject/examples/simpleperson.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** simpleperson.py 28 Jun 2003 22:17:36 -0000 1.1
--- simpleperson.py 4 Dec 2003 16:46:31 -0000 1.2
***************
*** 38,42 ****
Person.dropTable(ifExists=True)
Person.createTable()
!
## Get rid of any tables we have left over...
--- 38,42 ----
Person.dropTable(ifExists=True)
Person.createTable()
!
## Get rid of any tables we have left over...
***************
*** 95,99 ****
#-- Again, no database access, since we're just grabbing the same
#-- instance we already had.
! print p2
#>> <Person 1 firstName='John' middleInitial='Q' lastName='Doe'>
print p is p2
--- 95,99 ----
#-- Again, no database access, since we're just grabbing the same
#-- instance we already had.
! print p2
#>> <Person 1 firstName='John' middleInitial='Q' lastName='Doe'>
print p is p2
Index: userrole.py
===================================================================
RCS file: /cvsroot/sqlobject/SQLObject/examples/userrole.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** userrole.py 28 Jun 2003 22:17:36 -0000 1.1
--- userrole.py 4 Dec 2003 16:46:31 -0000 1.2
***************
*** 31,35 ****
# Role.dropTable(ifExists=True)
# Role.createTable()
!
setup.reset()
--- 31,35 ----
# Role.dropTable(ifExists=True)
# Role.createTable()
!
setup.reset()
|