This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ModelSerializer(Serializer): | |
def update(self, instance, validated_data): | |
raise_errors_on_nested_writes('update', self, validated_data) | |
info = model_meta.get_field_info(instance) | |
# Simply set each attribute on the instance, and then save it. | |
# Note that unlike `.create()` we don't need to treat many-to-many | |
# relationships as being a special case. During updates we already | |
# have an instance pk for the relationships to be associated with. | |
m2m_fields = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The SwiftUI Lab | |
// Website: https://swiftui-lab.com | |
// Article: https://swiftui-lab.com/alignment-guides | |
import SwiftUI | |
class Model: ObservableObject { | |
@Published var minimumContainer = true | |
@Published var extendedTouchBar = false | |
@Published var twoPhases = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while true; do sleep 1; curl http://www.google.com; echo -e '\n\n\n\n'$(date);done |