Private
Public Access
1
0

Merge branch 'develop' into feature/embeddedvideo

This commit is contained in:
Sander Roosendaal
2019-11-26 14:46:15 +01:00
5 changed files with 35 additions and 20 deletions

View File

@@ -2173,6 +2173,8 @@ def read_df_sql(id):
if rowdata and len(rowdata.df):
data = dataprep(rowdata.df,id=id,bands=True,otwpower=True,barchart=True)
df = pd.read_parquet(f)
else:
df = pd.DataFrame()
df = df.fillna(value=0)

View File

@@ -13,6 +13,9 @@ from rowingdata import empower_bug_correction,get_empower_rigging
from time import strftime
from pandas import DataFrame,Series
import shutil
from shutil import copyfile
import pandas as pd
import numpy as np
import itertools
@@ -729,7 +732,7 @@ def getsmallrowdata_db(columns,ids=[],debug=False):
try:
df = pd.read_parquet(csvfilenames[0],columns=columns,engine='pyarrow')
except (OSError,IndexError):
pass
df = pd.DataFrame()
return df

View File

@@ -133,7 +133,7 @@ TEMPLATES = [
# 'django.template.loaders.app_directories.Loader',
# ],
},
},
]
@@ -205,8 +205,8 @@ TIME_ZONE = 'UTC'
TZ_DETECT_COUNTRIES = ('US','DE','GB','CZ','FR','IT')
LOCALE_PATHS = (
os.path.join(BASE_DIR, 'locale'),
# os.path.join(BASE_DIR, 'cvkbrno/locale'),
os.path.join(BASE_DIR, 'locale'),
# os.path.join(BASE_DIR, 'cvkbrno/locale'),
)
LANGUAGES = (
@@ -221,11 +221,11 @@ LANGUAGE_COOKIE_NAME = 'wm_lang'
# https://docs.djangoproject.com/en/1.9/howto/static-files/
STATIC_URL = '/static/'
STATIC_ROOT = BASE_DIR
#STATIC_ROOT = os.path.join(BASE_DIR, 'static')
#STATIC_ROOT = BASE_DIR
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static'),
os.path.join(BASE_DIR, 'static/plots'),]
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static/plots'),]
# os.path.join(BASE_DIR, 'static'),
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
@@ -452,7 +452,7 @@ try:
BRAINTREE_MERCHANT_ACCOUNT_ID = CFG['braintree_merchant_account_id']
except KeyError:
BRAINTREE_MERCHANT_ACCOUNT_ID = 'rowsandallEUR'
try:
BRAINTREE_PUBLIC_KEY = CFG['braintree_public_key']
except KeyError:

View File

@@ -20,7 +20,7 @@ except KeyError:
if 'test' in sys.argv:
TESTING = True
if TESTING or use_sqlite:
DATABASES = {
'default': {
@@ -33,7 +33,7 @@ if TESTING or use_sqlite:
# 'CHARSET': 'utf8',
# 'COLLATION': 'utf8_general_ci',
# },
# 'slave': {
# 'ENGINE': 'django.db.backends.mysql',
# 'NAME': 'rowsanda_107501',
@@ -41,8 +41,8 @@ if TESTING or use_sqlite:
# }
}
BROKER_URL = 'redis://localhost:6379/0'
CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'
CELERY_IGNORE_RESULT = False
@@ -77,7 +77,12 @@ CACHES = {
STATIC_URL = '/static/'
#STATIC_ROOT = 'C:/python/rowsandallapp'
STATIC_ROOT = BASE_DIR
#STATIC_ROOT = os.path.join(BASE_DIR, 'static')
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static'),
os.path.join(BASE_DIR, 'static/plots'),]
INTERNAL_IPS = ['127.0.0.1']
@@ -108,4 +113,3 @@ EMAIL_USE_TLS = CFG['email_use_tls']
DEFAULT_FROM_EMAIL = 'info@rowsandall.com'
SETTINGS_NAME = 'rowsandall_app.settings_dev'

View File

@@ -30,9 +30,9 @@ import django.views.i18n
urlpatterns = [
re_path('^', include('django.contrib.auth.urls')),
re_path('^', include('django.contrib.auth.urls')),
re_path(r'^password_change_done/$',auth_views.PasswordChangeDoneView.as_view(),name='password_change_done'),
re_path(r'^password_change/$',auth_views.PasswordChangeView.as_view(),name='password_change'),
re_path(r'^password_change/$',auth_views.PasswordChangeView.as_view(),name='password_change'),
re_path(r'^password_reset/$',
auth_views.PasswordResetView.as_view(),
{'template_name': 'rowers/templates/registration/password_reset.html'},
@@ -96,10 +96,16 @@ django.views.i18n.javascript_catalog = None
if settings.DEBUG:
import debug_toolbar
import django
urlpatterns += [
re_path(r'^static/plots/(?P<path>.*)$',
django.views.static.serve,
kwargs={'document_root': settings.STATIC_ROOT+'plots/'})
]
urlpatterns += [
# re_path(r'^__debug__/','debug_toolbar.urls'),
re_path(r'^static/(?P<path>.*)$',
django.views.static.serve,
kwargs={'document_root': settings.STATIC_ROOT,}
re_path(r'^static/(?P<path>.*)$',
django.views.static.serve,
kwargs={'document_root': settings.STATIC_ROOT,
'show_indexes': True}
)
]