| Feature | Django | Laravel | Winner | Comment |
|---|---|---|---|---|
| Authentication | In core | In Core | Laravel | Multiple starter kits available with ready-made toolkits |
| Authorization | In Core | In Core | Django | Django has a built-in permissions system. Laravel has many concepts. Gates, Policies, etc. but requires more code. There's a popular permissions package that adds capabilities to laravel. |
| Templating system | In core | In Core | Laravel | Laravel has the concept of components which is easier to wrap your head around then extending the django templating system. |
| ORM | In core | In core | Django | The django ORM model definition is a lot easier to reason about, and offers automatic migrations. The Laravel query builder is a bit easeier and more SQL-like, but the ORM is really inefficient compared to Django. |
| Performance | Ok | Bad | Django | Laravel requires a lot more work to be performant. |
| Rest Toolkits | DRF | jsonapi | Django | Laravel has |
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
| <?php | |
| /** | |
| * Create media entities from existing file fields. | |
| * | |
| * @link https://chromatichq.com/blog/migrating-drupal-file-fields-media-entities-without-migrate-module | |
| */ | |
| function MODULENAME_update_8001() { | |
| // Nodes types that will get media migrated. | |
| $node_types = ['article','event','page','session','sponsor']; | |
| // Map old file fields => new media fields. |
I hereby claim:
- I am bobodrone on github.
- I am bobodrone (https://keybase.io/bobodrone) on keybase.
- I have a public key ASBxN4UMd7tlAOE6tajZwq8l3_iPijt7DbzpB6eNRccvrwo
To claim this, I am signing this object:
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
| diff --git a/js/references-dialog.js b/js/references-dialog.js | |
| index 0c23b31..fbc5659 100644 | |
| --- a/js/references-dialog.js | |
| +++ b/js/references-dialog.js | |
| @@ -1,52 +1,153 @@ | |
| (function ($) { | |
| - | |
| var $window = $(window); | |
| - | |
| Drupal.behaviors.referencesDialog = { |
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
| booking.controller "BookingController", ($scope, Guests, Resources, Countries, Bookings, Partners, $routeParams, $location, $q, $timeout) -> | |
| $scope.booking = {} | |
| $scope.booking.guests = [] | |
| $scope.booking.resources = [] | |
| $scope.booking.partners = [] | |
| getCountries = -> | |
| d = $q.defer() | |
| Countries.fetch().success (data, status) -> | |
| d.resolve(data) |