Firstly, lets start with some full disclosure. I'm a big fan of class based views. Since they first came out, I've pretty much not written a functional view at all. I use the generic ones almost all the time, when they don't fit I build my own. I've written some websites with wonderfully complex heirarchy of composed features, using almost every individual mixin from Django and a few of my own. When I want to do some work on Django, my first port of call is normally the list of issues tagged as "generic views". I envisaged CCBV and then helped rewrite the official documentation. In
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
diff --git a/tests/runtests.py b/tests/runtests.py | |
index e852346..16f6e7b 100755 | |
--- a/tests/runtests.py | |
+++ b/tests/runtests.py | |
@@ -58,6 +58,7 @@ ALWAYS_INSTALLED_APPS = [ | |
def get_test_modules(): | |
from django.contrib.gis.tests.utils import HAS_SPATIAL_DB | |
+ from django.db import connection | |
modules = [] |
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
diff --git a/django/core/mail/__init__.py b/django/core/mail/__init__.py | |
index 5a01adc..db88c94 100644 | |
--- a/django/core/mail/__init__.py | |
+++ b/django/core/mail/__init__.py | |
@@ -3,6 +3,8 @@ Tools for sending email. | |
""" | |
from __future__ import unicode_literals | |
+from contextlib import contextmanager | |
+ |
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
diff --git a/django/forms/forms.py b/django/forms/forms.py | |
index bcc0d6d..46192ad 100644 | |
--- a/django/forms/forms.py | |
+++ b/django/forms/forms.py | |
@@ -15,7 +15,7 @@ from django.forms.widgets import Media, MediaDefiningClass, TextInput, Textarea | |
from django.utils.html import conditional_escape, format_html | |
from django.utils.encoding import smart_text, force_text, python_2_unicode_compatible | |
from django.utils.safestring import mark_safe | |
-from django.utils.translation import ugettext as _ | |
+from django.utils.translation import ugettext as _, ugettext_lazy |
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
PYTHONPATH=.. ./runtests.py dispatch | |
Testing against Django installed in '/Users/marc/code/django/django' | |
Creating test database for alias 'default'... | |
Creating test database for alias 'other'... | |
.FFFFFFF...E | |
====================================================================== | |
ERROR: dispatch.tests.test_saferef (unittest.loader.ModuleImportFailure) | |
---------------------------------------------------------------------- | |
ImportError: Failed to import test module: dispatch.tests.test_saferef | |
Traceback (most recent call last): |
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
from django import apps | |
from django.contrib import admin | |
class AdminConfig(apps.AppConfig): | |
name = 'django.contrib.admin' | |
def ready(self): | |
admin.autodiscover() |
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
(django-py3.4) ~/code/django/tests ± stable/1.6.X PYTHONPATH=.. ./runtests.py --settings=test_sqlite | |
/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/platform.py:647: DeprecationWarning: The readPlist function is deprecated, use load() instead | |
pl = plistlib.readPlist(fn) | |
Creating test database for alias 'default'... | |
/Users/marc/.virtualenvs/django-py3.4/bin/../lib/python3.4/codecs.py:897: DeprecationWarning: 'U' mode is deprecated | |
file = builtins.open(filename, mode, buffering) | |
Creating test database for alias 'other'... | |
...................................................................................................................................................s.....................................................................................................................................................................................x............................................................................................................................................. |
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
diff --git a/tests/model_forms/tests.py b/tests/model_forms/tests.py | |
index 2f94f64..8b864c3 100644 | |
--- a/tests/model_forms/tests.py | |
+++ b/tests/model_forms/tests.py | |
@@ -1820,11 +1820,14 @@ class ModelFormInheritanceTests(TestCase): | |
class ModelForm(forms.ModelForm): | |
class Meta: | |
model = Writer | |
- fields = '__all__' | |
+ fields = ['name'] |
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
diff --git a/feincms/module/extensions/translations.py b/feincms/module/extensions/translations.py | |
index cf4c7fd..0210b80 100644 | |
--- a/feincms/module/extensions/translations.py | |
+++ b/feincms/module/extensions/translations.py | |
@@ -117,6 +117,7 @@ def get_current_language_code(request): | |
# ------------------------------------------------------------------------ | |
class Extension(extensions.Extension): | |
def handle_model(self): | |
+ print 'translation extension being applied to:', self.model | |
cls = self.model |
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
(django)marc tests $ python -Wd runtests.py --settings=test_sqlite | |
Creating test database for alias 'default'... | |
Creating test database for alias 'other'... | |
..............................................................................................................................................................................................................................................................................................................................x.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... |