Comments (1)
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=[email protected]
--schema=my_specific_schema
Cheers,
Bernardo
2013/2/21 jdcaballero [email protected]
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
from django-tenant-schemas.
Related Issues (20)
- Can't migrate new tables to tennant apps.
- New tenant model is not creating relations in non-public schema with multiple databases
- Accessing tenants data from public. HOT 1
- django-tenants TypeError: argument of type 'TenantQueryset' is not iterable
- ImportError: cannot import name 'force_text' from 'django.utils.encoding' HOT 3
- How to create tenant_schemas.storage.TenantFileSystemStorage within AWS s3 bucket with django-storages 1.12.3
- "Apps aren't loaded yet" when upgrading from django 3.0.10 to 3.2
- Schema Deletion HOT 1
- DRF example
- Support for django 4.0 HOT 7
- how to launch tenant_command loaddata from views with fixtures HOT 1
- Supported Version Django HOT 3
- Distinguish between workspaces
- error 500 DEBUG=False in production HOT 1
- [Solution] Unable to create the django_migrations -relation already exists HOT 1
- healthcheck HOT 2
- Issue in holding DB connection consistently HOT 1
- @contextmanager
- Django-tenants - please help
- About changing public schema to other schema. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-tenant-schemas.