Preparations for strokedata API
This commit is contained in:
@@ -28,8 +28,9 @@ database_url = 'mysql://{user}:{password}@{host}:{port}/{database_name}'.format(
|
||||
port=port,
|
||||
)
|
||||
|
||||
if settings.DEBUG:
|
||||
database_url = 'sqlite:///db.sqlite3'
|
||||
if settings.DEBUG or user=='':
|
||||
# database_url = 'sqlite:///db.sqlite3'
|
||||
database_url = 'sqlite:///'+database_name
|
||||
|
||||
engine = create_engine(database_url, echo=False)
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ database_url = 'mysql://{user}:{password}@{host}:{port}/{database_name}'.format(
|
||||
port=port,
|
||||
)
|
||||
|
||||
if settings.DEBUG:
|
||||
if settings.DEBUG or user=='':
|
||||
database_url = 'sqlite:///db.sqlite3'
|
||||
|
||||
engine = create_engine(database_url, echo=False)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from django.test import TestCase, Client
|
||||
from django.test import TestCase, Client,override_settings
|
||||
from django.test.client import RequestFactory
|
||||
from .views import checkworkoutuser,c2_open
|
||||
from rowers.models import Workout, User, Rower, WorkoutForm,RowerForm,GraphImage
|
||||
|
||||
Reference in New Issue
Block a user