Skip to content

Commit

Permalink
Also publish thorbanks_models app
Browse files Browse the repository at this point in the history
- Bump version to 0.6.0a2
- Fix issues with example app config (and a bug in system checks)
- Add makemigrations/migrate commands to setup instructions
  • Loading branch information
Jyrno42 committed Feb 6, 2020
1 parent a565d56 commit 038b56d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -68,6 +68,8 @@ Make django aware that thorbanks migrations are in your local apps folder via se
MIGRATION_MODULES = {"thorbanks": "shop.thorbanks_models.migrations"}
```

And run `makemigrations & migrate` management commands.

### 4. Link it to your Order model

> Note: When using MANUAL_MODELS replace `thorbanks_models` with your local app name
Expand Down
2 changes: 0 additions & 2 deletions example/settings.py
Expand Up @@ -167,8 +167,6 @@
# Tell django that thorbanks migrations are in thorbanks_models app
MIGRATION_MODULES = {"thorbanks_models": "shop.thorbanks_migrations"}

THORBANKS_MANUAL_MODELS = {}

# Here you can customize where the bank logos are (used by the PaymentFormMixin). This is relative to STATIC_URL and
# must end with slash
# BANKLINK_LOGO_PATH
3 changes: 2 additions & 1 deletion pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "django-thorbanks"
version = "0.6.0a1"
version = "0.6.0a2"
description = "`django-thorbanks` provides a Django application for Estonian banklinks (iPizza protocol)."
authors = ["Thorgate <info@thorgate.eu>"]
license = "BSD-3-Clause"
Expand All @@ -18,6 +18,7 @@ classifiers = [
]
packages = [
{ include = "thorbanks" },
{ include = "thorbanks_models" },
{ include = "example" },
{ include = "tests" }
]
Expand Down
4 changes: 2 additions & 2 deletions thorbanks/checks.py
Expand Up @@ -24,12 +24,12 @@ def check_model_settings(app_configs, **kwargs):

migration_modules = getattr(settings, "MIGRATION_MODULES", {})

if not migration_modules.get("thorbanks", ""):
if not migration_modules.get("thorbanks_models", ""):
issues.append(
Error(
"Thorbanks is missing from settings.MIGRATION_MODULES",
hint="Add it to your settings like this - `MIGRATION_MODULES = "
'{ "thorbanks": "shop.thorbanks_models.migrations" }.',
'{ "thorbanks_models": "shop.thorbanks_migrations" }.',
id="thorbanks.E002",
)
)
Expand Down

0 comments on commit 038b56d

Please sign in to comment.