Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Commits on Jan 19, 2015
  1. Merge pull request #42 from coagulant/feature/dj17

    authored
    Django 1.7 migrations support
  2. Merge pull request #48 from ksonbol/master

    authored
    Raise ValueError in get_db_prep_value() when value is of invalid length
Commits on Dec 10, 2014
  1. @ksonbol
Commits on Dec 8, 2014
  1. @ksonbol
Commits on Nov 5, 2014
  1. @luto

    Merge pull request #38 from chris-martin/uuid-version-doc

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

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

    authored
    Update problem with hyphenate.
Commits on Oct 15, 2014
  1. @hobbestigrou
  2. @hobbestigrou
Commits on Oct 10, 2014
  1. @coagulant
Commits on Jul 25, 2014
  1. @chris-martin

    Remove "(calculated using the UUID1 method)" doc

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

    authored
  2. Merge pull request #28 from vitaly4uk/master

    authored
    python 3.3 support fix
  3. Merge pull request #27 from MikeAmy/master

    authored
    Remove hyphens from UUIDs passed into queries
Commits on Feb 17, 2014
  1. @vitaly4uk

    python 3.3 support fix

    vitaly4uk authored
  2. @vitaly4uk

    python 3.3 support fix

    vitaly4uk authored
Commits on Feb 14, 2014
  1. @MikeAmy

    added fix for failing test

    MikeAmy authored
  2. @MikeAmy
  3. @MikeAmy

    Remove hyphens from UUIDs passed into queries

    MikeAmy authored
    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.
Commits on Jul 31, 2013
  1. Merge pull request #21 from baremetal/hyphenated_uuid

    authored
    Added hyphenate kwarg to UUIDField.
Commits on Jul 29, 2013
  1. @rca

    Added hyphenate kwarg to UUIDField.

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

    authored
    Import the psycopg2.extras module fully.
  2. @pjdelport

    Add django-nose to tox deps.

    pjdelport authored
    This makes sure django-nose gets installed to the tox virtualenv,
    avoiding setuptools downloading and installing it as an in-place egg
    later.
  3. @pjdelport

    Import the psycopg2.extras module fully.

    pjdelport authored
    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.
  4. @pjdelport
Commits on Jul 30, 2012
  1. Switch to django-nose

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

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

    authored
    One character to rule them all
  2. @jezdez
Something went wrong with that request. Please try again.