I hereby claim:
- I am mbrochh on github.
- I am mbrochh (https://keybase.io/mbrochh) on keybase.
- I have a public key ASDTuzhLkQ2LcfTUBN6bQ2WvvX2c7kduUqWgL5sUuidzYgo
To claim this, I am signing this object:
# We have many instances in our apps where the user goes through many steps of forms. | |
# Each step obviously has it's own ModelForm. At the end, there is usually a final step | |
# for the user to submit everything. For this step, we usually want to run all the other | |
# form validations again, just to be sure that all the data looks good. | |
# Problem: How do you run a form validation if you don't have any POST/GET data? | |
class Form1(forms.ModelForm): | |
class Meta: | |
model = Model1 |
if command -v pyenv 1>/dev/null 2>&1; then | |
eval "$(pyenv init -)" | |
fi | |
export PYENV_VIRTUALENVWRAPPER_PREFER_PYVENV="true" | |
export WORKON_HOME=$HOME/.virtualenvs | |
pyenv virtualenvwrapper_lazy |
I hereby claim:
To claim this, I am signing this object:
### Keybase proof | |
I hereby claim: | |
* I am mbrochh on github. | |
* I am mbrochh (https://keybase.io/mbrochh) on keybase. | |
* I have a public key ASDTuzhLkQ2LcfTUBN6bQ2WvvX2c7kduUqWgL5sUuidzYgo | |
To claim this, I am signing this object: |
// Kudos to @kronosfere for discovering this!! | |
// App.js: | |
const SomeView = Loadable({ | |
loader: () => import('./SomeView.js'), | |
loading: Loading, | |
}) | |
const SomeWrapperView = Loadable({ |
// for this to work you need to set `"chromeWebSecurity": false` in cypress.json | |
describe('Make Stripe Payment', function() { | |
before(function() { | |
cy.visit('http://localhost:3000/en/stripe/checkout/') | |
Cypress.Cookies.preserveOnce('sessionid') | |
}) | |
it('should enter credit card details and finalise payment', function() { | |
cy.get('[data-test="button-FormStripeCart-PayWithCreditCard"]').click() |
from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator | |
# First we create a little helper function, becase we will potentially have many PaginatedTypes | |
# and we will potentially want to turn many querysets into paginated results: | |
def get_paginator(qs, page_size, page, paginated_type, **kwargs): | |
p = Paginator(qs, page_size) | |
try: | |
page_obj = p.page(page) | |
except PageNotAnInteger: |
Verifying that +mbrochh is my blockchain ID. https://onename.com/mbrochh |
class Component1 extends React.Component { | |
static propTypes = { | |
some: React.PropTypes.bool, | |
prop: React.PropTypes.string, | |
types: React.PropTypes.object, | |
} | |
} | |
class Component2 extends React.Component { | |
static propTypes = { |
query { | |
products { | |
id | |
} | |
} |