[Fixed]-ImportError: cannot import name generic

23👍

The django.contrib.contenttypes module has been reorganized in Django 1.7.

Instead of django.contrib.contenttypes.generic.GenericForeignKey you can now use django.contrib.contenttypes.fields.GenericForeignKey. See the sample code in the documentation:

https://docs.djangoproject.com/en/1.7/ref/contrib/contenttypes/#generic-relations

👤Selcuk

1👍

This functionality has been moved into the .models and .fields modules.
It’s just the specific file that is removed; the generic relations functionality still exists, just split into separate files.

1👍

Update Django.tagging package from Python’s official site, not from Pip source, because Pip does not have the latest version.

👤Neo

Leave a comment