Show More
@@ -14,7 +14,14 b'' | |||||
14 | import ldap |
|
14 | import ldap | |
15 | import urllib2 |
|
15 | import urllib2 | |
16 | import uuid |
|
16 | import uuid | |
17 | import json |
|
17 | ||
|
18 | try: | |||
|
19 | from rhodecode.lib.compat import json | |||
|
20 | except ImportError: | |||
|
21 | try: | |||
|
22 | import simplejson as json | |||
|
23 | except ImportError: | |||
|
24 | import json | |||
18 |
|
25 | |||
19 | from ConfigParser import ConfigParser |
|
26 | from ConfigParser import ConfigParser | |
20 |
|
27 |
@@ -37,7 +37,7 b' from sqlalchemy.exc import IntegrityErro' | |||||
37 |
|
37 | |||
38 | import rhodecode |
|
38 | import rhodecode | |
39 | from rhodecode.lib import helpers as h |
|
39 | from rhodecode.lib import helpers as h | |
40 |
from rhodecode.lib. |
|
40 | from rhodecode.lib.compat import json | |
41 | from rhodecode.lib.auth import LoginRequired, HasPermissionAnyDecorator,\ |
|
41 | from rhodecode.lib.auth import LoginRequired, HasPermissionAnyDecorator,\ | |
42 | HasReposGroupPermissionAnyDecorator, HasReposGroupPermissionAll,\ |
|
42 | HasReposGroupPermissionAnyDecorator, HasReposGroupPermissionAll,\ | |
43 | HasPermissionAll |
|
43 | HasPermissionAll |
@@ -32,7 +32,7 b' from sqlalchemy.sql.expression import fu' | |||||
32 |
|
32 | |||
33 | import rhodecode |
|
33 | import rhodecode | |
34 | from rhodecode.lib import helpers as h |
|
34 | from rhodecode.lib import helpers as h | |
35 |
from rhodecode.lib. |
|
35 | from rhodecode.lib.compat import json | |
36 | from rhodecode.lib.auth import LoginRequired |
|
36 | from rhodecode.lib.auth import LoginRequired | |
37 | from rhodecode.lib.base import BaseController, render |
|
37 | from rhodecode.lib.base import BaseController, render | |
38 | from rhodecode.model.db import Repository |
|
38 | from rhodecode.model.db import Repository |
@@ -765,7 +765,7 b' def jsonify(func, *args, **kwargs):' | |||||
765 |
|
765 | |||
766 | """ |
|
766 | """ | |
767 | from pylons.decorators.util import get_pylons |
|
767 | from pylons.decorators.util import get_pylons | |
768 |
from rhodecode.lib. |
|
768 | from rhodecode.lib.compat import json | |
769 | pylons = get_pylons(args) |
|
769 | pylons = get_pylons(args) | |
770 | pylons.response.headers['Content-Type'] = 'application/json; charset=utf-8' |
|
770 | pylons.response.headers['Content-Type'] = 'application/json; charset=utf-8' | |
771 | data = func(*args, **kwargs) |
|
771 | data = func(*args, **kwargs) |
General Comments 0
You need to be logged in to leave comments.
Login now