Permalink
Switch branches/tags
Nothing to show
Commits on Jan 19, 2015
  1. Merge pull request #42 from coagulant/feature/dj17

    Django 1.7 migrations support
    committed Jan 19, 2015
  2. Merge pull request #48 from ksonbol/master

    Raise ValueError in get_db_prep_value() when value is of invalid length
    committed Jan 19, 2015
Commits on Dec 10, 2014
Commits on Dec 8, 2014
Commits on Nov 5, 2014
  1. Merge pull request #38 from chris-martin/uuid-version-doc

    Remove "(calculated using the UUID1 method)" doc
    luto committed Nov 5, 2014
Commits on Nov 4, 2014
  1. Merge pull request #34 from luto/python3

    Python 3 Support (#33)
    committed Nov 4, 2014
Commits on Oct 16, 2014
  1. Merge pull request #43 from hobbestigrou/43-fix_max_legth_with_hyphenate

    Update problem with hyphenate.
    committed Oct 16, 2014
Commits on Oct 15, 2014
Commits on Oct 10, 2014
  1. Django 1.7 migrations support

    coagulant committed Oct 10, 2014
Commits on Jul 25, 2014
  1. Remove "(calculated using the UUID1 method)" doc

    When auto=True, the UUID is generated using the specified version, not
    necessarily UUID1.
    chris-martin committed Jul 25, 2014
Commits on Jul 5, 2014
Commits on Feb 20, 2014
  1. 0.5.0

    David Cramer committed Feb 20, 2014
  2. Merge pull request #28 from vitaly4uk/master

    python 3.3 support fix
    committed Feb 20, 2014
  3. Merge pull request #27 from MikeAmy/master

    Remove hyphens from UUIDs passed into queries
    committed Feb 20, 2014
Commits on Feb 17, 2014
  1. python 3.3 support fix

    vitaly4uk committed Feb 17, 2014
  2. python 3.3 support fix

    vitaly4uk committed Feb 17, 2014
Commits on Feb 14, 2014
  1. added fix for failing test

    Mike Amy committed Feb 14, 2014
  2. Added sqlite test runner and failing test that looks up an object wit…

    …h a hyphenated UUID
    Mike Amy committed Feb 14, 2014
  3. Remove hyphens from UUIDs passed into queries

    When performing queries, it is easy to pass in a UUID with hyphens, as this is the common format of UUIDs.
    
    Consider this example:
    
    class ModelUsingUUID(models.Model):
        uuid = UUIDField()
    
    def sync_remotely_created_instance(uuid_value, **other_data):
        if ModelUsingUUID.objects.filter(uuid=uuid_value).count() == 0:
            ModelUsingUUID.objects.create(uuid=uuid_value, **other_data)
        else:
            # update the existing instance
            ...
    
    If it happens that uuid_value is sent from the remote system with hyphens, depending on the database, the lookup can fail, as the database may or may not understand that the hyphens should be ignored. Subsequently, the creation of the new instance may fail, as the uniqueness constraint will be violated.
    
    It could be argued that it is the responsibility of the developer writing the query to ensure that the hyphens are removed, however, seeing as there is in fact no ambiguity with or without the hyphens (hyphens have no meaning by themselves in a UUID), it should always be safe to ignore them, and as bugs similar to the one above may pass silently (e.g. if creation of the instance were done at a different time to the existence check), it is probably safer to simply remove the dashes to avoid these kinds of silent bugs altogether.
    MikeAmy committed Feb 14, 2014
Commits on Jul 31, 2013
  1. Merge pull request #21 from baremetal/hyphenated_uuid

    Added hyphenate kwarg to UUIDField.
    committed Jul 31, 2013
Commits on Jul 29, 2013
  1. Added hyphenate kwarg to UUIDField.

    This allows the field to be created with the hyphenate option, which
    will print the UUID with hyphens in it.
    rca committed Jul 29, 2013
Commits on Aug 16, 2012
  1. Merge pull request #10 from pjdelport/master

    Import the psycopg2.extras module fully.
    committed Aug 16, 2012
  2. Add django-nose to tox deps.

    This makes sure django-nose gets installed to the tox virtualenv,
    avoiding setuptools downloading and installing it as an in-place egg
    later.
    pjdelport committed Aug 16, 2012
  3. Import the psycopg2.extras module fully.

    The psycopg2 package import alone won't load the extras module,
    resulting in an AttributeError here, when running test cases or other
    code that did not previously have the side effect of importing the
    extras module.
    pjdelport committed Aug 16, 2012
Commits on Jul 30, 2012
  1. Switch to django-nose

    committed Jul 30, 2012
Commits on May 12, 2012
  1. Merge pull request #9 from adepue/master

    Ensure that str and unicode representations of StringUUID match.
    committed May 12, 2012
Commits on May 11, 2012
Commits on Feb 16, 2012
  1. Merge pull request #6 from jezdez/master

    One character to rule them all
    committed Feb 16, 2012