-
-
Notifications
You must be signed in to change notification settings - Fork 317
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
22 changed files
with
439 additions
and
379 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
exclude: '^tinymce/(static/tinymce|media/tiny_mce|static/.*min.js$)' | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.5.0 | ||
hooks: | ||
- id: check-added-large-files | ||
- id: check-ast | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: detect-private-key | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 19.10b0 | ||
hooks: | ||
- id: black | ||
args: [--exclude=static] | ||
|
||
- repo: https://github.com/asottile/seed-isort-config | ||
rev: v2.1.0 | ||
hooks: | ||
- id: seed-isort-config | ||
- repo: https://github.com/pre-commit/mirrors-isort | ||
rev: v4.3.21 | ||
hooks: | ||
- id: isort | ||
additional_dependencies: | ||
- toml | ||
|
||
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: 3.7.9 | ||
hooks: | ||
- id: flake8 | ||
args: [--max-line-length=110] |
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 |
---|---|---|
|
@@ -35,4 +35,3 @@ Documentation | |
installation | ||
usage | ||
history | ||
|
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 |
---|---|---|
@@ -1,20 +1,22 @@ | ||
import os | ||
import sys | ||
os.environ['DJANGO_SETTINGS_MODULE'] = 'testtinymce.settings' | ||
test_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | ||
sys.path.insert(0, test_dir) | ||
|
||
import django | ||
from django.conf import settings | ||
from django.test.utils import get_runner | ||
|
||
os.environ["DJANGO_SETTINGS_MODULE"] = "testtinymce.settings" | ||
test_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | ||
sys.path.insert(0, test_dir) | ||
|
||
|
||
def runtests(): | ||
django.setup() | ||
TestRunner = get_runner(settings) | ||
test_runner = TestRunner(verbosity=1, interactive=True) | ||
failures = test_runner.run_tests(['tinymce']) | ||
failures = test_runner.run_tests(["tinymce"]) | ||
sys.exit(bool(failures)) | ||
|
||
if __name__ == '__main__': | ||
|
||
if __name__ == "__main__": | ||
runtests() |
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 |
---|---|---|
@@ -1,52 +1,56 @@ | ||
#!/usr/bin/env python | ||
import codecs | ||
import os | ||
from setuptools import setup, find_packages | ||
|
||
from setuptools import find_packages, setup | ||
|
||
here = os.path.abspath(os.path.dirname(__file__)) | ||
|
||
|
||
def read_file(filename): | ||
"""Open a related file and return its content.""" | ||
with codecs.open(os.path.join(here, filename), encoding='utf-8') as f: | ||
with codecs.open(os.path.join(here, filename), encoding="utf-8") as f: | ||
content = f.read() | ||
return content | ||
|
||
README = read_file('README.rst') | ||
CHANGELOG = read_file('CHANGELOG.rst') | ||
|
||
README = read_file("README.rst") | ||
CHANGELOG = read_file("CHANGELOG.rst") | ||
|
||
|
||
setup( | ||
name="django-tinymce", | ||
version='3.0.0.dev0', | ||
version="3.0.0.dev0", | ||
packages=find_packages(), | ||
include_package_data=True, | ||
author="Aljosa Mohorovic", | ||
author_email="aljosa.mohorovic@gmail.com", | ||
description=("A Django application that contains a widget to render a " | ||
"form field as a TinyMCE editor."), | ||
description=( | ||
"A Django application that contains a widget to render a " | ||
"form field as a TinyMCE editor." | ||
), | ||
long_description=README + "\n\n" + CHANGELOG, | ||
license="MIT License", | ||
keywords="django widget tinymce", | ||
zip_safe=False, | ||
classifiers=[ | ||
'Development Status :: 5 - Production/Stable', | ||
'Environment :: Web Environment', | ||
'Framework :: Django', | ||
'Intended Audience :: Developers', | ||
'License :: OSI Approved :: MIT License', | ||
'Operating System :: OS Independent', | ||
'Programming Language :: Python', | ||
'Programming Language :: Python :: 2', | ||
'Programming Language :: Python :: 2.7', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.5', | ||
'Programming Language :: Python :: 3.6', | ||
'Programming Language :: Python :: 3.7', | ||
'Topic :: Software Development :: Libraries :: Application Frameworks', | ||
'Topic :: Software Development :: Libraries :: Python Modules', | ||
"Development Status :: 5 - Production/Stable", | ||
"Environment :: Web Environment", | ||
"Framework :: Django", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 2", | ||
"Programming Language :: Python :: 2.7", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.5", | ||
"Programming Language :: Python :: 3.6", | ||
"Programming Language :: Python :: 3.7", | ||
"Topic :: Software Development :: Libraries :: Application Frameworks", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
], | ||
platforms=['any'], | ||
platforms=["any"], | ||
url="https://github.com/aljosa/django-tinymce", | ||
test_suite='runtests.runtests', | ||
test_suite="runtests.runtests", | ||
) |
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 |
---|---|---|
@@ -1,77 +1,77 @@ | ||
# Django settings for testtinymce project. | ||
|
||
from os.path import join, dirname, realpath | ||
from os.path import dirname, join, realpath | ||
|
||
ROOT_PATH = dirname(realpath(__file__)) | ||
DEBUG = True | ||
|
||
DATABASES = { | ||
'default': { | ||
'ENGINE': 'django.db.backends.sqlite3', | ||
'NAME': join(ROOT_PATH, "testtinymce.sqlite"), | ||
'USER': '', | ||
'PASSWORD': '', | ||
'HOST': '', | ||
'PORT': '', | ||
"default": { | ||
"ENGINE": "django.db.backends.sqlite3", | ||
"NAME": join(ROOT_PATH, "testtinymce.sqlite"), | ||
"USER": "", | ||
"PASSWORD": "", | ||
"HOST": "", | ||
"PORT": "", | ||
} | ||
} | ||
|
||
TIME_ZONE = 'America/Chicago' | ||
LANGUAGE_CODE = 'en-us' | ||
TIME_ZONE = "America/Chicago" | ||
LANGUAGE_CODE = "en-us" | ||
SITE_ID = 1 | ||
USE_I18N = True | ||
USE_L10N = True | ||
|
||
MEDIA_ROOT = join(ROOT_PATH, "media") | ||
MEDIA_URL = '/media/' | ||
ADMIN_MEDIA_PREFIX = '/static/admin/' | ||
MEDIA_URL = "/media/" | ||
ADMIN_MEDIA_PREFIX = "/static/admin/" | ||
STATIC_ROOT = join(ROOT_PATH, "static") | ||
STATIC_URL = "/static/" | ||
|
||
MIDDLEWARE = [ | ||
'django.contrib.sessions.middleware.SessionMiddleware', | ||
'django.middleware.common.CommonMiddleware', | ||
'django.middleware.csrf.CsrfViewMiddleware', | ||
'django.contrib.auth.middleware.AuthenticationMiddleware', | ||
'django.contrib.messages.middleware.MessageMiddleware', | ||
'django.middleware.clickjacking.XFrameOptionsMiddleware', | ||
"django.contrib.sessions.middleware.SessionMiddleware", | ||
"django.middleware.common.CommonMiddleware", | ||
"django.middleware.csrf.CsrfViewMiddleware", | ||
"django.contrib.auth.middleware.AuthenticationMiddleware", | ||
"django.contrib.messages.middleware.MessageMiddleware", | ||
"django.middleware.clickjacking.XFrameOptionsMiddleware", | ||
] | ||
MIDDLEWARE_CLASSES = MIDDLEWARE | ||
|
||
TEMPLATES = [ | ||
{ | ||
'BACKEND': 'django.template.backends.django.DjangoTemplates', | ||
'APP_DIRS': True, | ||
'OPTIONS': { | ||
'context_processors': [ | ||
"BACKEND": "django.template.backends.django.DjangoTemplates", | ||
"APP_DIRS": True, | ||
"OPTIONS": { | ||
"context_processors": [ | ||
"django.contrib.auth.context_processors.auth", | ||
"django.contrib.messages.context_processors.messages", | ||
] | ||
}, | ||
}, | ||
] | ||
|
||
SECRET_KEY = 'w4o4x^&b4h4zne9&3b1m-_p-=+&n_i_sdf@oz=gd+6h6v1$sd9' | ||
SECRET_KEY = "w4o4x^&b4h4zne9&3b1m-_p-=+&n_i_sdf@oz=gd+6h6v1$sd9" | ||
|
||
ROOT_URLCONF = 'testtinymce.urls' | ||
ROOT_URLCONF = "testtinymce.urls" | ||
|
||
INSTALLED_APPS = ( | ||
'django.contrib.auth', | ||
'django.contrib.contenttypes', | ||
'django.contrib.sessions', | ||
'django.contrib.sites', | ||
'django.contrib.messages', | ||
'django.contrib.staticfiles', | ||
'django.contrib.admin', | ||
'django.contrib.flatpages', | ||
'tinymce', | ||
'testtinymce.testapp', | ||
"django.contrib.auth", | ||
"django.contrib.contenttypes", | ||
"django.contrib.sessions", | ||
"django.contrib.sites", | ||
"django.contrib.messages", | ||
"django.contrib.staticfiles", | ||
"django.contrib.admin", | ||
"django.contrib.flatpages", | ||
"tinymce", | ||
"testtinymce.testapp", | ||
) | ||
|
||
TINYMCE_SPELLCHECKER = True | ||
TINYMCE_COMPRESSOR = True | ||
TINYMCE_DEFAULT_CONFIG = { | ||
'theme': "advanced", | ||
'plugins': "spellchecker", | ||
'theme_advanced_buttons3_add': "|,spellchecker", | ||
"theme": "advanced", | ||
"plugins": "spellchecker", | ||
"theme_advanced_buttons3_add": "|,spellchecker", | ||
} |
Oops, something went wrong.