We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Trying to update a constance field based on the value of another field
Let's say we have 2 fields title & slug .. the point is whenever title is updated, slug must be updated to the same value without spaces
title
slug
receiver(config_updated) def constance_updated(sender, key, old_value, new_value, **kwargs): print(key, old_value, new_value, sep=" - ") if key == "title" and new_value: try: setattr(sender, "slug", new_value.replace(" ", "")) except Exception as e: print(str(e))
Here's what i get when i print the updated fields and their values
title - old title - new title slug - - newtitle slug - newtitle -
Seems that the slug value is updated already , but then updated again to the old value !
The text was updated successfully, but these errors were encountered:
Probably connected with #442
Sorry, something went wrong.
No branches or pull requests
Describe the problem
Trying to update a constance field based on the value of another field
Let's say we have 2 fields
title
&slug
.. the point is whenevertitle
is updated,slug
must be updated to the same value without spacesHere's what i get when i print the updated fields and their values
Seems that the
slug
value is updated already , but then updated again to the old value !System configuration
The text was updated successfully, but these errors were encountered: