-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Move organizations models #6776
Conversation
Looks like there is a missing migration, we don't check migrations on .com, but it shouldn't be a problem. I can fix it con .com first. |
Is there anything blocking us to move the whole app?
Just for the records, https://docs.djangoproject.com/en/3.0/ref/applications/#django.apps.AppConfig.label |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good. I'm not sure if it needs a deeper look, but overall it's OK.
I'd may not install the app just yet until we have everything migrated here.
@@ -145,6 +145,7 @@ def INSTALLED_APPS(self): # noqa | |||
|
|||
# our apps | |||
'readthedocs.projects', | |||
'readthedocs.organizations', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume that installing this app won't have any effect in .org until we register the URLs. It may be better to that time before adding it to the INSTALLED_APPS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't have any effect on .org, but we need it so django can manage the models. We can install the app only on .com maybe.
Also, please don't merge this until we have some time testing it locally first. |
What's the best way to review this PR? Is there any change or is just copy and paste from the corporate code? |
Templates and logic |
You need to pull both PRs, from the .org and .com. Check that everything in .com works as expected, and the database doesn't require any changes/migrations. |
I need to test this PR locally before merging
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested this locally and it looks good on community 👍
Definitely would be useful to get the admin over, but not a huge issue if we aren't actively creating organizations. |
This doesn't migrate the whole app, only their models and its dependencies the more minimal possible (querysets, managers, utils, constants). The app is named
readthedocs.organizations
, django will take the last component to name the app (organizations
). Thanks to that we don't need to do any kind of migration on .com, django will still "think" it is the same app.This requires some PRs to be merged on .com first. I was able to run tests successfully and try it locally on .com and .org.