Giter Club home page Giter Club logo

Comments (8)

chrisfranklin avatar chrisfranklin commented on June 20, 2024

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.

bernardopires avatar bernardopires commented on June 20, 2024

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.

chrisfranklin avatar chrisfranklin commented on June 20, 2024

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.

bernardopires avatar bernardopires commented on June 20, 2024

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.

bernardopires avatar bernardopires commented on June 20, 2024

chris can i close this or do you have any other question?

from django-tenant-schemas.

humbled avatar humbled commented on June 20, 2024

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.

bernardopires avatar bernardopires commented on June 20, 2024

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.

humbled avatar humbled commented on June 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.