Skip to content

Commit

Permalink
Using django 1.2.1; Fixed deprication warning. Closes #7
Browse files Browse the repository at this point in the history
  • Loading branch information
danielkleinert committed May 29, 2010
1 parent 95cc9df commit da9e9c4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion buildout.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ eggs = praktomat

[praktomat]
recipe = djangorecipe
version = 1.2-beta-1
version = 1.2.1
project = src/praktomat
projectegg = praktomat
settings = settings
Expand Down
7 changes: 4 additions & 3 deletions src/praktomat/accounts/forms.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import datetime
import random
import sha
import hashlib

from django.conf import settings
from django.db import models
Expand Down Expand Up @@ -46,8 +46,9 @@ def save(self):
user.save()

# The activation key will be a SHA1 hash, generated from a combination of the username and a random salt.
salt = sha.new(str(random.random())).hexdigest()[:5]
activation_key = sha.new(salt+user.username).hexdigest()
sha = hashlib.sha1()
sha.update( str(random.random()) + user.username)
activation_key = sha.hexdigest()

profile = UserProfile(user=user, activation_key=activation_key,
degree_course=self.cleaned_data.get("degree_course"),
Expand Down
2 changes: 1 addition & 1 deletion src/praktomat/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
'south',

# contains a widget to render a form field as a TinyMCE editor
'tinymce',
#'tinymce',

'praktomat.pagechunks',
'praktomat.accounts',
Expand Down

0 comments on commit da9e9c4

Please sign in to comment.