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
... | |
# Slack error handling | |
from django.utils.log import DEFAULT_LOGGING | |
LOGGING = DEFAULT_LOGGING | |
LOGGING['handlers']['slack_admins'] = { | |
'level': 'ERROR', | |
'filters': ['require_debug_false'], # Remove this fileter (make empty array) to test on debug |
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 from 'react'; | |
import { connect } from 'react-redux'; | |
import { push, replace } from 'redux-router'; | |
export function requireLoggedIn(Component) { | |
// a wrapper that requires a user be logged in. You can decide what 'logged in' means - in this example, | |
// a user is considered to be logged in if usersStore.meta.self !== null | |
class AuthComponent extends React.Component { |
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
./manage.py shell | |
from django.contrib.auth.hashers import make_password, HASHERS | |
make_password('test') | |
'pbkdf2_sha256$10000$vkRy7QauoLLj$ry+3xm3YX+YrSXbri8s3EcXDIrx5ceM+xQjtpLdw2oE=' | |
make_password('test', 'abc') | |
'pbkdf2_sha256$10000$abc$MqJS5OAgSmf9SD9mfoY8fgLo8sSKmEcef0AjjMp1Q7w=' |