Commit Graph

355 Commits

Author SHA1 Message Date
Bernardo Pires d98b70005f Added missing method to TenantTestCase. Fixes #227. 2015-01-16 15:59:06 +01:00
Bernardo Pires 45c9ee95a0 Merge branch 'master' of github.com:bernardopires/django-tenant-schemas 2015-01-12 19:10:53 +01:00
Bernardo Pires 18b2be7027 Added missing management.commands.legacy package to setup.py. Fixes #224. 2015-01-12 19:10:41 +01:00
Bernardo Pires 492641bb6f Merge pull request #217 from tpyo/master
Add database router allow_migrate() for Django 1.7
2015-01-05 20:10:14 +01:00
Donovan Schonknecht 7b4b2fcbcb Add database router allow_migrate() for Django 1.7 2015-01-05 19:58:32 +02:00
Bernardo Pires a15f0dbd1d Updated docs regarding Django 1.7 changes. 2015-01-05 15:54:11 +01:00
Bernardo Pires 50e67c8900 Now using django's new test runner. Fixed test project and examples. 2015-01-05 15:43:40 +01:00
Bernardo Pires 845e19be9c Test project and examples now compatible with Django 1.7 2015-01-05 15:34:47 +01:00
Bernardo Pires 69441977a8 Added blank end line to instrospection.py 2015-01-05 15:19:43 +01:00
Bernardo Pires 0dd239e446 django-tenant-schemas must only be the last app on INSTALLED_APPS on Django <1.7 2015-01-05 15:19:13 +01:00
Bernardo Pires c16a2d7d79 Patched DatabaseIntrospection to only returns the list of tables in the currently selected schemas. Fixes Django 1.7 not being able to have the same app under TENANT_APPS and SHARED_APPS. 2015-01-05 15:13:09 +01:00
Bernardo Pires 267c9f1e3b Tests are now compatible with Django 1.7 2015-01-05 12:33:10 +01:00
Bernardo Pires ac3876d168 django-tenant-schemas is now compatible with Django 1.7 2015-01-05 11:59:00 +01:00
Bernardo Pires 71e7a89707 Migration creating a new foreign key from a model in tenant to a model in public now work. Fixes #214. 2014-12-29 19:06:59 +01:00
Bernardo Pires 3c2c786089 Corrected invalid syntax on recursive-include for manifest 2014-12-29 18:37:40 +01:00
Bernardo Pires 7776c764c9 Added DATABASE_ROUTER to the readme quick install docs. 2014-12-29 12:44:41 +01:00
Bernardo Pires 950b66583c Added note to docs about how to run tests with the new dts_test_project. 2014-12-29 00:14:01 +01:00
Bernardo Pires 5c6d374572 Corrected DATABASE_ROUTERS setting not being displayed correctly as code. 2014-12-29 00:08:23 +01:00
Bernardo Pires 9a9b8a00df Added test project to enable testing with additional models and apps. This allow us to test different apps in TENANT_APPS AND SHARED_APPS. Added more tests that ensure cross schema foreign keys are possible, although the constraints are not created. 2014-12-29 00:07:45 +01:00
Bernardo Pires 1019e0186c pep8 2014-12-27 17:01:08 +01:00
Bernardo Pires ec37a5fb6b Added TENANT_MODEL check to __init__ 2014-12-27 16:42:45 +01:00
Bernardo Pires 1b2627d70f Moved DATABASE_ROUTERS check to __init__.py and pep8d the same file. 2014-12-27 16:34:53 +01:00
Bernardo Pires c0ebde0895 Reviewed documentation. Correct some mistakes and updated the get involved section. 2014-12-27 16:26:13 +01:00
Bernardo Pires eed14ccc3c Added database router. Allows TENANT_APPS and SHARED_APPS to be synced completely separately without messing with Django settings like INSTALLED_APPS or model.meta.managed. Centralized auth is now possible, but cross schema constraints will not be created. This also makes this app thread safe, fixes #2. 2014-12-27 16:13:37 +01:00
Bernardo Pires 70dd4ad463 Refactored tests and added tests checking syncing TENANT_APPS and SHARED_APPS behavior. 2014-12-27 16:06:31 +01:00
Bernardo Pires 1e6bd4028c Now properly deleting the tenant if an error occurs while creating it 2014-12-26 21:21:24 +01:00
Bernardo Pires 8f7d239049 If the tenant creation fails, the newly created tenant schema and its corresponding row on the tenant table get dropped 2014-12-26 21:05:35 +01:00
Bernardo Pires 1aa30ad7fb no longer using legacy remove_www_and_dev function on example 2014-12-26 20:21:33 +01:00
Bernardo Pires fdc8dfec81 Fixed slight indenting mistake 2014-12-26 16:14:04 +01:00
Bernardo Pires e1e2067eaf TenantTestCase now runs in a transaction and no longer truncates all tables. Fixes #169. 2014-12-26 16:09:58 +01:00
Bernardo Pires e9ba644ad2 No longer setting the content type to JSON for the patch and put methods on the TenantRequestFactory. 2014-12-26 13:38:26 +01:00
Bernardo Pires fa71301465 Merge branch 'master' of github.com:bernardopires/django-tenant-schemas 2014-12-25 21:06:31 +01:00
Bernardo Pires 115b03a157 added createsuperuser command to the docs 2014-12-25 21:06:11 +01:00
Bernardo Pires a71e6fef70 Merge pull request #147 from kosz85/patch-2
Fix Migrations.all_migrations() list by clearing cache
2014-12-25 19:39:02 +01:00
Bernardo Pires 8119a9881c Merge pull request #206 from burke-software/master
Fix #191 need to check for psycopg2.InternalError too
2014-11-22 14:38:38 -05:00
David Burke d1eb9dd30d Fix #191 need to check for psycopg2.InternalError too
This fix corrects the problem when used with django-simple-import
https://github.com/burke-software/django-simple-import/issues/37
2014-11-19 13:04:11 -05:00
Bernardo Pires 1a8680960b Merge pull request #203 from bdauvergne/wip/fix-commit-db1875b90f
postgresql_backend: catch exception from django.db.utils and not from th...
2014-11-18 17:11:27 -05:00
Jérôme Schneider 6501ad56f4 postgresql_backend: catch exception from django.db.utils and not from the backend
really fix #191
2014-11-18 22:59:11 +01:00
Bernardo Pires 2567101977 Merge pull request #198 from mbauerRDN/master
Use old style indexing in format strings #2
2014-11-03 11:16:48 -05:00
mbauerRDN 78a91d9d02 format indexing for Python 2.6 compatibility 2014-11-03 14:00:48 +11:00
mbauerRDN 7445463c0b format indexing for Python 2.6 compatibility 2014-11-03 14:00:19 +11:00
Bernardo Pires dec70ee9d7 Merge pull request #193 from bdauvergne/wip/fix-database-transaction-errors
Hide database errors when setting the search path
2014-10-04 18:22:28 -04:00
Bernardo Pires d501387890 Merge pull request #195 from bdauvergne/wip/remove-useless-warning
Use warning to complain about tenant_schemas place in INSTALLED_APPS
2014-10-04 18:21:36 -04:00
Bernardo Pires 50f96c9a2a Merge pull request #190 from rev112/update_manifest_readme
Update MANIFEST and setup.py to use README.rst
2014-10-04 18:21:16 -04:00
Benjamin Dauvergne ccb505976c Use warning to complain about tenant_schemas place in INSTALLED_APPS 2014-10-04 15:44:38 +02:00
Benjamin Dauvergne 8da5075ef7 Hide database errors when setting the search path
It's needed to allow ROLLBACK to be executed on the DB. It resolves
issue #191.
2014-10-04 09:10:42 +02:00
Anton Ovchinnikov ae9cd9c80f Update MANIFEST and setup.py to use README.rst 2014-09-17 10:22:33 +02:00
Bernardo Pires a5f144ac9d Merge pull request #189 from bufke/master
Prefix 'dev.' no longer removed when routing to a tenant
2014-09-15 17:06:06 +02:00
David Burke 4399bf7fd3 Removed dev. from being removed when routing to a tenant
Fixed #184
2014-09-15 11:00:28 -04:00
Bernardo Pires b11ccf1295 Merge pull request #175 from rev112/schema_name_validation
Added validator for TenantMixin.schema_name, check for 'pg_' prefix
2014-09-09 11:35:12 +02:00