View test_drf
This file contains 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 CreateAPIView(CreateAPIView): | |
queryset = Order.objects.all() | |
serializer_class = OrderCreateUpdateSerializer | |
permission_classes = [IsAuthenticated] | |
def get_serializer_context(self): | |
self.data_crm = {} | |
orderData = json.loads(self.request.POST['orderData']) | |
client = orderData['customer'] | |
manager = orderData['manager'] |
View task3.js
This file contains 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
// в этом примере при изменении dumbMethod он будет менятья во всех instance | |
function DumbConstructor() { } | |
DumbConstructor.prototype.dumbMethod = function() { return } | |
// в этом примере при изменении dumbMethod он будет менятья только в instance в которой он меняется | |
function DumbConstructor() { | |
this.dumbMethod = function() { return } | |
} |
View task2.js
This file contains 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
function parent() { | |
this.multiplier = 3; | |
return [33, 77, 99, 81, 55].map(function(I) { return I * this.multiplier}.bind(this)); | |
} |
View gist:91d8676b7fe8bad1fab8510b574f0069
This file contains 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
function poly(names) { | |
var result = Array.prototype.join.call(names, ", ") | |
console.log(result); | |
} |
View base class
This file contains 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
<?php | |
namespace App\Classes; | |
use Illuminate\Http\Request; | |
use Auth; | |
use File; | |
use Illuminate\Support\Facades\Log; | |
use Illuminate\Support\Facades\URL; | |
use Mail; | |
use Session; |