Commit Graph

648 Commits

Author SHA1 Message Date
Bernardo Pires 5f0f3edf36 Merge pull request #8 from rctay/rc/schema-exists
improve schema existence checking
2012-08-01 10:45:42 -07:00
Bernardo Pires db11faeb3a Merge pull request #7 from rctay/rc/test-fix
fix test teardown
2012-08-01 10:09:20 -07:00
Bernardo Pires e163349966 Merge branch 'master' of https://github.com/bcarneiro/django-tenant-schemas 2012-08-01 19:06:46 +02:00
Bernardo Pires 4bbe1dfa7f don't assume PUBLIC_SCHEMA_URL_TOKEN is defined in settings.py 2012-08-01 19:06:23 +02:00
Tay Ray Chuan 35da9555ac use pg_namespace instead of information_schema
According to the docs [1], information_schema.schemata shows only
schemas owned by the current user. This is a problem if the current user
is not the default user; even the `public` schema may not show up [2].

Thus, use pg_namespace instead.

[1] http://www.postgresql.org/docs/8.4/static/infoschema-schemata.html
[2] http://archives.postgresql.org/pgsql-general/2008-10/msg01320.php
2012-07-31 17:54:59 +08:00
Tay Ray Chuan bba385a0c6 fix test teardown
Teardown of db (destroy_test_db) may fail when our custom cursor
wrapper tries to set the search_path to a possibly already-deleted
schema.
2012-07-31 17:45:39 +08:00
Tay Ray Chuan e4765c3f6f factor out schema existence checking 2012-07-31 17:38:55 +08:00
Bernardo Pires 648071392e Merge pull request #6 from rctay/rc/pg-circular
postgresql_backend: avoid a circular import
2012-07-30 23:35:09 -07:00
Bernardo Pires c5a6ccc2a7 updating tenant-routing logic. now you use the token for the public schema instead of the tenant schemas. this should make this app easier to integrate into current code. 2012-07-22 17:08:55 +02:00
Tay Ray Chuan 2d86d440fc postgresql_backend: avoid a circular import
This module was failing to be imported. django.db.connection was
importing it, and the module in turn was importing django.db.connection.
Fix this by delaying this import till it's actually needed.
2012-07-22 14:12:28 +08:00
Bernardo Pires a7d7204e36 updating documentation 2012-07-21 14:23:35 +02:00
Bernardo Pires bac2cd9e9e when creating a tenant, all models get synced via syncdb and then the migrations are faked. (instead of calling syncdb and then migrate) 2012-07-21 14:18:01 +02:00
Bernardo Pires 60f830291f removing command manage_schemas 2012-07-09 22:33:08 +02:00
Bernardo Pires 5bb453b037 removing command manage_schemas 2012-07-09 22:32:57 +02:00
Bernardo Pires 6218a466b8 Fixing small bug when using tests with south enabled and the flag SOUTH_TESTS_MIGRATE was true. Renamed commands. 2012-07-08 14:00:39 +02:00
Bernardo Pires ceb465d1a0 updating docs 2012-07-07 13:22:43 +02:00
Bernardo Pires 6ebaeb931a updating docs 2012-07-07 12:21:44 +02:00
Bernardo Pires 07fdc5fe88 updating docs 2012-07-07 12:10:06 +02:00
Bernardo Pires 7be3baafb1 updating docs 2012-07-07 11:55:52 +02:00
Bernardo Pires d1ae599f29 added documentation and minor refactoring 2012-07-07 11:47:51 +02:00
Bernardo Pires 5047c0013b Merge branch 'master' of https://github.com/bcarneiro/django-tenant-schemas 2012-07-05 20:01:07 +02:00
Bernardo Pires d97fbf9e83 added routing tests 2012-07-05 20:01:02 +02:00
Bernardo Pires c3e2e2f65f minor refactoring 2012-07-05 19:10:53 +02:00
Bernardo Pires c76dede250 minor refactoring and adding schema tests 2012-07-05 19:07:27 +02:00
Bernardo Pires 69d78517b4 light refactoring and adding more comments in the code. 2012-07-04 18:27:52 +02:00
Bernardo Pires e8e395af27 first attempt at multi threading 2012-07-02 21:54:33 +02:00
Bernardo Pires 470572865e forced schema to public before selecting tenant 2012-07-02 21:37:35 +02:00
Bernardo Pires 644dff2b46 reverting changes 2012-07-02 19:48:01 +02:00
Bernardo Pires 5a451cc1cc first attempt at making it thread-safe 2012-07-02 16:28:28 +02:00
Bernardo Pires 1f3f9a9360 first attempt at making it thread-safe 2012-07-02 16:13:27 +02:00
Bernardo Pires 4607d6965e now ignoring dev. 2012-07-02 14:18:10 +02:00
Bernardo Pires 44c8fb4d14 now ignoring www. 2012-07-02 12:31:10 +02:00
Bernardo Pires 74a4eea110 moved mixin to models.py 2012-07-02 12:01:44 +02:00
Bernardo Pires b9273720d2 renaming project 2012-06-23 20:28:14 +02:00
Bernardo Pires f0f16d6ec4 renaming project 2012-06-23 13:17:30 +02:00
Bernardo Pires 488bd125c4 removed tenants being at settings file. now it's at database, use mixin to get the needed model fields. 2012-06-21 22:22:25 +02:00
Bernardo Pires 1e86055320 made variable out of constant 'firm' and added missing files 2012-06-18 14:08:30 +02:00
Bernardo Pires 51cceba542 added reverse functions for schema-dependent urls 2012-06-18 14:00:47 +02:00
Bernardo Pires 4568969e88 BaseSchemataCommand now allows running a command on a particular schema 2012-06-18 12:42:34 +02:00
Vlada Macek 902406bc50 Text fix. 2012-05-25 15:19:20 +02:00
Vlada Macek 422d900466 Added top warning to README. 2012-05-25 15:14:30 +02:00
Vlada Macek 5f1855abf5 Changed comment. Oracle support untested. Thanks for contribution, Sławomir. 2012-04-18 13:34:04 +02:00
Sławek Ehlert 310c778b93 first version of oracle support
it does not pass tests and don't support schema/user creation
2012-04-14 18:36:39 +02:00
Erik Simmler 8f9487b70c Added test to show that the sites framework cache doesn't play well 2011-12-19 10:19:45 -05:00
Vlada Macek 62e347230e Thank you, Erik. Now added some contacts. 2011-12-07 18:32:08 +01:00
Erik Simmler 838a2ce65e Added setup.py and other packaging miscellania 2011-12-06 17:25:47 -05:00
Vlada Macek d3f3697610 README fixes. 2011-02-06 18:51:48 +01:00
Vlada Macek c7aa5bfd2b Initial commit. 2011-02-06 18:42:00 +01:00