Comments (8)
The other way to do this would be with wildcard subdomains e.g.
tn1.example.com - First site record
site1.tn1.example.com - Second site record
Perhaps with a package such as: https://github.com/tkaemming/django-subdomains
I am aware that using the above approach is a design decision for me to take, my question is does the current middleware ignore subdomains or will it try and treat them as separate clients and therefore separate schemas?
from django-tenant-schemas.
Could you please elaborate why you need the sites app? Wildcard subdomains are not possible right now, but you can have as many subdomains as you want pointing to the same schema. Is this a reasonable solution? I'd avoid creating a new model.
from django-tenant-schemas.
Yeah I just need multiple sub domains on one schema, it should just be a case of stripping the sub domain off like you are doing with www and dev in the middleware.
from django-tenant-schemas.
If you don't need wildcard subdomains and you know exactly which subdomains you need, you should actually be able to do this without having the change the middleware. Each subdomain has to be a tenant, but they can use the same schema. You can have one tenant for tn1.example.com and another tenant for site1.tn1.example.com, and both pointing to the same schema.
from django-tenant-schemas.
chris can i close this or do you have any other question?
from django-tenant-schemas.
Does this mean that sites listed as mandatory in the docs is incorrect?
TENANT_APPS = (
# The following Django contrib apps must be in TENANT_APPS
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sites',
(install.html)
Thanks
from django-tenant-schemas.
Hi Brad,
I'd very grateful if you could test again if these contrib apps are still
mandatory. I fixed an issue last week with how tenants are synced so there
shouldn't be any mandatory apps anymore. The sites
app is for sure not
mandatory, I myself don't use it.
2013/3/16 humbled [email protected]
Does this mean that sites listed as mandatory in the docs is incorrect?
TENANT_APPS = (
# The following Django contrib apps must be in TENANT_APPS
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sites',(install.html)
Thanks
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/28#issuecomment-15002804
.
Bernardo Pires Carneiro
from django-tenant-schemas.
I'll try to test them, sure. Still have very patchy results for now so will be a while before I can test with any confidence.
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.