Commit Graph

205 Commits

Author SHA1 Message Date
Bernardo Pires a9bae38aff updated docs regarding example project 2013-10-20 13:41:46 +02:00
Bernardo Pires 4bbaf6fc9e added first example: an interactive tutorial for this app 2013-10-20 13:32:30 +02:00
Bernardo Pires a9241f2777 small refactoring, remove useless command, only create tenant at the end 2013-10-20 13:32:18 +02:00
Bernardo Pires a5a3438161 updated docs 2013-10-20 10:34:45 +02:00
Bernardo Pires f48a4512b0 removed deprecated PUBLIC_SCHEMA_URL_TOKEN 2013-10-20 10:09:42 +02:00
Bernardo Pires 5e43d4cc33 moved post delete listener to delete method, #81 2013-10-18 11:25:45 +02:00
Bernardo Pires 556b085c5b Merge branch 'master' of https://github.com/bcarneiro/django-tenant-schemas 2013-10-18 10:50:12 +02:00
Bernardo Pires 04f0de9165 fixed type, fixes #83 2013-10-18 10:49:53 +02:00
Bernardo Pires 3aaea31821 Merge pull request #82 from MontmereLimited/master
move version directly into setup.py
2013-10-14 22:39:51 -07:00
Stephen J. Fuhry 3d7c9003e0 move version directly into setup.py
because if you are doing stuff in __init__.py, setup.py will try to load
it on install, which can cause some problems when resources aren't
available on an initial install
2013-10-14 16:13:42 -04:00
Bernardo Pires ce920d0779 moved signals to listeners.py, imported from models. fixes #81 2013-10-14 21:59:05 +02:00
Bernardo Pires 8715f92ae3 Merge pull request #80 from MontmereLimited/exception-swallow
remove redundant re-raising of swallowed exception
2013-10-14 12:28:42 -07:00
Stephen J. Fuhry 99a71c5db8 remove redundant re-raising of swallowed exception 2013-10-14 15:14:58 -04:00
Bernardo Pires 7cc2c194b1 Merge pull request #79 from Walkman/fix_delete
Fixes #77
2013-10-14 11:01:58 -07:00
Walkman 2ee67de1ff Fixes #77
For details see:
http://www.quora.com/Django-web-framework/When-using-Djangos-signals-where-should-the-code-that-registers-a-new-receiver-function-go
2013-10-14 18:14:43 +02:00
Bernardo Pires 92615d0b5e added small deployment guide with apache to the docs 2013-10-09 19:46:33 +02:00
Bernardo Pires 8a3ee48638 fixing the mess i did 2013-10-04 12:59:45 +02:00
Bernardo Pires 4be1f0889f pep8 2013-10-04 12:49:29 +02:00
Bernardo Pires 4925746088 updated string message when saving tenant outside public 2013-10-04 12:45:40 +02:00
Bernardo Pires f16af88a7a Merge pull request #74 from Walkman/restrict_delete
Restrict delete to public or current schema the same way as in case of save
2013-10-04 03:45:09 -07:00
Bernardo Pires aaf8f0126a fixed post delete receiver not working properly 2013-10-04 12:33:00 +02:00
Walkman 3fdc15035f Restrict delete to public or current schema the same way as in case of save 2013-10-03 22:39:59 +02:00
Bernardo Pires 07d2534fe7 Merge pull request #68 from Walkman/refactorings
Refactored commands, should not affect funcionality
2013-09-27 05:19:07 -07:00
Walkman b955ef198f Missing statement, input did not worked on Python 2.7 2013-09-26 01:05:44 +02:00
Walkman 12bef533a2 Small fix in migrate_schemas command 2013-09-25 23:25:42 +02:00
Walkman 5933873174 Move SyncCommon to the right place 2013-09-25 22:55:42 +02:00
Walkman 4ec56fde04 Merge branch 'master' into refactorings 2013-09-25 22:46:10 +02:00
Bernardo Pires e2db89d3f7 Merge pull request #71 from Walkman/update_docs
Added section describing different WSGI setup, fixed small issues with docs.
2013-09-23 22:40:53 -07:00
Walkman 2ab5972b5e Added section describing different WSGI setup, fixed small issues with docs. 2013-09-24 00:56:25 +02:00
Bernardo Pires 92d505eb3a refactored tenant_command, wrapped createsuperuser 2013-09-22 17:58:58 +02:00
Bernardo Pires 7870bf4fa6 disabled direct calls to syncdb and migrate 2013-09-22 16:27:59 +02:00
Bernardo Pires Carneiro 94229986a7 Merge pull request #66 from MontmereLimited/create-tenant-user
added tenant_command, wrapper for django commands
2013-09-20 01:48:03 -07:00
Walkman f04085e399 `True and something` will be always evaluated to "something". It was probably a typo. 2013-09-18 05:09:44 +02:00
Walkman aa6c02fba3 both methods need clear cache, so do it before calling them 2013-09-17 19:55:35 +02:00
Walkman 25bcf3b668 Fixed import from previous commit 2013-09-17 07:15:28 +02:00
Walkman f2d01ad0f4 Refactored commands, should not affect funcionality
* Moved common code for sync_schemas and migrate_schemas into common.py

 * No need to call .count() on sync_shemas(). They will iterated through
   anyway. If there is no_tenant, `if all_tenants` evaluate False immediately.

 * no need to call .all() after .exclude(). It's already a queryset.

 * about self.stdout.write:
   https://docs.djangoproject.com/en/dev/howto/custom-management-commands/

 * made some small cosmetic changes
2013-09-16 22:15:44 +02:00
Stephen J. Fuhry b6c2478b84 should be --schema, not --tenant 2013-09-14 10:49:09 -04:00
Stephen J. Fuhry a7bf829e54 don't need conflict_handler, or duplicate opt 2013-09-14 10:43:51 -04:00
Stephen J. Fuhry 35a9b69ed1 get options from parent command gracefully 2013-09-14 10:41:00 -04:00
Stephen J. Fuhry 77d0ef8762 documentation for tenant_command 2013-09-09 16:55:00 -04:00
Stephen J. Fuhry 0b5ae37000 override create_parser to allow custom args
this allows you to run custom stuff like:

python manage.py tenant_command createsuperuser --foo=bar

without optparse.OptionParser.disable_interspersed_args(),
the above call would fail because --foo is not explicitely
listed as a valid option in tenant_command
2013-09-09 15:23:23 -04:00
Stephen J. Fuhry 60762efab9 remove unused code 2013-09-09 15:14:32 -04:00
Stephen J. Fuhry 6caf655fe1 option to specify --tenant arg 2013-09-09 15:09:13 -04:00
Stephen J. Fuhry 8ac3919ce5 tenant_command wrapper around default commands 2013-09-09 14:10:26 -04:00
Stephen J. Fuhry 668fefb9de Revert "create tenant user command"
This reverts commit 292dc515dc.
2013-09-09 14:10:17 -04:00
Stephen J. Fuhry 292dc515dc create tenant user command 2013-09-08 20:30:01 -04:00
Bernardo Pires Carneiro 6899a7d8f9 Merge pull request #63 from Walkman/master
Added ability to modify Tenant instance from tenant domain. Fixes #62
2013-09-03 22:36:59 -07:00
Walkman c912c92d32 Added ability to modify Tenant instance from tenant domain. Fixes issue #62 2013-09-04 00:35:02 +02:00
Bernardo Pires d8c6a23732 add missing import 2013-08-21 20:30:48 +02:00
Bernardo Pires ad9a6079c5 Merge branch 'jjimenezlopez-master' 2013-08-21 20:29:43 +02:00