Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge standalone and oscar sandboxes
Sharing code between the standalone and Oscar sandbox is tricky with the current setup. To reduce the amount of code duplication, the sandboxes have been merged into the same project using django-configurations to switch the settings. This also simplifies the settings for the tests and uses the appropriate sandbox settings instead of re-defining them. Resolves #51.
- Loading branch information
1 parent
2f614c5
commit e15539c
Showing
42 changed files
with
166 additions
and
520 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals, absolute_import | ||
|
||
from .fancypages import (StandaloneFancypages, # noqa | ||
StandaloneFancypagesPostgres, | ||
StandaloneFancypagesMysql) | ||
|
||
from .oscar import (OscarFancypages, # noqa | ||
OscarFancypagesPostgres, | ||
OscarFancypagesMysql) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals, absolute_import | ||
from configurations import values | ||
|
||
import fancypages as fp | ||
|
||
from . import common | ||
|
||
|
||
class StandaloneFancypages(common.Common): | ||
SANDBOX_MODULE = 'standalone_fancypages' | ||
|
||
@property | ||
def INSTALLED_APPS(self): | ||
return self.REQUIRED_APPS + fp.get_fancypages_apps() | ||
|
||
|
||
class StandaloneFancypagesPostgres(StandaloneFancypages): | ||
POSTGRES_PORT = values.Value(5432) | ||
|
||
@property | ||
def DATABASES(self): | ||
return {'default': { | ||
'ENGINE': 'django.db.backends.postgresql_psycopg2', | ||
'NAME': 'fp_sandbox', | ||
'USER': 'postgres', | ||
'PASSWORD': '', | ||
'HOST': 'localhost', | ||
'PORT': self.POSTGRES_PORT}} | ||
|
||
|
||
class StandaloneFancypagesMysql(StandaloneFancypages): | ||
MYSQL_PORT = values.Value(3306) | ||
|
||
@property | ||
def DATABASES(self): | ||
return {'default': { | ||
'ENGINE': 'django.db.backends.mysql', | ||
'NAME': 'fp_sandbox', | ||
'USER': 'root', | ||
'PASSWORD': '', | ||
'HOST': '127.0.0.1', | ||
'PORT': 3306}} |
Oops, something went wrong.