- Turbolinks.controller.disable();
+ Turbo.navigator.delegate.stop()
- Turbolinks.controller.currentVisit
+ Turbo.navigator.currentVisit
Udacity cs373 code |
- Turbolinks.controller.disable();
+ Turbo.navigator.delegate.stop()
- Turbolinks.controller.currentVisit
+ Turbo.navigator.currentVisit
[tox] | |
envlist = py36 | |
skipsdist = True | |
[testenv] | |
deps = django==2.0.6 | |
commands = {posargs:./manage.py runserver} | |
setenv = | |
PYTHONPATH={toxinidir} | |
PATH={envdir}/bin:{env:PATH} |
from collections import namedtuple | |
from functools import wraps | |
from itertools import chain | |
from django.utils.functional import curry | |
from django.db.models import CharField | |
class StateField(CharField): | |
Starts = namedtuple('Starts', ['state']) |
SELECT details.installer.name, COUNT(*) | |
FROM | |
TABLE_DATE_RANGE( | |
[the-psf:pypi.downloads], | |
TIMESTAMP("20160601"), | |
TIMESTAMP("20160630") | |
) | |
WHERE file.project='django-material' | |
group by details.installer.name |
#!/bin/bash | |
DWDIR=~/Downloads/`date +%Y-%m-%d` | |
if [ ! -d $DWDIR ]; then | |
cd ~/Downloads/ && find -maxdepth 1 -type d -empty -delete | |
mkdir $DWDIR | |
unlink ~/Downloads/Current | |
ln -sf $DWDIR ~/Downloads/Current | |
fi; |
class Task(Model): | |
@contextmanager | |
def activate(self): | |
activation = self.flow_task.activation_cls(self.task) | |
with activation.lock(): | |
yield activation | |
def start_view(request, start_task): | |
with start_task.activate() as activation: |
""" | |
Implement @secret_decorator allows to bypass decorator on base class method | |
""" | |
class Base(object): | |
@secret_decorator | |
def method(self): | |
print('base') | |