simpler hash

pull/1/head
eric 2016-03-25 22:44:43 -04:00
parent 1dbe68408e
commit ca498a2ed6
1 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,5 @@
import hashlib import hashlib
import uuid
from datetime import datetime from datetime import datetime
from django.conf import settings from django.conf import settings
from django.contrib.contenttypes.generic import GenericForeignKey from django.contrib.contenttypes.generic import GenericForeignKey
@ -15,7 +16,7 @@ class Landing(models.Model):
label = models.CharField(max_length=64, blank=True) label = models.CharField(max_length=64, blank=True)
def _hash(self): def _hash(self):
return hashlib.md5('{}:{}:{}'.format(settings.SECRET_KEY, self.id, datetime.now() )).hexdigest() return uuid.uuid4().hex
def __str__(self): def __str__(self):
return self.label return self.label