WL-327: Add SiteConfiguration and SiteConfigurationHistory models to LMS - #11806
Conversation
95bc6d5 to
e2dba6c
Compare
|
|
||
|
|
||
| @receiver(post_save, sender=SiteConfiguration) | ||
| def update_site_configuration_history(sender, instance, **kwargs): # pylint: disable=unused-argument |
There was a problem hiding this comment.
We need to include a set of tests to cover this workflow
|
Does it make sense to build on top of |
9bbaf17 to
d54a4f6
Compare
d54a4f6 to
0e66dd4
Compare
|
I'm thinking that these models should live somewhere outside of theming -- I'd prefer to add it to edx-django-sites-extensions, but it would result in a conflict with the existing SiteConfiguration model present in Otto/ecommerce. If we keep these specific to edx-platform perhaps we add a new module to edx-platform/openedx/core/models? |
0e66dd4 to
c65df40
Compare
|
@mattdrayer I have incorporated your feedback changes, kindly take a look |
|
@douglashall, FYI |
|
I wasn't able to comment directly on the |
| # Theming | ||
| 'openedx.core.djangoapps.theming', | ||
|
|
||
| 'openedx.core.djangoapps.site_configuration', |
There was a problem hiding this comment.
Please add a leading comment
|
@saleem-latif overall I think this change set looks good -- we need to improve context/understanding through better comments and docstrings, but as far as the implementation goes we are on the right track. |
|
👍 from me once @mattdrayer's comments are addressed. |
c65df40 to
fe994a5
Compare
fe994a5 to
d7f781d
Compare
|
@mattdrayer I have updated existing comments and added some new doc strings, kindly take a look |
|
Looks great -- 👍 |
Hi @asadiqbal08 , @mattdrayer ,
Kindly review this PR, change set contains addition of
SiteConfigurationmodel to theming app.Description of Changes:
Add a new
SiteConfigurationModel to theming app which would link to Django site inOneToOnerelationship for persisting site specific configurations. This model can have aJSONFieldto keep configurations in JSON. To persist each change to this model we can add a separate ModelSiteConfigurationHistorywhich should persist history ofSiteConfigurationmodel. We can copy data fromSiteConfigurationtoSiteConfigurationHistoryonpost_savesignal ofSiteConfigurationmodel.