Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test Project and Management command #24

Closed
jdcaballerov opened this issue Feb 21, 2013 · 1 comment
Closed

Test Project and Management command #24

jdcaballerov opened this issue Feb 21, 2013 · 1 comment

Comments

@jdcaballerov
Copy link
Contributor

Hi, First of all I appreciate such a useful and great project. I will like to send you a link to a test project (minimal Blog) I've put that can be useful for people interested in starting using your code.

Second: Are you willing to include a management command to create superusers in the schemas ? I think that can be useful in settings such as the one of blogs that use admin to enter data. In affirmative case I can put some time to contribute it.

regards,

@bernardopires
Copy link
Owner

Hi jdcaballero,

thanks for the compliments and your feedback! It is not my intention to add
all previous django commands in a schema-compatible way. You can however
achieve what you want quite easily. Take a look at BaseTenantCommand. All
you have to do is to create a new Subclass of BaseTenantCommand and then
set the COMMAND_NAME to django's create superuser command
(createsuperuser). BaseTetantCommand will automatically run the command to
all schemas. You can use --schema to choose a specific schema if you want.

If you want to send a new patch, I'd suggest you to make a new command that
works exactly like BaseTenantCommand, that is, on all schemas. It would
take as an argument the name of which django command you want to run. All
other arguments would be passed to the command you wish to run. So if the
new command name is run_schemas and you want to create a new super user for
a specific schema, it would work like this ./manage.py run_schemas
createsuperuser --username=bla --email=bla@bla.com
--schema=my_specific_schema

Cheers,
Bernardo

2013/2/21 jdcaballero notifications@github.com

Hi, First of all I appreciate such a useful and great project. I will like
to send you a link to a test projecthttps://github.com/jdcaballero/django-tenant-schemas-test-project(minimal Blog) I've put that can be useful for people interested in
starting using your code.

Second: Are you willing to include a management command to create
superusers in the schemas ? I think that can be useful in settings such as
the one of blogs that use admin to enter data. In affirmative case I can
put some time to contribute it.

regards,


Reply to this email directly or view it on GitHubhttps://github.com//issues/24.

Bernardo Pires Carneiro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants