Resolve "Factor out addresses into their own model" #2974
No reviewers
Labels
No labels
Security
TeX
auto-update
board
done
board
ready
board
todo
check
delete-eslint-rc-js
check
update-builddeps-package-json
check
update-eslint-rc-js
check
update-gitignore
check
update-merge-request-template
check
update-prettier-ignore
check
update-pyproject-toml
check
update-renovate-json
check
update-tox-ini
part
backend
part
ci
part
docs
part
frontend
part
i18n
part
non-technical
part
packaging
prio
1
prio
2
prio
3
release-mr-5.x
size
large
size
medium
size
small
source
customer
source
customer::fsmw
source
customer::fss
source
customer::teckids
source
downstream
type
breaking
type
bug
type
feature
type
refactoring
workflow
blocked
workflow
confirmed
workflow
current-todo
workflow
discussing
workflow
new-app
workflow
wontfix
No milestone
No project
No assignees
5 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
aleksis/AlekSIS-Core!2974
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "8-factor-out-addresses-into-their-own-model"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #8
added 1 commit
Compare with previous version
added 1 commit
Compare with previous version
added 1 commit
Compare with previous version
@lukasw the correct spelling is
address, currently there is admissing.This will fail if there are multiple persons with the same address. Use
get_or_createinstead.Just for better understandability in the code below I'd suggest to use
p, or evenperson, as a variable name. Same thing for thej, which could beaddress.Because it's a
ManyToManyFieldI'd suggest the nameaddresses.Sorry, wrong assumption. I expected a unique constraint.
But: Should my expectation be fulfilled, to make features like "Persons at this address" possible?
If so, editing must be handeled carefully. If multiple persons live at the same address and one moves away, this has to be represented by assigning a new/other address to that person, not by editing the address, because then the other persons would move too (at least in AlekSIS). In contrast to that, when editing in a case like fixing a typo, it is useful if that changes the address instead of creating and linking a new one.
changed this line in version 4 of the diff
changed this line in version 4 of the diff
changed this line in version 4 of the diff
added 1 commit
Compare with previous version
added 1 commit
Compare with previous version
added 1 commit
Compare with previous version
added 64 commits
masterCompare with previous version
added 16 commits
masterCompare with previous version
@lukasw Please rebase with current master
added 1 commit
Compare with previous version
along the lines of
addresses__street__icontainsadded 390 commits
masterCompare with previous version
added 5 commits
Compare with previous version
added 1 commit
Compare with previous version
resolved all threads
changed this line in version 13 of the diff
added 1 commit
Compare with previous version
Why is this a many-to-many field?
This should probably be an extra field on the
throughmodel of the Person->Address relation.If we go for a structured fields approach, then this is missing, at least, a country field.
Have you done some research on best practices for moedelling an address?
This
__str__method is odd. Why does it only contain the street and housenumber?assigned to @lukasw
https://pypi.org/project/django-countries/
added 259 commits
master684c5b5f- Add adress model and migration from Person model47f6c66d- Drop site frameworkb2f3c164- Fix migrations from merge7b9b3795- Fix bug on person overview page1ca6608b- Reformatb3bcffe0- Fix migrations2b206315- Fix filterCompare with previous version
changed this line in version 15 of the diff
added 1 commit
Compare with previous version
added 1 commit
28d148bc- Fix Address migrationCompare with previous version
resolved all threads
@ZugBahnHof How do I continue now?
Right now the only thing missing is the frontend to edit / create a Person with the new address model. @hansegucker said the page needs to be redone in Vue, since it would not be efficient to change the page when it gets redone with Vue anyway.
changed this line in version 17 of the diff
added 673 commits
master9cdf913c- Fix Lukasf94f75ac- Merge branch 'master' into 8-factor-out-addresses-into-their-own-modelCompare with previous version
added 1 commit
4de7d5d9- Fix lintCompare with previous version
added 2 commits
fd2a0412- Fix migration historyb4ab6e1f- Make id field on PersonType nullable as DummyPerson has no IDCompare with previous version
added 16 commits
00cdf546- Reformata1c1def9- Fix pyproject.tomlfcf0b90c- Improve column layout for editing persons1d3f06a1- Improve column layout for editing personse7d3686e- Add FileFielda74b4067- Merge branch '1107-vue-rework-person-create-edit' of...01cee55f- Merge branch 'master' into 1107-vue-rework-person-create-edit5ddcd57e- Reformat7e5deb3a- Add photo and avatar upload inputs to person creation formbac9b3a9- Merge branch '1107-vue-rework-person-create-edit' into 8-factor-out-addresses-into-their-own-modelCompare with previous version
added 27 commits
e35deb3f- Rearrange fields in person form7ed2bd6c- Add titles to person form520feaa1- De-duplicate keyscb2a95f4- Rename sex choices to uppercase96b9c86f- Use sexSelectField357c2a43- Merge branch '1110-introduce-non-dialog-object-form' into 1107-vue-rework-person-create-edita4396236- Fix indefinite loading6c7c44e1- Merge branch '1110-introduce-non-dialog-object-form' into 1107-vue-rework-person-create-edit6e183643- WIP: Disable fields based on preference when editing own persona6dade03- Merge branch '1107-vue-rework-person-create-edit' into 8-factor-out-addresses-into-their-own-modelCompare with previous version
added 1 commit
79283a39- Create and update default address in person mutationCompare with previous version
added 357 commits
master1e55bff0- Merge branch 'master' into 8-factor-out-addresses-into-their-own-modelCompare with previous version
added 1 commit
aab1474c- Fix address handling in frontendCompare with previous version
added 3 commits
826710bf- Add default item and set isCreate valued422fb1c- Fix default item handling3e02a82c- Merge branch '1234-personform-does-not-work-in-create-mode' into...Compare with previous version
marked this merge request as ready
assigned to @hansegucker and unassigned @lukasw
works just fine now. should the country field be usable in the frontend? ( @hansegucker )
and the last comma only if country is set
@yuha Please also resolve conflicts.
todo: add country field
added 1 commit
aff2719f- Add addresses to OrganisationCompare with previous version
added 15 commits
masterb03a1e99- Merge branch 'master' into 8-factor-out-addresses-into-their-own-modelCompare with previous version
added 1 commit
72d6b5f6- ReformatCompare with previous version
added 2 commits
41adb223- Add CountryField09447fea- Remove duplicated mounted hookCompare with previous version
resolved all threads
changed this line in version 32 of the diff
added 2 commits
09c7a917- Add clearable prop to country fieldd630f22e- Fix formatting of address in person overviewCompare with previous version
mentioned in commit
32bbc80647