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
def send_email(request): | |
User = get_user_model() | |
if request.method == 'POST': | |
form = EmailTestForm(request.POST) | |
if form.is_valid(): | |
email = form.cleaned_data['email'] | |
user = User.objects.get(email=email) | |
to_email = form.cleaned_data['email'] # cd['email'] | |
subject = 'email test' | |
from_email = settings.EMAIL_HOST_USER |
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
import { Component, OnInit } from '@angular/core'; | |
import { ElementRef, Renderer2 } from '@angular/core'; | |
@Component({ | |
selector: 'app-fancy-form', | |
templateUrl: './fancy-form.component.html', | |
styleUrls: ['./fancy-form.component.css'] | |
}) | |
export class FancyFormComponent implements OnInit { |
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
import React, { Component } from "react"; | |
import { | |
Button, | |
Form, | |
FormGroup, | |
Input, | |
Col, | |
Container, | |
Label | |
} from "reactstrap"; |
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
import React, { Component } from "react"; | |
export default class LoginForm extends Component { | |
state = { | |
username: "", | |
password: "" | |
}; | |
handleSubmit = e => { | |
e.preventDefault(); |
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
import React, { Component } from "react"; | |
export default class LoginForm extends Component { | |
state = { | |
username: "", | |
password: "" | |
}; | |
handleSubmit = e => { | |
e.preventDefault(); |
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
import React, { Component } from "react"; | |
import Input from "./common/Input"; | |
export default class LoginForm extends Component { | |
state = { | |
username: "", | |
password: "", | |
errors: {} | |
}; |
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
Add refs to each element in list using reduce, by creating obj. | |
list = [ | |
{ | |
id: "a", | |
firstname: "Robin", | |
lastname: "Wieruch", | |
year: 1988 | |
}, | |
{ |
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
<div class="nav-icon"> | |
<div></div> | |
</div> | |
https://codepen.io/chriskavanagh/pen/zYYjZGq |
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 App() { | |
const size = useWindowSize(); | |
return ( | |
<div> | |
{size.width}px / {size.height}px | |
</div> | |
); | |
} |
OlderNewer