Closed stefvonb closed 4 years ago
Thanks for the report. @Benbb96 do you have time to:
Validate this report if validated:
Write a test for it
Create a PR that includes a fix and test
Thanks @banagale Just FYI, my setup is:
Python 3.8.3 Django 3.0.7 django-address 0.2.3 (not 0.2.5, I have the pip release)
@stefvonb It should be fixed in #112 but yes @banagale I think I'll have time this week to create a PR with some tests on it 😉
Fantastic, thanks @Benbb96, it worked after specifying 0.2.4 in the pip install. Not sure why I was getting an older version. A quick look at the migration now and it correctly sets on_delete=django.db.models.deletion.SET_NULL
.
Cheers!
@stefvonb Ah, okay. Thanks for the update. @Benbb96 Thanks for that quick validation check. No big need for this test, unless you've already made it. Otherwise there are other issues that might move the needle more for the project I might try to steer you toward. :)
@banagale Yep, I tried to take a look at the test but I didn't understand how to run them from the package itself. Should I use the manage.py
from the example project ?
Alright, I also wanted to add an answer to your thread on how I use django-address
but I didn't take the time to do it for now..
@Benbb96 I just realized there is no documentation on how to run tests.
I've added #123, along with some brief notes to include that in the Readme for this next release.
If you have a moment, please try using the steps and letting me know if they are complete enough.
I did notice that one of the tests is currently failing. You're welcome to try to address that or not. If you do, feel free to create an issue for it. (ah, the delightful overhead)
I hope to add Github Actions to make them available for CI on django-address
also. (I've been working with them on another project and hope to bring over some of that knowledge)
And thanks for your intent to add to the how you use thread, I think that will be helpful to understand longer term development priorities.
I have a simple custom user model:
class User(AbstractUser):
...
address = AddressField(null=True)
...
I don't want the user to be deleted when deleting the address, and the documentation says this is the way to do it. However, when I go to the django admin page and delete an address, it will still delete the user as well... How can I fix this? Is there a specific "on_delete" to set?