HonzaKral/django-threadedcomments — pull request #56 by sallyruthstruik (2014-09-11 05:57:11+00:00)
Title: Added compability with Django==1.7

There are some errors were on django 1.7 version (Tested on example project):

ImportError at /message/1
No module named defaults
Request Method:	GET
Request URL:	http://127.0.0.1:8000/message/1
Django Version:	1.7
Exception Type:	ImportError
Exception Value:
No module named defaults
Exception Location:	/home/stas/workspace/django-threadedcomments/examples/example/urls.py in , line 1
Python Executable:	/home/stas/workspace/django-threadedcomments/env/bin/python
Python Version:	2.7.5
Python Path:
['/home/stas/workspace/django-threadedcomments',
'/home/stas/workspace/django-threadedcomments/examples',
'/home/stas/workspace/django-threadedcomments/env/lib/python2.7',
'/home/stas/workspace/django-threadedcomments/env/lib/python2.7/plat-x86_64-linux-gnu',
'/home/stas/workspace/django-threadedcomments/env/lib/python2.7/lib-tk',
'/home/stas/workspace/django-threadedcomments/env/lib/python2.7/lib-old',
'/home/stas/workspace/django-threadedcomments/env/lib/python2.7/lib-dynload',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-x86_64-linux-gnu',
'/usr/lib/python2.7/lib-tk',
'/home/stas/workspace/django-threadedcomments/env/local/lib/python2.7/site-packages',
'/home/stas/workspace/django-threadedcomments/env/lib/python2.7/site-packages']
Server time:	Thu, 11 Sep 2014 00:55:55 -0500

AttributeError at /message/1
'OrderedDict' object has no attribute 'insert'
Request Method:	GET
Request URL:	http://127.0.0.1:8000/message/1
Django Version:	1.7
Exception Type:	AttributeError
Exception Value:
'OrderedDict' object has no attribute 'insert'
Exception Location:	/home/stas/workspace/django-threadedcomments/threadedcomments/forms.py in __init__, line 12
Python Executable:	/home/stas/workspace/django-threadedcomments/env/bin/python
Python Version:	2.7.5
Python Path:
['/home/stas/workspace/django-threadedcomments',
'/home/stas/workspace/django-threadedcomments/examples',
'/home/stas/workspace/django-threadedcomments/env/lib/python2.7',
'/home/stas/workspace/django-threadedcomments/env/lib/python2.7/plat-x86_64-linux-gnu',
'/home/stas/workspace/django-threadedcomments/env/lib/python2.7/lib-tk',
'/home/stas/workspace/django-threadedcomments/env/lib/python2.7/lib-old',
'/home/stas/workspace/django-threadedcomments/env/lib/python2.7/lib-dynload',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-x86_64-linux-gnu',
'/usr/lib/python2.7/lib-tk',
'/home/stas/workspace/django-threadedcomments/env/local/lib/python2.7/site-packages',
'/home/stas/workspace/django-threadedcomments/env/lib/python2.7/site-packages']
Server time:	Thu, 11 Sep 2014 00:56:55 -0500

Changed:

- `django.conf.urls.defaults` replaced to `django.conf.urls`
- In class ThreadedCommentForm: Now `self.base_fields` is `OrderedDict` and hasn't method `insert`

These changes also compatible with django >=1.5