No modification to any existing code is required, and minimal configuration is necessary - the default behavior is sufficient for most apps, and can be enabled by
- Placing the Django-RDF app source directory in the PYTHON_PATH
- Expanding the ontology tarball into the Django-RDF/rdf/ontology/ directory
- Adding INSTALLED_APPS, TEMPLATE_DIRS and SERIALIZATION_MODULES entries to settings.py
- (Re)Running syncdb to generate the database schema elements for the RDF models
- Running the "syncvb" command, to generate an RDF vocabulary from existing models
Syncvb will print a code snippet that can be pasted into settings.py if the SERIALIZATION_MODULES are missing.
Context Python 2.6, Django 1.2.1, October 2010
Problem django-rdf fails from step 4 due to incompatibility with newer Django version read http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Removeddictionaryaccesstorequestobject
Symptoms python manage.py validate: dispatcher.connect() AttributeError?: 'module' object has no attribute 'connect'
Fix 1 of 2 (configuration step 3a) rdf/models.py: modify occurrences of dispatcher.send() and dispatcher.connect() e.g. --dispatcher.send(signal=self.post_save, sender=self.class, instance=self) ++#dispatcher.send(signal=self.post_save, sender=self.class, instance=self) ++my_signal = Signal() ++my_signal.send(sender=self.class)
Fix 2 of 2 (configuration step 3b) rdf/permission.py: change handlers and add 'kwargs' to definition: e.g. --update_RDF_permissions(instance): ++update_RDF_permissions(instance, kwargs):