caktus / django-timepiece

A multi-user Django application for tracking people's time on projects.
MIT License
361 stars 115 forks source link

Support For Django 1.8 #818

Closed chayim closed 8 years ago

chayim commented 9 years ago

With 1.8.1 released, it would be great if django 1.8 support was added. At least so far, commit_on_success has been removed from django 1.8 so loading the main page yields the dump below:

Internal Server Error: /accounts/login/ Traceback (most recent call last): File "/data/timepiece_env/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 119, in get_response resolver_match = resolver.resolve(request.path_info) File "/data/timepiece_env/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 366, in resolve for pattern in self.url_patterns: File "/data/timepiece_env/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 402, in url_patterns patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File "/data/timepiece_env/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 396, in urlconf_module self._urlconf_module = import_module(self.urlconf_name) File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module import(name) File "/var/www/html/timepiece/urls.py", line 11, in url(r'', include('timepiece.urls')), File "/data/timepiece_env/local/lib/python2.7/site-packages/django/conf/urls/init.py", line 33, in include urlconf_module = import_module(urlconf_module) File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module import(name) File "/data/timepiece_env/local/lib/python2.7/site-packages/timepiece/urls.py", line 10, in url('', include('timepiece.crm.urls')), File "/data/timepiece_env/local/lib/python2.7/site-packages/django/conf/urls/init.py", line 33, in include urlconf_module = import_module(urlconf_module) File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module import(name) File "/data/timepiece_env/local/lib/python2.7/site-packages/timepiece/crm/urls.py", line 3, in from timepiece.crm import views File "/data/timepiece_env/local/lib/python2.7/site-packages/timepiece/crm/views.py", line 23, in from timepiece.utils.mixins import (CommitOnSuccessMixin, CsrfExemptMixin, File "/data/timepiece_env/local/lib/python2.7/site-packages/timepiece/utils/mixins.py", line 43, in class CommitOnSuccessMixin(object): File "/data/timepiece_env/local/lib/python2.7/site-packages/timepiece/utils/mixins.py", line 45, in CommitOnSuccessMixin @method_decorator(transaction.commit_on_success) AttributeError: 'module' object has no attribute 'commit_on_success'

daaray commented 9 years ago

This particular issue is resolved on develop by moving toward transation.atomic decorators, a la:

https://github.com/caktus/django-timepiece/blob/develop/timepiece/crm/views.py#L496