Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixing json import error for python2.5

  • Loading branch information...
commit fba83af6663c4fdacb71cb492abcf525d52159ab 1 parent bd320d7
@MegaMark16 authored
View
11 README.rst
@@ -7,6 +7,7 @@ Dependancies
============
- django (tested with 1.3)
+- simplejson (required if using python 2.5, suggested otherwise)
Getting Started
=============
@@ -42,7 +43,10 @@ Add ``live_support.urls`` to your urls.py, like so:
url(r'^support/', include('live_support.urls')),
)
-
+
+If you are going to use the chat_iframe templatetag, be sure that you have
+'django.core.context_processors.request' in your TEMPLATE_CONTEXT_PROCESSORS.
+
Usage
=============
@@ -50,7 +54,8 @@ You can either override the template for the ``start_chat``
(live_support/start_chat.html) and ``client_chat``
(live_support/live_support.html) views and just point users to the root
of the live_support app as defined in your urls.py file, or you can drop
-the ``{% chat_iframe %}`` templatetag into your base template, which will
-render the chat sidebar (which pops out into a chat window) on every
+the ``{% chat_iframe %}`` templatetag into your base template, but be sure
+to include {% load live_support_tags %} at the top of your template, which
+will render the chat sidebar (which pops out into a chat window) on every
page.
View
1  demo/settings.py
@@ -109,7 +109,6 @@
'django.core.context_processors.request',
'django.core.context_processors.media',
'django.core.context_processors.static',
- 'sekizai.context_processors.sekizai',
)
ROOT_URLCONF = 'demo.urls'
View
4 live_support/__init__.py
@@ -1,3 +1,3 @@
-VERSION = (0,1,5)
-__version__ = "0.1.5"
+VERSION = (0,1,6)
+__version__ = "0.1.6"
View
2  live_support/templates/admin/live_support/chat/change_list.html
@@ -32,7 +32,7 @@ <h1 id="site-name">{% trans 'Chat Admin' %}</h1>
<div id="chat_{{ chat.id }}" class="message_list">
<div class="status">{% trans 'The user seems to have disconnected.' %}</div>
<ul>
- <li>{{ chat.name }}: {{ chat.details }}</li>
+ <li class="question">Question: {{ chat.details }}</li>
{% for message in chat.messages.all %}
<li id="message_{{ message.id }}">{{ message.name }}: {{ message.message }}</li>
{% endfor %}
View
6 live_support/views.py
@@ -1,4 +1,8 @@
-import json
+try:
+ import simplejson as json
+except ImportError:
+ print "Failing over"
+ import json
from django.db import models
from django.core.urlresolvers import reverse
from django.http import HttpResponse, Http404, HttpResponseRedirect
View
3  setup.py
@@ -5,7 +5,8 @@
install_requires = [
'setuptools',
- 'django',
+ 'simplejson',
+ 'django>=1.3',
]
setup(
Please sign in to comment.
Something went wrong with that request. Please try again.