window.$ = window.jQuery = require('jquery')
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
// IIFE - Immediately Invoked Function Expression | |
(function(yourcode) { | |
// The global jQuery object is passed as a parameter | |
yourcode(window.jQuery, window, document); | |
}(function($, window, document) { | |
// The $ is now locally scoped |
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
// IIFE - Immediately Invoked Function Expression | |
(function($, window, document) { | |
// The $ is now locally scoped | |
// Listen for the jQuery ready event on the document | |
$(function() { | |
// The DOM is ready! |
Permite criar componentes com estilos integrados
https://github.com/styled-components/styled-components
Cria máscara a partir de uma string utilizando um pattern => '(99) 9 9999-999'
https://github.com/brunokrebs/mask-js
Variáveis de ambiente no projeto
https://github.com/joke2k/django-environ
Dados fictícios https://github.com/gregmuellegger/django-autofixture
Login e cadastro https://django-allauth.readthedocs.io/en/latest/installation.html
from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from django.contrib.auth.mixins import LoginRequiredMixin
# protegendo da maneira *2
# @method_decorator(login_required(login_url='/login/'), name='dispatch')
class TesteView(LoginRequiredMixin, TemplateView):
# protegendo da maneira *3 (LoginRequiredMixin)