New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add context to translation payload when dealing with TextPlugin #452
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
fa09b8f
WIP
filwaitman 04755f4
WIP
filwaitman 8e26b0d
WIP
filwaitman ce1ef7c
Add tests
filwaitman ae7abdd
Fix FIXMEs
filwaitman d44cb66
Fix FIXMEs
filwaitman 0a189f3
Update according to @czpython suggestions
filwaitman e513215
Avoid creating migrations for test app
filwaitman 01cd903
Change the way we skip tests based on missing modules
filwaitman b5cda86
Remove the X of question
filwaitman File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 |
---|---|---|
@@ -1,16 +1,108 @@ | ||
*.log | ||
*.pot | ||
*.pyc | ||
.project | ||
.pydevproject | ||
.settings | ||
build | ||
env* | ||
dist | ||
!djangocms_text_ckeditor/static/djangocms_text_ckeditor/js/dist | ||
djangocms_text_ckeditor.egg-info | ||
*.DS_Store | ||
.idea | ||
.tox | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
MANIFEST | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
/node_modules/ | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
.hypothesis/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
.static_storage/ | ||
.media/ | ||
local_settings.py | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# celery beat schedule file | ||
celerybeat-schedule | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# Environments | ||
.env | ||
.venv | ||
env/ | ||
venv/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
|
||
# Custom | ||
*.sqlite3 | ||
*.sqlite |
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,5 @@ | ||
test: | ||
flake8 djangocms_text_ckeditor --max-line-length=120 --ignore=E731 --exclude=.*,*/migrations/*,*/static/*,*__init__* | ||
coverage erase | ||
coverage run setup.py test | ||
coverage report |
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
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,8 +1,21 @@ | ||
# -*- coding: utf-8 -*- | ||
from cms.models import CMSPlugin | ||
from django.db import models | ||
from django.utils.encoding import python_2_unicode_compatible | ||
|
||
from djangocms_text_ckeditor.fields import HTMLField | ||
|
||
|
||
class SimpleText(models.Model): | ||
text = HTMLField(blank=True) | ||
|
||
|
||
@python_2_unicode_compatible | ||
class DummyLink(CMSPlugin): | ||
label = models.TextField() | ||
|
||
class Meta: | ||
abstract = False | ||
|
||
def __str__(self): | ||
return 'dummy link object' |
24 changes: 24 additions & 0 deletions
24
djangocms_text_ckeditor/test_app/templates/test_app/base.html
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,24 @@ | ||
{% load cms_tags static menu_tags sekizai_tags %} | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>{% block title %}This is my new project home page{% endblock title %}</title> | ||
{% render_block "css" %} | ||
<style type="text/css"> | ||
.nav { | ||
padding-left: 0; | ||
} | ||
.nav li { | ||
display: inline; | ||
list-style-type: none; | ||
padding-right: 20px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
{% cms_toolbar %} | ||
<div style="width: 940px; margin:0 auto"> | ||
<ul class="nav"> | ||
{% show_menu 0 100 100 100 %} | ||
</ul> | ||
{% block content %} |
8 changes: 8 additions & 0 deletions
8
djangocms_text_ckeditor/test_app/templates/test_app/page.html
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,8 @@ | ||
{% extends "base.html" %} | ||
{% load cms_tags %} | ||
|
||
{% block title %}{% page_attribute 'title' %}{% endblock title %} | ||
|
||
{% block content %} | ||
{% placeholder "content" %} | ||
{% endblock content %} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
haha 🙈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for sanity, I'm using the default .gitignore for python porvided by github. =]