Skip to content

Commit

Permalink
Another hook to be overridden
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiask committed Jun 2, 2024
1 parent 2c48e94 commit 8d5a107
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions feincms3_language_sites/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ def _check_feincms3_language_sites_page(cls, **kwargs):
hint='Add ("language_code", "path") to unique_together.',
)

def _set_parent(self, parent):
self.parent = parent
self.language_code = parent.language_code if parent else self.language_code

def _clash_candidates(self):
return super()._clash_candidates().filter(language_code=self.language_code)

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ dynamic = [
]
dependencies = [
"Django>=3.2",
"feincms3>=4.5",
"feincms3>=5.0a2",
]
[project.optional-dependencies]
tests = [
Expand Down

0 comments on commit 8d5a107

Please sign in to comment.