-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
114 additions
and
7 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
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,60 @@ | ||
# -*- coding: utf-8 -*- | ||
from tempfile import mkdtemp | ||
|
||
try: | ||
import djangocms_text_ckeditor # NOQA | ||
text_plugin = ['djangocms_text_ckeditor'] | ||
except ImportError: | ||
text_plugin = [] | ||
|
||
HELPER_SETTINGS = { | ||
'TIME_ZONE': 'Europe/Rome', | ||
'INSTALLED_APPS': [ | ||
'example2', | ||
'filer', | ||
] + text_plugin, | ||
'CMS_LANGUAGES': { | ||
1: [ | ||
{ | ||
'code': 'en', | ||
'name': 'English', | ||
'public': True, | ||
}, | ||
{ | ||
'code': 'it', | ||
'name': 'Italiano', | ||
'public': True, | ||
}, | ||
{ | ||
'code': 'fr', | ||
'name': 'French', | ||
'public': True, | ||
}, | ||
], | ||
'default': { | ||
'hide_untranslated': False, | ||
}, | ||
}, | ||
'FILE_UPLOAD_TEMP_DIR': mkdtemp(), | ||
} | ||
|
||
|
||
def run(): | ||
from djangocms_helper import runner | ||
runner.cms('example1') | ||
|
||
|
||
def setup(): | ||
import sys | ||
from djangocms_helper import runner | ||
runner.setup('example1', sys.modules[__name__], use_cms=True) | ||
|
||
|
||
def setup_nocms(): | ||
import sys | ||
from djangocms_helper import runner | ||
runner.setup('example1', sys.modules[__name__], use_cms=False) | ||
|
||
|
||
if __name__ == "__main__": | ||
run() |
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 @@ | ||
# -*- coding: utf-8 -*- |
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,11 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import absolute_import, print_function, unicode_literals | ||
|
||
from django.contrib.auth.models import AbstractUser | ||
|
||
|
||
class CustomUser(AbstractUser): | ||
|
||
@property | ||
def email(self): | ||
return 'some@example.com' |
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