Skip to content

Commit

Permalink
applied the patch from andieluijk to fix #2 (simplejson import error)
Browse files Browse the repository at this point in the history
  • Loading branch information
arneb committed May 8, 2009
1 parent c39627b commit be1d1af
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion campaign/admin.py
Expand Up @@ -10,7 +10,10 @@
from django.utils.translation import ugettext as _
from django.utils.encoding import force_unicode
from django.utils.safestring import mark_safe
from django.utils.simplejson import simplejson as json
try:
from django.utils.simplejson import simplejson as json
except ImportError:
from django.utils import simplejson as json

from campaign.models import MailTemplate, Subscriber, Campaign, BlacklistEntry, BounceEntry, SubscriberList
from campaign.forms import UploadForm
Expand Down
7 changes: 5 additions & 2 deletions campaign/forms.py
@@ -1,8 +1,11 @@
import csv
from django import forms
from django.utils.simplejson import simplejson as json
from django.utils.translation import ugettext as _

try:
from django.utils.simplejson import simplejson as json
except ImportError:
from django.utils import simplejson as json

class UploadForm(forms.Form):
"""
validates that the uploaded file contains parseable json data.
Expand Down

0 comments on commit be1d1af

Please sign in to comment.