1. Thomas Weholt
  2. dse4

Commits

weholt  committed 30fac8d Draft

RC#2. Django 1.6 bugfix.

  • Participants
  • Parent commits 58edef6
  • Branches default

Comments (0)

Files changed (3)

File README.txt

View file
  • Ignore whitespace
 =======================================================
 
 
-Version : 4.0.0 - pre release
-Author : Thomas Weholt <thomas@weholt.org>
-License : Modified BSD.
-Status : Beta
-Url : https://bitbucket.org/weholt/dse4
+* Version : 4.0.0 - Release Candidate #2
+* Author : Thomas Weholt <thomas@weholt.org>
+* License : Modified BSD.
+* Status : Beta
+* Url : https://bitbucket.org/weholt/dse4
 
 
 Background
 * DSE uses a dictionary to specify what fields to work on.
 
 
+Note about MySQL
+----------------
+
+* Richard Brockie made me aware of some problems with MySQL InnoDb. It seems like DSE doesn't insert anything, but changing table type to MyISAM solves the problem allthough doing so will create other problems because InnoDb has a lot of nice features not found in MyISAM (http://stackoverflow.com/questions/20148/myisam-versus-innodb). Like Django itself I'm recommend using PostgreSQL.
+
 
 News in 4.x
 -----------
 Release notes
 -------------
 
+4.0.0-RC2 : Bugfix for Django 1.6 running under Python 3.x. A note on MySQL InnoDB vs MyISAM.
+
+4.0.0-RC1 : First steps towards Python 3.x and Django 1.5 support.
+
 4.0.0-pre : port to Python 3.x.
 
 3.1.0 : patch from rassminus; Changed sql creation to quote all references to the table name and column labels.

File dse/__init__.py

View file
  • Ignore whitespace
     """
     Get default value, if any, for a specified field in a specified model.
     """
+    #import pdb
+    #pdb.set_trace()
+
     if hasattr(model._meta, "_field_name_cache"):
         field_defs = model._meta._field_name_cache
     else:
+        if not hasattr(model._meta, '_fields'):
+            return None
         field_defs = model._meta._fields()
     for f in field_defs:
         if field == f.name:            
     def delete(self, pk):
         "Adds a primary key to the deletion queue."
         assert type(pk) == types.IntType, "pk argument must be integer."
-        self.delete_items.append(pk)
+        self.delete_items.append(int(pk))
         self.item_counter += 1
         self._on_add()
 

File setup.py

View file
  • Ignore whitespace
 #!/usr/bin/env python
 
-from distutils.core import setup
+try:
+    from setuptools import setup
+except (ImportError):
+    from distribute import setup
 
 setup(name='dse',
-      version='4.0.0-beta',
+      version='4.0.0-RC2',
       description='DSE - Simplified "bulk" insert/update/delete for Django.',
       author='Thomas Weholt',
       author_email='thomas@weholt.org',
       long_description=open('README.txt').read(),
+	  include_package_data = True,
       packages = ['dse',],
       #install_requires = ['django >= 1.5.0'],
       url = "https://bitbucket.org/weholt/dse4",