Skip to content
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 settings to db #2581

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open

Move settings to db #2581

wants to merge 16 commits into from

Conversation

eberonsh
Copy link
Contributor

@eberonsh eberonsh commented Aug 9, 2021

No description provided.

@eberonsh eberonsh force-pushed the moveSettingsToDB branch 2 times, most recently from fe14830 to 91965ca Compare August 9, 2021 12:23
@codecov
Copy link

codecov bot commented Aug 9, 2021

Codecov Report

Merging #2581 (baaa064) into master (25f78cf) will decrease coverage by 0.12%.
The diff coverage is 83.97%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2581      +/-   ##
==========================================
- Coverage   87.77%   87.65%   -0.13%     
==========================================
  Files         894      903       +9     
  Lines       40414    40720     +306     
  Branches     5274     5304      +30     
==========================================
+ Hits        35474    35693     +219     
- Misses       3721     3805      +84     
- Partials     1219     1222       +3     
Impacted Files Coverage Δ
shuup/admin/settings.py 100.00% <ø> (ø)
shuup/apps/__init__.py 78.12% <ø> (ø)
shuup/core/__init__.py 95.65% <ø> (ø)
shuup/core/pricing/__init__.py 100.00% <ø> (ø)
shuup/core/settings.py 100.00% <ø> (ø)
shuup/core/settings_provider.py 0.00% <0.00%> (-62.50%) ⬇️
shuup/core/utils/units.py 0.00% <0.00%> (-100.00%) ⬇️
shuup/default_reports/reports/customer_sales.py 100.00% <ø> (ø)
shuup/default_reports/reports/new_customers.py 100.00% <ø> (ø)
...uup/default_reports/reports/product_total_sales.py 97.14% <ø> (ø)
... and 93 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 25f78cf...baaa064. Read the comment docs.

@eberonsh eberonsh force-pushed the moveSettingsToDB branch 4 times, most recently from 8106350 to 5ec1e6f Compare August 9, 2021 12:40
shuup/admin/modules/settings/forms/system.py Outdated Show resolved Hide resolved
shuup/admin/modules/settings/forms/system.py Outdated Show resolved Hide resolved
shuup/setting_keys.py Outdated Show resolved Hide resolved
@eberonsh eberonsh force-pushed the moveSettingsToDB branch 22 times, most recently from 05c3243 to e7c2069 Compare August 12, 2021 13:19
@eberonsh eberonsh force-pushed the moveSettingsToDB branch 7 times, most recently from f50ba79 to 65edb08 Compare August 18, 2021 18:38
@eberonsh eberonsh force-pushed the moveSettingsToDB branch 3 times, most recently from 1ce96b0 to a6dbdea Compare August 19, 2021 20:05
@eberonsh eberonsh marked this pull request as ready for review August 19, 2021 21:37
return True


class BaseSettingsForm(forms.Form):
title = None
encrypted_fields = []
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to specify in each form which fields are encrypted.



def move_settings_to_db(apps, schema_editor):
configuration.set(None, SHUUP_HOME_CURRENCY, getattr(settings, "SHUUP_HOME_CURRENCY", "EUR"))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took the setting values from shuup.core.settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants