How to create a unique field value based on existing values

Нi! Here is an abstract example. I need uniqfield to immediately get values when filling in and updating records.

class Good(models.Model):
    uniqfield= .....?

For example, “Good1” price is 100.50, uniqfield="Good1_100.50, “Good1” price is 200, uniqfield=“Good1_200” of the slug type, only calculated from two fields:)
Is it possible to do this at the model level? Thank you.
p.s. I would appreciate a sample code:)

Yes, you can do this in the model by overriding the save method. (See Saving objects and Overriding predefined model methods.)

If you’re only setting these fields in a view, you could also create the value for that field in that view, or even in the form that you’re using to update the view.