Giter Club home page Giter Club logo

Comments (4)

guillempuey avatar guillempuey commented on June 20, 2024 2

@bcarneiro Hi. I'm so new in Django stuff and I'd like to get a litle more information on how to use the django-tenant-schemas. Cause I think that I'm missing something... which is the best way to that? writing my questions here? or is it possible to send a private message anyhow?

Thanks!

from django-tenant-schemas.

guillempuey avatar guillempuey commented on June 20, 2024

Hi,

I'm trying to setup a multi-tenant-schema database with one admin for each tenant. Is it possible? When I add a tenant model object into the public schema using the admin, i get the following error:

insert or update on table "django_admin_log" violates foreign key constraint "django_admin_log_user_id_fkey"
DETAIL: Key (user_id)=(1) is not present in table "auth_user".

I supose that it reffers to the TENANT_APPS django.contrib.auth...

These are my settings:

SHARED_APPS = (
'tenant_schemas', # mandatory
'MyApp.common', # you must list the app where your tenant model resides in

'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',

)

TENANT_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'tastypie',
)

If it is not the right place to get support, please, let me know who can help me.

Thanks in advance!

Guillem

from django-tenant-schemas.

bernardopires avatar bernardopires commented on June 20, 2024

@Barnalite. This is a weird error considering you have admin and auth
installed both in SHARED and in TENANT. How are you syncing the models? Can
you paste your INSTALLED_APPS here too?

2013/6/7 Barnalite [email protected]

Hi,

I'm trying to setup a multi-tenant-schema database with one admin for each
tenant. Is it possible? When I add a tenant model object into the public
schema using the admin, i get the following error:

insert or update on table "django_admin_log" violates foreign key
constraint "django_admin_log_user_id_fkey"
DETAIL: Key (user_id)=(1) is not present in table "auth_user".

I supose that it reffers to the TENANT_APPS django.contrib.auth...

These are my settings:

SHARED_APPS = (
'tenant_schemas', # mandatory
'MyApp.common', # you must list the app where your tenant model resides in

'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',

)

TENANT_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'tastypie',
)

If it is not the right place to get support, please, let me know who can
help me.

Thanks in advance!

Guillem


Reply to this email directly or view it on GitHubhttps://github.com//issues/44#issuecomment-19102232
.

Bernardo Pires Carneiro

from django-tenant-schemas.

bernardopires avatar bernardopires commented on June 20, 2024

Read the documentation and create a new issue explaining what you don't
understand or what problem you are having. I'm not going to reply to
private messages as the same question you have could also help someone else
in the future

2013/6/9 Barnalite [email protected]

@bcarneiro https://github.com/bcarneiro Hi. I'm so new in Django stuff
and I'd like to get a litle more information on how to use the
django-tenant-schemas. Cause I think that I'm missing something... which is
the best way to that? writing my questions here? or is it possible to send
a private message anyhow?

Thanks!


Reply to this email directly or view it on GitHubhttps://github.com//issues/44#issuecomment-19167321
.

Bernardo Pires Carneiro

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.