-
Notifications
You must be signed in to change notification settings - Fork 423
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
Entry in INSTALLED_APPS but not in SHARED_APPS or TENANT_APPS can't migrate #443
Comments
The installation could recommend to use:
Extracted from http://mycodesmells.com/post/django-tutorial-multi-tenant-setup |
That's interesting, I was about to say the docs already recommend something similar and was surprised to see it doesn't. I completely agree it should @stephane. Please send a pull request for this. Thanks! |
Hi, I am seeing another problem that is a little similar to this. Error
Here's my inclusion:
Note that I did a print of these lists in the config and they seem perfectly fine to me: INSTALLED_APPS
SHARED_APPS
TENANT_APPS
What I am seeing is:
Currently the application (Raven/Third party): How do I work around this? Please help. |
Here's a little more info that I see: In my config I wrote similar code as: https://github.com/bernardopires/django-tenant-schemas/blob/master/tenant_schemas/apps.py#L82 The check passes when its running in config, but fails later. Not sure why. Settings
Output (Relevant Output)
Any reason why this would be? Thanks |
I'm experiencing the same problem as @amitjindal . As far as I can see the problem is located in the # Take the app_configs and turn them into *old style* application names.
# This is what we expect in the SHARED_APPS and TENANT_APPS settings.
INSTALLED_APPS = [
config.name
for config in app_configs
] The problem is that if not set(settings.SHARED_APPS).issubset(INSTALLED_APPS):
delta = set(settings.SHARED_APPS).difference(INSTALLED_APPS)
errors.append(
Error("You have SHARED_APPS that are not in INSTALLED_APPS",
hint=[a for a in settings.SHARED_APPS if a in delta],
id="tenant_schemas.E003")) fails, producing the mentioned error. Shouldn't this code: # Take the app_configs and turn them into *old style* application names.
# This is what we expect in the SHARED_APPS and TENANT_APPS settings.
INSTALLED_APPS = [
config.name
for config in app_configs
] be erased and use |
Hi, Any resolution for this issue? I Just upgraded my package to 1.9.0 and now receiving this error for the sentry package. |
Same here. Any resolution ? |
Any resolution for this issue? Having the same problem regarding the raven/sentry package. |
Same here. Any resolution ? |
What i did was just rename the module.
|
I just put a single name app in TENANT_APPS:
And it works for me. |
This bit me this morning... I added an application to
INSTALLED_APPS
but forgot to include it inTENANT_APPS
; when I started migrating the migration code was not being executed, although the migration was being marked as processed, and even recorded in the database.Ultimately though this is an error state - an application that isn't allocated one way or the other can't be migrated because we don't know if it is intended to be in
SHARED_APPS
orTENANT_APPS
. Guessing or defaulting is worse, so I think the best solution is to add this to the system checks.The text was updated successfully, but these errors were encountered: