[Python-modules-commits] [python-django-extensions] 02/06: Import python-django-extensions_1.5.9.orig.tar.gz
Brian May
bam at moszumanska.debian.org
Wed Nov 18 06:31:16 UTC 2015
This is an automated email from the git hooks/post-receive script.
bam pushed a commit to branch master
in repository python-django-extensions.
commit 9e6fc9d532df2ce38eaab6e0409af25c193331d8
Author: Brian May <bam at debian.org>
Date: Wed Nov 18 17:28:27 2015 +1100
Import python-django-extensions_1.5.9.orig.tar.gz
---
.gitignore | 1 +
CHANGELOG.md | 21 +++++++++++++++++++++
django_extensions/__init__.py | 2 +-
.../management/commands/print_settings.py | 6 ++++++
django_extensions/management/commands/reset_db.py | 12 ++++++++----
django_extensions/management/modelviz.py | 12 +++++++++---
django_extensions/management/shells.py | 2 ++
django_extensions/management/technical_response.py | 2 +-
.../{migrations => south_migrations}/0001_empty.py | 0
.../{migrations => south_migrations}/__init__.py | 0
docs/conf.py | 2 +-
docs/creating_release.txt | 6 +++++-
docs/export_emails.rst | 10 +++++-----
docs/print_settings.rst | 5 ++++-
setup.cfg | 1 -
tox.ini | 19 +++++++++++++++++--
16 files changed, 81 insertions(+), 20 deletions(-)
diff --git a/.gitignore b/.gitignore
index 8d268cd..3a6519e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,5 +12,6 @@ venv*
*.bak
.DS_Store
.eggs/
+.idea/
.coverage
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5303e1c..49d08b2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,27 @@
Changelog
=========
+1.5.9
+-----
+
+Changes:
+ - Fix: wheel still had the old migrations directory in the package
+
+
+1.5.8
+-----
+
+Changes:
+ - Fix: migrations, fix BadMigrationError with Django 1.8+
+ - Fix: reset_db, Django 1.8+ compatibility fix
+ - Fix: runserver_plus, fix signature of null_technical_500_response for Django 1.8+
+ - Fix: graph_models, use force_bytes instead of .decode('utf8')
+ - Improvement: print_settings, add format option to only print values
+ - Improvement: print_esttings, add format option for simple key = value text output
+ - Improvement: email_export, documentation updates
+ - Improvement: shell_plus, auto load conditional db expressions Case and When
+
+
1.5.7
-----
diff --git a/django_extensions/__init__.py b/django_extensions/__init__.py
index 03c8095..9057a1d 100644
--- a/django_extensions/__init__.py
+++ b/django_extensions/__init__.py
@@ -1,5 +1,5 @@
-VERSION = (1, 5, 7)
+VERSION = (1, 5, 9)
# Dynamically calculate the version based on VERSION tuple
if len(VERSION) > 2 and VERSION[2] is not None:
diff --git a/django_extensions/management/commands/print_settings.py b/django_extensions/management/commands/print_settings.py
index 41dd722..c1af365 100644
--- a/django_extensions/management/commands/print_settings.py
+++ b/django_extensions/management/commands/print_settings.py
@@ -50,6 +50,12 @@ class Command(BaseCommand):
elif output_format == 'pprint':
from pprint import pprint
pprint(a_dict)
+ elif output_format == 'text':
+ for key, value in a_dict.items():
+ print("%s = %s" % (key, value))
+ elif output_format == 'value':
+ for value in a_dict.values():
+ print(value)
else:
self.print_simple(a_dict)
diff --git a/django_extensions/management/commands/reset_db.py b/django_extensions/management/commands/reset_db.py
index f07ec8f..f6ee2ba 100644
--- a/django_extensions/management/commands/reset_db.py
+++ b/django_extensions/management/commands/reset_db.py
@@ -157,10 +157,14 @@ Type 'yes' to continue, or 'no' to cancel: """ % (database_name,))
create_query += " WITH OWNER = \"%s\" " % owner
create_query += " ENCODING = 'UTF8'"
- if engine == 'postgis':
- # fetch postgis template name if it exists
- from django.contrib.gis.db.backends.postgis.creation import PostGISCreation
- postgis_template = PostGISCreation(connection).template_postgis
+ if engine == 'postgis' and django.VERSION < (1, 9):
+ # For PostGIS 1.5, fetch template name if it exists
+ if django.VERSION < (1, 8):
+ from django.contrib.gis.db.backends.postgis.creation import PostGISCreation
+ postgis_template = PostGISCreation(connection).template_postgis
+ else:
+ from django.contrib.gis.db.backends.postgis.base import DatabaseWrapper
+ postgis_template = DatabaseWrapper(dbinfo).template_postgis
if postgis_template is not None:
create_query += ' TEMPLATE = %s' % postgis_template
diff --git a/django_extensions/management/modelviz.py b/django_extensions/management/modelviz.py
index 705c53d..94de312 100644
--- a/django_extensions/management/modelviz.py
+++ b/django_extensions/management/modelviz.py
@@ -21,6 +21,11 @@ from django.utils.safestring import mark_safe
from django.utils.translation import activate as activate_language
try:
+ from django.utils.encoding import force_bytes
+except ImportError:
+ from django.utils.encoding import smart_str as force_bytes
+
+try:
from django.db.models.fields.generic import GenericRelation
assert GenericRelation
except ImportError:
@@ -42,6 +47,7 @@ __contributors__ = [
"Alexander Houben <alexander at houben.ch>",
"Joern Hees <gitdev at joernhees.de>",
"Kevin Cherepski <cherepski at gmail.com>",
+ "Jose Tomas Tocino <theom3ga at gmail.com>"
]
@@ -138,14 +144,14 @@ def generate_dot(app_labels, **kwargs):
continue
if verbose_names and appmodel._meta.verbose_name:
- model['label'] = appmodel._meta.verbose_name.decode("utf8")
+ model['label'] = force_bytes(appmodel._meta.verbose_name)
else:
model['label'] = model['name']
# model attributes
def add_attributes(field):
if verbose_names and field.verbose_name:
- label = field.verbose_name.decode("utf8")
+ label = force_bytes(field.verbose_name)
if label.islower():
label = label.capitalize()
else:
@@ -196,7 +202,7 @@ def generate_dot(app_labels, **kwargs):
# relations
def add_relation(field, extras=""):
if verbose_names and field.verbose_name:
- label = field.verbose_name.decode("utf8")
+ label = force_bytes(field.verbose_name)
if label.islower():
label = label.capitalize()
else:
diff --git a/django_extensions/management/shells.py b/django_extensions/management/shells.py
index f931cda..7d45263 100644
--- a/django_extensions/management/shells.py
+++ b/django_extensions/management/shells.py
@@ -212,6 +212,8 @@ def import_objects(options, style):
}
if django.VERSION[:2] >= (1, 7):
SHELL_PLUS_DJANGO_IMPORTS['django.db.models'].append("Prefetch")
+ if django.VERSION[:2] >= (1, 8):
+ SHELL_PLUS_DJANGO_IMPORTS['django.db.models'].extend(["Case", "When"])
imports = import_items(SHELL_PLUS_DJANGO_IMPORTS.items(), style, quiet_load=quiet_load)
for k, v in six.iteritems(imports):
imported_objects[k] = v
diff --git a/django_extensions/management/technical_response.py b/django_extensions/management/technical_response.py
index 0ab8cd5..f414184 100644
--- a/django_extensions/management/technical_response.py
+++ b/django_extensions/management/technical_response.py
@@ -1,5 +1,5 @@
import six
-def null_technical_500_response(request, exc_type, exc_value, tb):
+def null_technical_500_response(request, exc_type, exc_value, tb, status_code=500):
six.reraise(exc_type, exc_value, tb)
diff --git a/django_extensions/migrations/0001_empty.py b/django_extensions/south_migrations/0001_empty.py
similarity index 100%
rename from django_extensions/migrations/0001_empty.py
rename to django_extensions/south_migrations/0001_empty.py
diff --git a/django_extensions/migrations/__init__.py b/django_extensions/south_migrations/__init__.py
similarity index 100%
rename from django_extensions/migrations/__init__.py
rename to django_extensions/south_migrations/__init__.py
diff --git a/docs/conf.py b/docs/conf.py
index 7c50b48..2357366 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -47,7 +47,7 @@ copyright = u'Copyright (C) 2008-2015 Michael Trier, Bas van Oostveen and contri
# The short X.Y version.
version = '1.5'
# The full version, including alpha/beta/rc tags.
-release = '1.5.7'
+release = '1.5.9'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
diff --git a/docs/creating_release.txt b/docs/creating_release.txt
index 0d0277d..ef2dc90 100644
--- a/docs/creating_release.txt
+++ b/docs/creating_release.txt
@@ -14,7 +14,7 @@ Get a fresh copy::
Run tests::
- $ flake8 --ignore=E265,E501,W391 .
+ $ flake8 django-extensions
$ tox --recreate
Change version numbers in django_extensions/__init__.py and docs/conf.py::
@@ -27,6 +27,10 @@ Tag it::
$ git tag 0.4.1
+Remove old build directory (if exists)::
+
+ $ rm -r build
+
Prepare the release tarball::
$ python ./setup.py sdist
diff --git a/docs/export_emails.rst b/docs/export_emails.rst
index 80493aa..b7bcc01 100644
--- a/docs/export_emails.rst
+++ b/docs/export_emails.rst
@@ -5,9 +5,9 @@ export_emails
Most Django sites include a registered user base. There are times when you
would like to import these e-mail addresses into other systems (generic mail
-program, GMail, google docs invites, give edit permissions, LinkedLn Group
-pre-approved listing). The export_emails command extension gives you this
-ability. The users exported can be filtered by Group name association.
+program, Gmail, Google Docs invites, give edit permissions, LinkedIn Group
+pre-approved listing, etc.). The export_emails command extension gives you this
+ability. Exported users can be filtered by Group name association.
Example Usage
@@ -25,7 +25,7 @@ Example Usage
::
- # Create a csv file importable by GMail or Google Docs
+ # Create a csv file importable by Gmail or Google Docs
$ ./manage.py export_emails --format=google google.csv
@@ -47,7 +47,7 @@ google
^^^^^^
A CSV (comma separated value) format which Google applications can import.
-This can be used to import directly into GMail, a GMail mailing group, Google
+This can be used to import directly into Gmail, a Gmail mailing group, Google
Docs invite (to read), Google Docs grant edit permissions, Google Calendar
invites, etc.
diff --git a/docs/print_settings.rst b/docs/print_settings.rst
index 7ad8f38..00648ac 100644
--- a/docs/print_settings.rst
+++ b/docs/print_settings.rst
@@ -28,11 +28,15 @@ Some variations::
$ python manage.py print_settings --format=json
$ python manage.py print_settings --format=yaml # Requires PyYAML
+ $ python manage.py print_settings --format=pprint
+ $ python manage.py print_settings --format=text
+ $ python manage.py print_settings --format=value
Show just selected settings::
$ python manage.py print_settings DEBUG INSTALLED_APPS
$ python manage.py print_settings DEBUG INSTALLED_APPS --format=pprint
+ $ python manage.py print_settings INSTALLED_APPS --format=value
For more info, take a look at the built-in help::
@@ -57,4 +61,3 @@ For more info, take a look at the built-in help::
--indent=INDENT Specifies indent level for JSON and YAML
--version show program's version number and exit
-h, --help show this help message and exit
-
diff --git a/setup.cfg b/setup.cfg
index 01139ec..851277e 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -5,7 +5,6 @@ universal = 1
ignore=E123,E128,E265,E501,E731,W601
[pytest]
-addopts=--cov django_extensions
norecursedirs=venv* .tox .eggs build dist django_extensions.egg-info
[isort]
diff --git a/tox.ini b/tox.ini
index a3b9894..378ae79 100644
--- a/tox.ini
+++ b/tox.ini
@@ -11,7 +11,7 @@ envlist =
{py27,py32,py33,py34,pypy,pypy3}-dj{17,18,master}
[testenv]
-commands = py.test {posargs}
+commands = py.test --cov django_extensions {posargs}
deps =
dj14: Django>=1.4,<1.5
@@ -24,10 +24,25 @@ deps =
python-dateutil
pytest-django==2.8.0
pytest-xdist
- pytest-cov
+ {py27,py33,py34,pypy,pypy3}: pytest-cov
py27: python-keyczar
mock
+[testenv:py32-dj15]
+commands = py.test {posargs}
+
+[testenv:py32-dj16]
+commands = py.test {posargs}
+
+[testenv:py32-dj17]
+commands = py.test {posargs}
+
+[testenv:py32-dj18]
+commands = py.test {posargs}
+
+[testenv:py32-djmaster]
+commands = py.test {posargs}
+
[testenv:py27-flake8]
deps =
flake8
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-django-extensions.git
More information about the Python-modules-commits
mailing list