Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Django 1.8 support #148

Closed
wengole opened this issue Apr 4, 2015 · 1 comment
Closed

Django 1.8 support #148

wengole opened this issue Apr 4, 2015 · 1 comment

Comments

@wengole
Copy link

wengole commented Apr 4, 2015

Currently getting AttributeError: 'Options' object has no attribute 'module_name'

Since the Django 1.8 the model _meta now has a defined API. It appears this no longer explicitly defines a module_name attribute.

Traceback (most recent call last):
  File "/home/benc/PycharmProjects/wizfs/src/snapshots/tests/test_models.py", line 48, in test_str_method
    modified=timezone.now()
  File "/home/benc/buildout-cache/eggs/Django-1.8-py2.7.egg/django/db/models/manager.py", line 127, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/home/benc/buildout-cache/eggs/Django-1.8-py2.7.egg/django/db/models/query.py", line 348, in create
    obj.save(force_insert=True, using=self.db)
  File "/home/benc/PycharmProjects/wizfs/src/snapshots/models.py", line 104, in save
    super(File, self).save(**kwargs)
  File "/home/benc/buildout-cache/eggs/Django-1.8-py2.7.egg/django/db/models/base.py", line 710, in save
    force_update=force_update, update_fields=update_fields)
  File "/home/benc/buildout-cache/eggs/Django-1.8-py2.7.egg/django/db/models/base.py", line 747, in save_base
    update_fields=update_fields, raw=raw, using=using)
  File "/home/benc/buildout-cache/eggs/Django-1.8-py2.7.egg/django/dispatch/dispatcher.py", line 201, in send
    response = receiver(signal=self, sender=sender, **named)
  File "/home/benc/buildout-cache/eggs/django_haystack-2.4.0.dev0-py2.7.egg/haystack/signals.py", line 52, in handle_save
    index.update_object(instance, using=using)
  File "/home/benc/buildout-cache/eggs/django_haystack-2.4.0.dev0-py2.7.egg/haystack/indexes.py", line 282, in update_object
    backend.update(self, [instance])
  File "/home/benc/buildout-cache/eggs/xapian_haystack-2.0.0-py2.7.egg/xapian_backend.py", line 470, in update
    (obj._meta.app_label, obj._meta.module_name, obj.pk, data),
@jorgecarleitao
Copy link
Collaborator

Thanks for adding it here. I think we can use the solution proposed here.

claudep added a commit to claudep/xapian-haystack that referenced this issue Apr 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants