On Tuesday, January 20, 2015 at 8:02:57 AM UTC-8, Fred wrote: > > I've got a complex 1000+ table vendor read-only MS SqlServer database and > only have SELECT privileges. I can connect with pymssql no problem. > > Of all these tables, I probably care about 50 or less. > > I cannot create views unless I introduce another physical server and use > the "Linked Server" option. >
I am working in a similar environment - 800+ tables in an external read-only mysql db, plus whatever internal tables I need. To set it up, I used inspectdb to generate starter models for all 800 tables and piped the results to a text file. Then I manually copy out just the model definitions for the tables I actually interact with, and remove the many rows I don't need access to, and paste those into standard Django models. Massaged those as necessary. Then used Django's routers system for getting those definitions to appear in the admin (read only of course). And am able to create custom views via the .using() syntax. It's working so far, but I haven't gotten much farther than initial setup yet. Not sure what you mean by "linked server" - I don't see that mentioned in the docs. ./s -- 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/c8b11988-efe0-4197-86ec-2d81dfd04228%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.