summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandre Leray <alexandre@alexandreleray.com>2010-11-04 21:21:35 (GMT)
committer Alexandre Leray <alexandre@alexandreleray.com>2010-11-04 21:21:35 (GMT)
commita1bc2bf29d061ef001859236ba3c6d98525fbd17 (patch)
treebdec4cb2203562cd5fd31af3511af7681456d84e
parent3c886e4c3e4fe40403ed0aa509d3e3cef0fef4cd (diff)
recuperer fichiers steph
-rwxr-xr-xbrainch/models/actions.py5
-rwxr-xr-xbrainch/views/repositories/clone.py5
-rwxr-xr-xbrainch/views/repositories/create.py5
-rwxr-xr-xbrainch/views/repositories/edit.py5
-rwxr-xr-xbrainch/views/repositories/pull.py5
-rwxr-xr-xbrainch/views/repositories/pull_request.py7
6 files changed, 25 insertions, 7 deletions
diff --git a/brainch/models/actions.py b/brainch/models/actions.py
index 5fad27f..6cbbc66 100755
--- a/brainch/models/actions.py
+++ b/brainch/models/actions.py
@@ -15,7 +15,10 @@
## along with Brainch. If not, see <http://www.gnu.org/licenses/>.
-import json
+try:
+ import json
+except ImportError:
+ import simplejson as json
from django.db import models
from django.contrib.auth.models import User
from django.utils.safestring import mark_safe
diff --git a/brainch/views/repositories/clone.py b/brainch/views/repositories/clone.py
index 96f4ca3..98b913a 100755
--- a/brainch/views/repositories/clone.py
+++ b/brainch/views/repositories/clone.py
@@ -15,7 +15,10 @@
## along with Brainch. If not, see <http://www.gnu.org/licenses/>.
-import json
+try:
+ import json
+except ImportError:
+ import simplejson as json
from datetime import datetime
from textwrap import dedent
from django.db import IntegrityError
diff --git a/brainch/views/repositories/create.py b/brainch/views/repositories/create.py
index 245ae46..4b04c35 100755
--- a/brainch/views/repositories/create.py
+++ b/brainch/views/repositories/create.py
@@ -15,7 +15,10 @@
## along with Brainch. If not, see <http://www.gnu.org/licenses/>.
-import json
+try:
+ import json
+except ImportError:
+ import simplejson as json
import os
from datetime import datetime
from textwrap import dedent
diff --git a/brainch/views/repositories/edit.py b/brainch/views/repositories/edit.py
index ed8ed21..1f3e083 100755
--- a/brainch/views/repositories/edit.py
+++ b/brainch/views/repositories/edit.py
@@ -16,7 +16,10 @@
import cStringIO
-import json
+try:
+ import json
+except ImportError:
+ import simplejson as json
from ConfigParser import ConfigParser
from datetime import datetime
from textwrap import dedent
diff --git a/brainch/views/repositories/pull.py b/brainch/views/repositories/pull.py
index e5de2eb..f6e7ab5 100755
--- a/brainch/views/repositories/pull.py
+++ b/brainch/views/repositories/pull.py
@@ -15,7 +15,10 @@
## along with Brainch. If not, see <http://www.gnu.org/licenses/>.
-import json
+try:
+ import json
+except ImportError:
+ import simplejson as json
from datetime import datetime
from textwrap import dedent
from django.http import HttpResponseRedirect
diff --git a/brainch/views/repositories/pull_request.py b/brainch/views/repositories/pull_request.py
index c58e73b..68bb09f 100755
--- a/brainch/views/repositories/pull_request.py
+++ b/brainch/views/repositories/pull_request.py
@@ -15,6 +15,11 @@
## along with Brainch. If not, see <http://www.gnu.org/licenses/>.
+from datetime import datetime
+try:
+ import json
+except ImportError:
+ import simplejson as json
from textwrap import dedent
from django.contrib import messages
from django.template import RequestContext
@@ -23,8 +28,6 @@ from django.shortcuts import render_to_response
from brainch.views.utils import get_mate_repos
from brainch.forms import PullRequestForm
from brainch.models import UserAction, Repository
-from datetime import datetime
-import json
def pull_request(request, username, name):