Hey everyone,

One last try. I've given up on django-locking, and am now trying 
django-concurrency because it's more modern and more likely to work on 
Django 1.6.8's admin interface.

The documentation is very basic and doesn't actually give any examples, so 
I'm not sure if I've missed something, but I'm getting this exception when 
I modify my ConfigurationAdmin class to inherit from ConcurrentModelAdmin as 
the documentation discusses. 
<https://django-concurrency.readthedocs.org/en/latest/admin.html>

class ConfigurationAdmin(ConcurrentModelAdmin):

    form = forms.ConfigurationForm
    change_list_template = 'admin/configuration/change_list.html'

    ...



Internal Server Error: /test/common/configuration/
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", 
line 137, in get_response
    response = response.render()
  File "/usr/local/lib/python2.7/dist-packages/django/template/response.py", 
line 105, in render
    self.content = self.rendered_content
  File "/usr/local/lib/python2.7/dist-packages/django/template/response.py", 
line 82, in rendered_content
    content = template.render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 
140, in render
    return self._render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/test/utils.py", line 85, 
in instrumented_test_render
    return self.nodelist.render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 
840, in render
    bit = self.render_node(node, context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/debug.py", line 
78, in render_node
    return node.render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/loader_tags.py", 
line 123, in render
    return compiled_parent._render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/test/utils.py", line 85, 
in instrumented_test_render
    return self.nodelist.render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 
840, in render
    bit = self.render_node(node, context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/debug.py", line 
78, in render_node
    return node.render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/loader_tags.py", 
line 123, in render
    return compiled_parent._render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/test/utils.py", line 85, 
in instrumented_test_render
    return self.nodelist.render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 
840, in render
    bit = self.render_node(node, context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/debug.py", line 
78, in render_node
    return node.render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/loader_tags.py", 
line 123, in render
    return compiled_parent._render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/test/utils.py", line 85, 
in instrumented_test_render
    return self.nodelist.render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 
840, in render
    bit = self.render_node(node, context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/debug.py", line 
78, in render_node
    return node.render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/loader_tags.py", 
line 62, in render
    result = block.nodelist.render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 
840, in render
    bit = self.render_node(node, context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/debug.py", line 
78, in render_node
    return node.render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/loader_tags.py", 
line 62, in render
    result = block.nodelist.render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 
840, in render
    bit = self.render_node(node, context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/debug.py", line 
78, in render_node
    return node.render(context)
  File "/usr/local/lib/python2.7/dist-packages/django/template/base.py", line 
1196, in render
    _dict = func(*resolved_args, **resolved_kwargs)
  File 
"/usr/local/lib/python2.7/dist-packages/django/contrib/admin/templatetags/admin_list.py",
 line 288, in result_list
    'results': list(results(cl))}
  File 
"/usr/local/lib/python2.7/dist-packages/django/contrib/admin/templatetags/admin_list.py",
 line 266, in results
    yield ResultList(None, items_for_result(cl, res, None))
  File 
"/usr/local/lib/python2.7/dist-packages/django/contrib/admin/templatetags/admin_list.py",
 line 258, in __init__
    super(ResultList, self).__init__(*items)
  File 
"/usr/local/lib/python2.7/dist-packages/django/contrib/admin/templatetags/admin_list.py",
 line 185, in items_for_result
    f, attr, value = lookup_field(field_name, result, cl.model_admin)
  File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/util.py", 
line 254, in lookup_field
    value = attr(obj)
  File "/usr/local/lib/python2.7/dist-packages/concurrency/admin.py", line 37, 
in action_checkbox
    get_revision_of_object(obj))))
  File "/usr/local/lib/python2.7/dist-packages/concurrency/api.py", line 23, in 
get_revision_of_object
    return getattr(obj, get_version_fieldname(obj))
  File "/usr/local/lib/python2.7/dist-packages/concurrency/core.py", line 22, 
in get_version_fieldname
    return obj._concurrencymeta._field.attname
AttributeError: 'Configuration' object has no attribute '_concurrencymeta'
[21/Nov/2014 20:29:51] "GET /test/common/configuration/ HTTP/1.1" 500 368613


I also changed {{ obj.pk }} to {{ obj|identity }} in 
delete_selected_confirmation.html as directed in the documentation. 
<https://django-concurrency.readthedocs.org/en/latest/admin.html>

Does anyone know how to set this project up? Any help at all would be 
greatly appreciated.

Thanks!

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/88fd7d9c-3976-448d-aee3-7aca51189e43%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to