Private
Public Access
1
0

passing tests

This commit is contained in:
Sander Roosendaal
2019-07-30 21:47:53 +02:00
parent 1269a7c7fe
commit ad68b849a9
5 changed files with 33 additions and 15 deletions

Binary file not shown.

View File

@@ -518,6 +518,7 @@ urlpatterns = [
re_path(r'^checkout/(?P<planid>\d+)/$',views.payment_confirm_view,name='payment_confirm_view'),
re_path(r'^upgradecheckout/(?P<planid>\d+)/$',views.upgrade_confirm_view,name='upgrade_confirm_view'),
re_path(r'^upgradecheckout/(?P<planid>\d+)/$',views.upgrade_confirm_view,name='upgrade_confirm_view'),
re_path(r'^downgradecheckout/(?P<planid>\d+)/$',views.downgrade_confirm_view,name='downgrade_confirm_view'),
re_path(r'^billing/$',views.billing_view,name='billing'),
re_path(r'^upgrade/$',views.upgrade_view,name='upgrade'),
re_path(r'^downgrade/$',views.downgrade_view,name='downgrade'),

View File

@@ -166,7 +166,9 @@ DATABASES = {
},
'TEST': {
'CHARSET': 'utf8',
'ENGINE': 'django.db.backends.mysql',
'COLLATION': 'utf8_general_ci',
'NAME': CFG['db_name']
},
}

View File

@@ -10,34 +10,40 @@ For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
from .settings import *
import sys
try:
use_sqlite = CFG['use_sqlite']
except KeyError:
use_sqlite = False
if use_sqlite:
if 'test' in sys.argv:
TESTING = True
if TESTING:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
'HOST': 'localhost',
},
# 'TEST': {
# 'CHARSET': 'utf8',
# 'COLLATION': 'utf8_general_ci',
# },
# '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',
# }
# '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
@@ -64,7 +70,7 @@ ALLOWED_HOSTS = ['localhost']
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
'LOCATION': 'C:/python/rowsandallapp/django_cache',
'LOCATION': os.path.join(BASE_DIR, 'django_cache'),
}
}

View File

@@ -0,0 +1,9 @@
from .settings_dev import *
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
'HOST': 'localhost',
},
}