working somewhat on thinkpad - doesn't pass tests
This commit is contained in:
@@ -6,6 +6,8 @@ argcomplete==1.0.0
|
|||||||
arrow==0.12.1
|
arrow==0.12.1
|
||||||
asn1crypto==0.23.0
|
asn1crypto==0.23.0
|
||||||
astropy==1.1.2
|
astropy==1.1.2
|
||||||
|
atomicwrites==1.3.0
|
||||||
|
attrs==18.2.0
|
||||||
awscli==1.14.57
|
awscli==1.14.57
|
||||||
Babel==2.2.0
|
Babel==2.2.0
|
||||||
backports-abc==0.4
|
backports-abc==0.4
|
||||||
@@ -34,7 +36,7 @@ click==6.6
|
|||||||
cloudpickle==0.1.1
|
cloudpickle==0.1.1
|
||||||
clyent==1.2.1
|
clyent==1.2.1
|
||||||
colorama==0.3.7
|
colorama==0.3.7
|
||||||
comtypes==1.1.3
|
comtypes==1.1.7
|
||||||
configobj==5.0.6
|
configobj==5.0.6
|
||||||
coreapi==2.0.9
|
coreapi==2.0.9
|
||||||
cryptography==2.1.3
|
cryptography==2.1.3
|
||||||
@@ -85,6 +87,7 @@ docopt==0.6.2
|
|||||||
docutils==0.12
|
docutils==0.12
|
||||||
enum34==1.1.2
|
enum34==1.1.2
|
||||||
et-xmlfile==1.0.1
|
et-xmlfile==1.0.1
|
||||||
|
Factory==1.2
|
||||||
fastcache==1.0.2
|
fastcache==1.0.2
|
||||||
filemagic==1.6
|
filemagic==1.6
|
||||||
fitparse==1.0.1
|
fitparse==1.0.1
|
||||||
@@ -94,7 +97,7 @@ Flask-Login==0.3.2
|
|||||||
Flask-OpenID==1.2.5
|
Flask-OpenID==1.2.5
|
||||||
Flask-Uploads==0.2.0
|
Flask-Uploads==0.2.0
|
||||||
flower==0.9.1
|
flower==0.9.1
|
||||||
funcsigs==0.4
|
funcsigs==1.0.2
|
||||||
functools32==3.2.3.post2
|
functools32==3.2.3.post2
|
||||||
future==0.16.0
|
future==0.16.0
|
||||||
futures==3.0.5
|
futures==3.0.5
|
||||||
@@ -127,12 +130,14 @@ Markdown==2.6.7
|
|||||||
MarkupSafe==0.23
|
MarkupSafe==0.23
|
||||||
matplotlib==2.2.2
|
matplotlib==2.2.2
|
||||||
mechanize==0.3.6
|
mechanize==0.3.6
|
||||||
|
MiniMockTest==0.5
|
||||||
|
mock==2.0.0
|
||||||
|
more-itertools==5.0.0
|
||||||
mpld3==0.2
|
mpld3==0.2
|
||||||
mpmath==0.19
|
mpmath==0.19
|
||||||
multipledispatch==0.4.8
|
multipledispatch==0.4.8
|
||||||
MySQL-python==1.2.5
|
|
||||||
mysqlclient==1.3.7
|
|
||||||
networkx==1.11
|
networkx==1.11
|
||||||
|
nose==1.3.7
|
||||||
nose-parameterized==0.6.0
|
nose-parameterized==0.6.0
|
||||||
numpy==1.14.2
|
numpy==1.14.2
|
||||||
oauth2==1.9.0.post1
|
oauth2==1.9.0.post1
|
||||||
@@ -141,20 +146,25 @@ odo==0.4.2
|
|||||||
openapi-codec==1.1.7
|
openapi-codec==1.1.7
|
||||||
packaging==16.8
|
packaging==16.8
|
||||||
pandas==0.22.0
|
pandas==0.22.0
|
||||||
pathlib2==2.1.0
|
pathlib2==2.3.3
|
||||||
pathspec==0.5.5
|
pathspec==0.5.5
|
||||||
|
pbr==5.1.2
|
||||||
pexpect==4.0.1
|
pexpect==4.0.1
|
||||||
pickleshare==0.7.2
|
pickleshare==0.7.2
|
||||||
Pillow==3.2.0
|
Pillow==3.2.0
|
||||||
|
pluggy==0.8.1
|
||||||
polib==1.0.7
|
polib==1.0.7
|
||||||
psutil==4.1.0
|
psutil==4.1.0
|
||||||
ptyprocess==0.5.1
|
ptyprocess==0.5.1
|
||||||
|
py==1.7.0
|
||||||
pyasn1==0.1.9
|
pyasn1==0.1.9
|
||||||
pycparser==2.14
|
pycparser==2.14
|
||||||
pycrypto==2.6.1
|
pycrypto==2.6.1
|
||||||
PyMySQL==0.7.4
|
PyMySQL==0.7.4
|
||||||
pync==1.6.1
|
pync==1.6.1
|
||||||
pyparsing==2.2.0
|
pyparsing==2.2.0
|
||||||
|
pytest==4.2.0
|
||||||
|
pytest-sugar==0.9.2
|
||||||
python-dateutil==2.7.2
|
python-dateutil==2.7.2
|
||||||
python-memcached==1.58
|
python-memcached==1.58
|
||||||
python-metar==1.4.0
|
python-metar==1.4.0
|
||||||
@@ -165,6 +175,7 @@ PyYAML==3.12
|
|||||||
pyzmq==15.2.0
|
pyzmq==15.2.0
|
||||||
ratelim==0.1.6
|
ratelim==0.1.6
|
||||||
redis==2.10.5
|
redis==2.10.5
|
||||||
|
req==1.0.0
|
||||||
requests==2.12.3
|
requests==2.12.3
|
||||||
requests-oauthlib==0.7.0
|
requests-oauthlib==0.7.0
|
||||||
rowingdata==2.0.0
|
rowingdata==2.0.0
|
||||||
@@ -186,10 +197,10 @@ singledispatch==3.4.0.3
|
|||||||
six==1.11.0
|
six==1.11.0
|
||||||
SQLAlchemy==1.0.12
|
SQLAlchemy==1.0.12
|
||||||
sqlparse==0.1.19
|
sqlparse==0.1.19
|
||||||
# Editable install with no version control (stravalib==0.6.6)
|
-e git+git@bitbucket.org:sanderroosendaal/rowsandall.git@c9695a9f8f5ee0e459de066007a5ef4cef58255b#egg=stravalib
|
||||||
-e /srv/venv/lib/python2.7/site-packages
|
|
||||||
subprocess32==3.2.7
|
subprocess32==3.2.7
|
||||||
sympy==1.0
|
sympy==1.0
|
||||||
|
termcolor==1.1.0
|
||||||
timestring==1.6.2
|
timestring==1.6.2
|
||||||
timezonefinder==2.1.2
|
timezonefinder==2.1.2
|
||||||
toolz==0.7.4
|
toolz==0.7.4
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
try:
|
||||||
|
WindowsError
|
||||||
|
except NameError:
|
||||||
|
WindowsError = None
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
pytestmark = pytest.mark.django_db
|
pytestmark = pytest.mark.django_db
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ from rowsandall_app.settings import (
|
|||||||
PAYMENT_PROCESSING_ON
|
PAYMENT_PROCESSING_ON
|
||||||
)
|
)
|
||||||
|
|
||||||
from rowers.tasks_standalone import addcomment2
|
#from rowers.tasks_standalone import addcomment2
|
||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
from async_messages import messages as a_messages
|
from async_messages import messages as a_messages
|
||||||
|
|
||||||
|
|||||||
104
rowsandall_app/settings_thinkpad.py
Normal file
104
rowsandall_app/settings_thinkpad.py
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
"""
|
||||||
|
Django settings for rowsandall_app project.
|
||||||
|
|
||||||
|
Generated by 'django-admin startproject' using Django 1.9.5.
|
||||||
|
|
||||||
|
For more information on this file, see
|
||||||
|
https://docs.djangoproject.com/en/1.9/topics/settings/
|
||||||
|
|
||||||
|
For the full list of settings and their values, see
|
||||||
|
https://docs.djangoproject.com/en/1.9/ref/settings/
|
||||||
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
|
from settings import *
|
||||||
|
|
||||||
|
DATABASES = {
|
||||||
|
'default': {
|
||||||
|
'ENGINE': 'django.db.backends.sqlite3',
|
||||||
|
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
|
||||||
|
# 'HOST': 'localhost',
|
||||||
|
},
|
||||||
|
# 'TEST': {
|
||||||
|
# 'CHARSET': 'utf8',
|
||||||
|
# 'COLLATION': 'utf8_general_ci',
|
||||||
|
# },
|
||||||
|
|
||||||
|
# 'slave': {
|
||||||
|
# 'ENGINE': 'django.db.backends.mysql',
|
||||||
|
# 'NAME': 'rowsanda_107501',
|
||||||
|
# 'USER': 'rowsanda_107501',
|
||||||
|
# 'PASSWORD': 'roeidata',
|
||||||
|
# 'HOST': 'store3.rosti.cz',
|
||||||
|
# 'PORT': '3306',
|
||||||
|
# }
|
||||||
|
}
|
||||||
|
|
||||||
|
#BROKER_URL = 'redis://localhost:6379/0'
|
||||||
|
#CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'
|
||||||
|
#CELERY_IGNORE_RESULT = False
|
||||||
|
|
||||||
|
#CELERY_ACCEPT_CONTENT = ['json']
|
||||||
|
#CELERY_TASK_SERIALIZER = 'json'
|
||||||
|
#CELERY_RESULT_SERIALIZER = 'json'
|
||||||
|
#CELERY_TRACK_STARTED = True
|
||||||
|
#CELERY_SEND_TASK_SENT_EVENT = True
|
||||||
|
|
||||||
|
|
||||||
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
|
DEBUG = True
|
||||||
|
|
||||||
|
TEMPLATES[0]['OPTIONS']['debug'] = DEBUG
|
||||||
|
|
||||||
|
ALLOWED_HOSTS = []
|
||||||
|
|
||||||
|
#INSTALLED_APPS += ['debug_toolbar',]
|
||||||
|
|
||||||
|
MIDDLEWARE_CLASSES += ['debug_toolbar.middleware.DebugToolbarMiddleware',]
|
||||||
|
|
||||||
|
CACHES = {
|
||||||
|
'default': {
|
||||||
|
'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
|
||||||
|
'LOCATION': os.path.join(BASE_DIR, 'django_cache'),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Application definition
|
||||||
|
|
||||||
|
|
||||||
|
STATIC_URL = '/static/'
|
||||||
|
STATIC_ROOT = BASE_DIR
|
||||||
|
STATICFILES_DIRS = [os.path.join(BASE_DIR,'static/plots'),os.path.join(BASE_DIR,'static'),]
|
||||||
|
|
||||||
|
# INTERNAL_IPS = ['127.0.0.1']
|
||||||
|
|
||||||
|
MEDIA_URL = '/media/'
|
||||||
|
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
|
||||||
|
|
||||||
|
LOGIN_REDIRECT_URL = '/rowers/list-workouts/'
|
||||||
|
|
||||||
|
SESSION_ENGINE = "django.contrib.sessions.backends.signed_cookies"
|
||||||
|
|
||||||
|
SITE_URL = "http://localhost:8000"
|
||||||
|
|
||||||
|
#EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
|
||||||
|
|
||||||
|
#EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend'
|
||||||
|
#EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
||||||
|
|
||||||
|
#EMAIL_BACKEND = 'django_ses.SESBackend'
|
||||||
|
|
||||||
|
AWS_SES_REGION_NAME = 'eu-west-1'
|
||||||
|
AWS_SES_REGION_ENDPOINT = 'email.eu-west-1.amazonaws.com'
|
||||||
|
|
||||||
|
EMAIL_HOST = CFG['aws_smtp']
|
||||||
|
EMAIL_PORT = CFG['aws_port']
|
||||||
|
EMAIL_HOST_USER = CFG['aws_smtp_username']
|
||||||
|
EMAIL_HOST_PASSWORD = CFG['aws_smtp_password']
|
||||||
|
EMAIL_USE_TLS = CFG['email_use_tls']
|
||||||
|
DEFAULT_FROM_EMAIL = 'info@rowsandall.com'
|
||||||
|
|
||||||
|
SETTINGS_NAME = 'rowsandall_app.settings_thinkpad'
|
||||||
|
|
||||||
|
|
||||||
@@ -82,4 +82,9 @@ if settings.DEBUG:
|
|||||||
import debug_toolbar
|
import debug_toolbar
|
||||||
urlpatterns += [
|
urlpatterns += [
|
||||||
url(r'^__debug__/',include(debug_toolbar.urls)),
|
url(r'^__debug__/',include(debug_toolbar.urls)),
|
||||||
|
url(
|
||||||
|
regex=r'^static/(?P<path>.*)$',
|
||||||
|
view='django.views.static.serve',
|
||||||
|
kwargs={'document_root': settings.STATIC_ROOT,}
|
||||||
|
)
|
||||||
]
|
]
|
||||||
|
|||||||
24
rqsettings.txt
Normal file
24
rqsettings.txt
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
[program:myworker]
|
||||||
|
; Point the command to the specific rq command you want to run.
|
||||||
|
; If you use virtualenv, be sure to point it to
|
||||||
|
; /home/sander/python/rowsandall/py2/bin/rq
|
||||||
|
; Also, you probably want to include a settings module to configure this
|
||||||
|
; worker. For more info on that, see http://python-rq.org/docs/workers/
|
||||||
|
command=/path/to/rq worker -c workersettings high normal low
|
||||||
|
; process_num is required if you specify >1 numprocs
|
||||||
|
process_name=%(program_name)s-%(process_num)s
|
||||||
|
|
||||||
|
; If you want to run more than one worker instance, increase this
|
||||||
|
numprocs=3
|
||||||
|
|
||||||
|
; This is the directory from which RQ is ran. Be sure to point this to the
|
||||||
|
; directory where your source code is importable from
|
||||||
|
directory=/path/to
|
||||||
|
|
||||||
|
; RQ requires the TERM signal to perform a warm shutdown. If RQ does not die
|
||||||
|
; within 10 seconds, supervisor will forcefully kill it
|
||||||
|
stopsignal=TERM
|
||||||
|
|
||||||
|
; These are up to you
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#CookielawBanner #CookielawCross {
|
#CookielawBanner #CookielawCross {
|
||||||
background: url('/static/img/close.png') no-repeat 0 0;
|
background: url('../img/close.png') no-repeat 0 0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
display: block;
|
display: block;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
@@ -38,14 +38,13 @@
|
|||||||
font-family:sans-serif;
|
font-family:sans-serif;
|
||||||
text-align:left;
|
text-align:left;
|
||||||
text-shadow: none;
|
text-shadow: none;
|
||||||
white-space: normal;
|
|
||||||
-webkit-transition: none;
|
-webkit-transition: none;
|
||||||
-moz-transition: none;
|
-moz-transition: none;
|
||||||
-o-transition: none;
|
-o-transition: none;
|
||||||
transition: none;
|
transition: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#djDebug button, #djDebug a.button {
|
#djDebug button {
|
||||||
background-color: #eee;
|
background-color: #eee;
|
||||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eee), color-stop(100%, #cccccc));
|
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eee), color-stop(100%, #cccccc));
|
||||||
background-image: -webkit-linear-gradient(top, #eee, #cccccc);
|
background-image: -webkit-linear-gradient(top, #eee, #cccccc);
|
||||||
@@ -65,7 +64,7 @@
|
|||||||
text-shadow: 0 1px 0 #eee;
|
text-shadow: 0 1px 0 #eee;
|
||||||
}
|
}
|
||||||
|
|
||||||
#djDebug button:hover, #djDebug a.button:hover {
|
#djDebug button:hover {
|
||||||
background-color: #ddd;
|
background-color: #ddd;
|
||||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ddd), color-stop(100%, #bbb));
|
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ddd), color-stop(100%, #bbb));
|
||||||
background-image: -webkit-linear-gradient(top, #ddd, #bbb);
|
background-image: -webkit-linear-gradient(top, #ddd, #bbb);
|
||||||
@@ -79,7 +78,7 @@
|
|||||||
text-shadow: 0 1px 0 #ddd;
|
text-shadow: 0 1px 0 #ddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
#djDebug button:active, #djDebug a.button:active {
|
#djDebug button:active {
|
||||||
border: 1px solid #aaa;
|
border: 1px solid #aaa;
|
||||||
border-bottom: 1px solid #888;
|
border-bottom: 1px solid #888;
|
||||||
-webkit-box-shadow: inset 0 0 5px 2px #aaa, 0 1px 0 0 #eee;
|
-webkit-box-shadow: inset 0 0 5px 2px #aaa, 0 1px 0 0 #eee;
|
||||||
@@ -287,7 +286,7 @@
|
|||||||
border-collapse:collapse;
|
border-collapse:collapse;
|
||||||
width:100%;
|
width:100%;
|
||||||
background-color:#fff;
|
background-color:#fff;
|
||||||
display:table;
|
display:block;
|
||||||
margin-top:0.8em;
|
margin-top:0.8em;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
@@ -657,6 +656,3 @@
|
|||||||
#djDebug .djdt-highlighted {
|
#djDebug .djdt-highlighted {
|
||||||
background-color: lightgrey;
|
background-color: lightgrey;
|
||||||
}
|
}
|
||||||
.djdt-hidden {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|||||||
5
static/debug_toolbar/js/jquery_post.js
vendored
5
static/debug_toolbar/js/jquery_post.js
vendored
@@ -1,4 +1 @@
|
|||||||
var djdt = {jQuery: jQuery.noConflict(true)};
|
var djdt = {jQuery: jQuery.noConflict(true)}; window.define = _djdt_define_backup;
|
||||||
if (window.define) {
|
|
||||||
window.define.amd = _djdt_define_amd_backup;
|
|
||||||
}
|
|
||||||
|
|||||||
6
static/debug_toolbar/js/jquery_pre.js
vendored
6
static/debug_toolbar/js/jquery_pre.js
vendored
@@ -1,5 +1 @@
|
|||||||
var _djdt_define_amd_backup;
|
var _djdt_define_backup = window.define; window.define = undefined;
|
||||||
if (window.define) {
|
|
||||||
_djdt_define_amd_backup = window.define.amd;
|
|
||||||
window.define.amd = undefined;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -64,16 +64,16 @@
|
|||||||
|
|
||||||
if (name == 'button') {
|
if (name == 'button') {
|
||||||
var form = self.parents('form:eq(0)');
|
var form = self.parents('form:eq(0)');
|
||||||
ajax_data.url = self.attr('formaction');
|
ajax_data['url'] = self.attr('formaction');
|
||||||
|
|
||||||
if (form.length) {
|
if (form.length) {
|
||||||
ajax_data.data = form.serialize();
|
ajax_data['data'] = form.serialize();
|
||||||
ajax_data.type = form.attr('method') || 'POST';
|
ajax_data['type'] = form.attr('method') || 'POST';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (name == 'a') {
|
if (name == 'a') {
|
||||||
ajax_data.url = self.attr('href');
|
ajax_data['url'] = self.attr('href');
|
||||||
}
|
}
|
||||||
|
|
||||||
$.ajax(ajax_data).done(function(data){
|
$.ajax(ajax_data).done(function(data){
|
||||||
@@ -213,13 +213,11 @@
|
|||||||
$('#djDebugToolbar li').removeClass('djdt-active');
|
$('#djDebugToolbar li').removeClass('djdt-active');
|
||||||
// finally close toolbar
|
// finally close toolbar
|
||||||
$('#djDebugToolbar').hide('fast');
|
$('#djDebugToolbar').hide('fast');
|
||||||
handle = $('#djDebugToolbarHandle');
|
$('#djDebugToolbarHandle').show();
|
||||||
handle.show();
|
|
||||||
// set handle position
|
// set handle position
|
||||||
var handleTop = djdt.cookie.get('djdttop');
|
var handleTop = djdt.cookie.get('djdttop');
|
||||||
if (handleTop) {
|
if (handleTop) {
|
||||||
handleTop = Math.min(handleTop, window.innerHeight - handle.outerHeight() - 10);
|
$('#djDebugToolbarHandle').css({top: handleTop + 'px'});
|
||||||
handle.css({top: handleTop + 'px'});
|
|
||||||
}
|
}
|
||||||
// Unbind keydown
|
// Unbind keydown
|
||||||
$(document).unbind('keydown.djDebug');
|
$(document).unbind('keydown.djDebug');
|
||||||
|
|||||||
@@ -24,13 +24,13 @@
|
|||||||
if (endStat) {
|
if (endStat) {
|
||||||
// Render a start through end bar
|
// Render a start through end bar
|
||||||
$row.html('<td>' + stat.replace('Start', '') + '</td>' +
|
$row.html('<td>' + stat.replace('Start', '') + '</td>' +
|
||||||
'<td class="timeline"><div class="djDebugTimeline"><div class="djDebugLineChart"><strong> </strong></div></div></td>' +
|
'<td class="timeline"><div class="djDebugTimeline"><div class="djDebugLineChart"><strong> </strong></div></div></td>' +
|
||||||
'<td>' + (perf.timing[stat] - timingOffset) + ' (+' + (perf.timing[endStat] - perf.timing[stat]) + ')</td>');
|
'<td>' + (perf.timing[stat] - timingOffset) + ' (+' + (perf.timing[endStat] - perf.timing[stat]) + ')</td>');
|
||||||
$row.find('strong').css({width: getCSSWidth(stat, endStat)});
|
$row.find('strong').css({width: getCSSWidth(stat, endStat)});
|
||||||
} else {
|
} else {
|
||||||
// Render a point in time
|
// Render a point in time
|
||||||
$row.html('<td>' + stat + '</td>' +
|
$row.html('<td>' + stat + '</td>' +
|
||||||
'<td class="timeline"><div class="djDebugTimeline"><div class="djDebugLineChart"><strong> </strong></div></div></td>' +
|
'<td class="timeline"><div class="djDebugTimeline"><div class="djDebugLineChart"><strong> </strong></div></div></td>' +
|
||||||
'<td>' + (perf.timing[stat] - timingOffset) + '</td>');
|
'<td>' + (perf.timing[stat] - timingOffset) + '</td>');
|
||||||
$row.find('strong').css({width: 2});
|
$row.find('strong').css({width: 2});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user