Commits

Sergey Maranchuk  committed fb203a9

fix django 1.5 compability, 1.4 not supported

  • Participants
  • Parent commits 76be129

Comments (0)

Files changed (7)

File djangobb_forum/fields.py

     from StringIO import StringIO
 import random
 from hashlib import sha1
+import json
 
 from django.db.models import OneToOneField
-from django.db.models.fields.related import SingleRelatedObjectDescriptor 
+from django.db.models.fields.related import SingleRelatedObjectDescriptor
 from django.db import models
 from django.core.files.uploadedfile import SimpleUploadedFile
 from django.core.serializers.json import DjangoJSONEncoder
-from django.utils import simplejson as json
 from django.conf import settings
 
 

File djangobb_forum/models.py

 class Profile(models.Model):
     user = AutoOneToOneField(User, related_name='forum_profile', verbose_name=_('User'))
     status = models.CharField(_('Status'), max_length=30, blank=True)
-    site = models.URLField(_('Site'), verify_exists=False, blank=True)
+    site = models.URLField(_('Site'), blank=True)
     jabber = models.CharField(_('Jabber'), max_length=80, blank=True)
     icq = models.CharField(_('ICQ'), max_length=12, blank=True)
     msn = models.CharField(_('MSN'), max_length=80, blank=True)

File djangobb_forum/util.py

 import re
 from HTMLParser import HTMLParser, HTMLParseError
 from postmarkup import render_bbcode
+from json import JSONEncoder
 try:
     import markdown
 except ImportError:
 from django.template import RequestContext
 from django.http import HttpResponse, Http404
 from django.utils.functional import Promise
-from django.utils.translation import force_unicode, check_for_language
-from django.utils.simplejson import JSONEncoder
+from django.utils.translation import check_for_language
+from django.utils.encoding import force_unicode
 from django.template.defaultfilters import urlize as django_urlize
 from django.core.paginator import Paginator, EmptyPage, InvalidPage
 from django.contrib.sites.models import Site
 def urlize(html):
     """
     Urlize plain text links in the HTML contents.
-   
+
     Do not urlize content of A and CODE tags.
     """
     try:

File extras/crontab

 
 $DJANGOBB_PROJECT = '<path to djangobb project>'
 #for expired sessions (is't needed if you use cache backend for sessions)
-* * * * */2 (cd $DJANGOBB_PROJECT; ./manage.py cleanup)
+* * * * */2 (cd $DJANGOBB_PROJECT; ./manage.py clearsessions)
 
 #for django-authopenid
 * * * * */2 (cd $DJANGOBB_PROJECT; ./manage.py cleanupnonces)

File extras/optional-requirements.txt

 -e git://github.com/jtauber/django-mailer.git#egg=django-mailer
+https://github.com/arneb/django-messages/tarball/master#egg=django-messages

File extras/requirements.txt

-Django==1.4.5
+Django==1.5.1
 PIL>=1.1.7
 django-haystack==1.2.7
 south
 pygments
 postmarkup
-django-pagination
-https://github.com/arneb/django-messages/tarball/master#egg=django-messages
+django-pagination
     packages=find_packages(),
     include_package_data=True,
     install_requires=[
-            'django>=1.4.5',
+            'django==1.5.1',
             'pil>=1.1.7',
             'django-haystack==1.2.7',
             'django-pagination',