-
-
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
Allow extend Translation and Subproject form logic from corporate #3937
Conversation
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.
The old style settings was to create a new setting for every override. The new pattern is to user the override classes mapping instead.
readthedocs/projects/forms.py
Outdated
@@ -281,6 +282,11 @@ def get_subproject_queryset(self): | |||
return queryset | |||
|
|||
|
|||
class ProjectRelationshipForm(SettingsOverrideObject): | |||
_default_class = ProjectRelationshipBaseForm | |||
_override_setting = 'PROJECT_RELATIONSHIP_FORM' |
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.
We don't use individual settings anymore, this is legacy. See the override classes setting instead.
readthedocs/projects/forms.py
Outdated
@@ -563,6 +569,11 @@ def save(self): | |||
return project | |||
|
|||
|
|||
class TranslationForm(SettingsOverrideObject): | |||
_default_class = TranslationBaseForm | |||
_override_setting = 'PROJECT_TRANSLATION_FORM' |
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.
Same here
…adthedocs#3937) * Allow extend Translation and Subproject form logic from corporate * Remove old style setting override
There is no changes in the logic, just make these two forms extendable from Corporate site since we need to change some logic regarding the Organizations permissions.