title: Django appears to be caching function generating UUID for a model object
body: <p>I'm using the following code to generate a UUID for every new instance of a model object:</p>
  
  <pre><code>def make_uuid(type):
      """Takes an entity type identifier string as input and returns a hex of UUID2 with a 
      type identifier pre-pended for readability"""
  
      return str(type)+str(uuid.uuid1().hex)
  </code></pre>
  
  <p>Model field:</p>
  
  <pre><code>account_uuid = models.CharField(max_length=34, default=make_uuid('AC'), db_index=True, unique=True)
  </code></pre>
  
  <p>When I actually run the app, the first attempt works great, but the second and all subsequent attempts fail with the following message:</p>
  
  <blockquote>
    <p>Exception Type:   IntegrityError</p>
    
    <p>Exception Value:   duplicate key value violates unique constraint
    "accounts_accounts_account_uuid_key"</p>
  </blockquote>
  
  <p>Any ideas as to what might be going on?</p>