Hi all,
I am newbie in django and while trying to write a database router for
using multiple database I did something like :class Meta:
using = 'somedatabasename'in Django models.py.
However while doing a syncdb I get an error like this :
TypeError: 'class Meta' got invalid attribute(s): using
what am I missing here??
any pointers or docs will be of great help.
-------------
Regards
Subhodip Biswas
The error is quite clear: there's no 'using' attribute in Meta. Where did you get the impression that there was? It's certainly not mentioned in the comprehensive documentation on multiple databases here:
https://docs.djangoproject.com/en/1.3/topics/db/multi-db/
As that doc shows, the decision of what db to use for a model or query is made by the router, not by the model.
--
DR.
-- You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/vbsH6o06Ez4J.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment