Commit Graph

12292 Commits

Author SHA1 Message Date
Matt Hooks 5e4a69e07d [1.8.x] Fixed typo in django.core.files.File docstring.
Backport of 2c39f282b8 from master
2015-04-02 20:39:00 -04:00
Baptiste Mispelon 09188b5024 [1.8.x] Fixed #24566 -- Added support for serializing timedelta
Thanks to knbk for the report.

Backport of 30a3c2f74c from master.
2015-04-02 17:41:08 +02:00
Tim Graham 349c15b45e [1.8.x] Post-release version bump. 2015-04-01 16:18:03 -04:00
Tim Graham feac4c30ce [1.8.x] Bumped version for 1.8 release. 2015-04-01 15:46:45 -04:00
Claude Paroz 72de42cd40 [1.8.x] Refs #24500 -- Avoided locale.getpreferredencoding in makemessages
Fixes a regression introduced in 53c2cf1e.
Backport of 3f4e77840 from master.
2015-04-01 20:03:51 +02:00
Tim Graham 5c63c45512 [1.8.x] Fixed #23441, #24555 -- Improved the behavior of InclusionNode.
This change:

* Makes the InclusionNode cache-safe by removing render-time side effects
  to its nodelist.
* Ensures the render_context stack is properly scoped and reset by updating
  the render call to use Template.render rather than Nodelist.render.

Backport of 0808ccce38 from master
2015-04-01 13:12:18 -04:00
Tim Heap ff8eabc5cc [1.8.x] Fixed #24538 -- Allowed self in Jinja context
Rendering a Jinja template with self in the context threw an error.
While self is a reserved variable in Jinja, including self in the
context is not an error, so Django should respect that.

Backport of 4ea1909d3c from master
2015-04-01 12:27:52 -04:00
Claude Paroz 5483c66f85 [1.8.x] Fetched updated contrib translations from Transifex 2015-04-01 15:05:29 +02:00
Claude Paroz d1b206daf8 [1.8.x] Fetched updated core translations from Transifex 2015-04-01 14:54:32 +02:00
Markus Holtermann 2218f7617e [1.8.x] Refs #24554 -- Prevented rendering of unused migrations
Thanks Claude Paroz and Tim Graham for the review

Backport of 3e7d9d05ac from master
2015-04-01 11:14:55 +02:00
Markus Holtermann 0c7e2833d9 [1.8.x] Fixed #24554 -- Sped up migrations by rendering initial apps when they are first needed
Calling Migration.mutate_state() now also allows to do in_place
mutations in case an intermediate state is thrown away later.

Thanks Anssi Kääriäinen for the idea, Ryan Hall for parts of the patch,
and Claude Paroz and Tim Graham for the review

Backport of 57dc8dd3fa from master
2015-04-01 11:14:55 +02:00
Andriy Sokolovskiy 121c5f7d5b [1.8.x] Removed duplicate attribute in MySQL DatabaseSchemaEditor.
Backport of 29b4a3f513 from master
2015-03-30 19:24:06 -04:00
Moritz Sichert 44a05a8a91 [1.8.x] Fixed #24469 -- Refined escaping of Django's form elements in non-Django templates.
Backport of 1f2abf784a from master
2015-03-27 20:01:41 -04:00
Tim Graham b81ce2ed67 [1.8.x] Fixed #24532 -- Restored fallback support for allow_syncdb. 2015-03-24 10:33:50 -04:00
Josh Smeaton e654123f7f Fixed #24485 -- Allowed combined expressions to set output_field 2015-03-22 17:41:12 +11:00
Josh Smeaton 3a1886d111 [1.8.x] Fixed #24508 -- Made annotations commutative
Backport of 127b3873d0 from master
2015-03-22 17:35:22 +11:00
Pakal dc2cff5fcb [1.8.x] Fixed #24500 -- Fixed makemessages encoding problems retrieving gettext version.
Backport of 53c2cf1e7b from master
2015-03-21 09:10:01 -04:00
Claude Paroz 8e4b0d6010 [1.8.x] Fixed #24515 -- Fixed DjangoTranslation plural handling
Backport of 9e83f30cd3 from master.
2015-03-21 10:29:22 +01:00
Jon Walsh 2b267a70a1 [1.8.x] Fixed typo in escape_filter() docstring.
Backport of 8d90489fe0 from master
2015-03-19 07:22:21 -04:00
Tim Graham e3c9412d86 [1.8.x] Bumped version to 1.8 rc 1. 2015-03-18 19:23:22 -04:00
Tim Graham 770427c289 [1.8.x] Made is_safe_url() reject URLs that start with control characters.
This is a security fix; disclosure to follow shortly.
2015-03-18 19:23:21 -04:00
Tim Graham 5447709a57 [1.8.x] Fixed an infinite loop possibility in strip_tags().
This is a security fix; disclosure to follow shortly.
2015-03-18 19:23:21 -04:00
Karl Hobley a8c53041f9 [1.8.x] Fixed #24495 -- Allowed unsaved model instance assignment check to be bypassed.
Backport of 81e1a35c36 from master
2015-03-18 19:12:46 -04:00
Moritz Sichert 571e093a25 [1.8.x] Refs #24469 -- Fixed escaping of forms, fields, and media in non-Django templates.
Backport of 6bff343989 from master
2015-03-18 09:11:44 -04:00
Claude Paroz 1cd2584c98 [1.8.x] Updated translation catalogs
Strings are frozen in anticipation of the Django 1.8 release.
2015-03-18 09:29:12 +01:00
Claude Paroz 1bb712d79c [1.8.x] Removed translations from contrib.messages
The only one translatable string will be handled in the core catalog.
2015-03-18 09:28:28 +01:00
Josh Smeaton a0cebe82b5 [1.8.x] Refs #24485 -- Renamed some expression types
Backport of 88d798d71a from master
2015-03-17 08:40:45 -04:00
Josh Smeaton 34e09e532d [1.8.x] Fixed #24486 -- Fixed error with datetime and DurationField arithmetic
Backport of ff2aa40192 from master
2015-03-17 08:36:15 -04:00
John Giannelos e150bbd4d6 [1.8.x] Fixed #24427 -- Stopped writing migration files in dry run mode when merging.
Also added display of migration to stdout when verbosity=3.

Backport of 8758a63ddb from master
2015-03-16 19:45:55 -04:00
Marten Kenbeek febcbbf89d [1.8.x] Fixed #24488 -- Made create_default_site() use default pk of 1.
Fixed create_default_site() to use a default value in case
settings.SITE_ID isn't set; refs #23945.

Backport of 818182b514 from master
2015-03-16 13:31:22 -04:00
Tim Graham da8b3aa7eb [1.8.x] Fixed #24480 -- Marked strings in contrib.gis templates for translation.
Backport of 21ffbb06ec from master
2015-03-14 15:20:53 -04:00
Sævar Öfjörð Magnússon 8fe451d183 [1.8.x] Fixed #24478 -- Added NUMBER_GROUPING value for Icelandic
Backport of d8de9a64d7 from master.
2015-03-13 16:57:37 +01:00
Tim Graham aba74d6f1e [1.8.x] Fixed escaping regression in urlize filter.
Now that the URL is always unescaped as of refs #22267,
we should re-escape it before inserting it into the anchor.

Backport of 7b1a67cce5 from master
2015-03-10 19:12:20 -04:00
Tim Graham 449d1effb8 [1.8.x] Bumped version to 1.8 beta 2. 2015-03-09 10:22:51 -04:00
Erik Romijn d16e4e1d6f [1.8.x] Fixed #24464 -- Made built-in HTML template filter functions escape their input by default.
This may cause some backwards compatibility issues, but may also
resolve security issues in third party projects that fail to heed warnings
in our documentation.

Thanks Markus Holtermann for help with tests and docs.

Backport of fa350e2f30 from master
2015-03-09 09:31:07 -04:00
Anssi Kääriäinen 3a0fe942dd [1.8.x] Fixed #24171 -- Fixed failure with complex aggregate query and expressions
The query used a construct of qs.annotate().values().aggregate() where
the first annotate used an F-object reference and the values() and
aggregate() calls referenced that F-object.

Also made sure the inner query's select clause is as simple as possible,
and made sure .values().distinct().aggreate() works correctly.

Backport of fb146193c4 from master
2015-03-09 07:51:05 -04:00
Jean-Louis Fuchs 1ae2df6bfc [1.8.x] Fixed #24447 -- Made migrations add FK constraints for existing columns
When altering from e.g. an IntegerField to a ForeignKey, Django didn't
add a constraint.

Backport of f4f0060fea from master
2015-03-07 14:15:27 +01:00
Claude Paroz ac07890f95 [1.8.x] Fixed urlize regression with entities in query strings
Refs #22267.
Thanks Shai Berger for spotting the issue and Tim Graham for the
initial patch.
Backport of ec808e807 from master.
2015-03-06 22:22:51 +01:00
Josh Smeaton 823f8cdbc9 [1.8.x] Fixed #24420 -- Allowed ordering by case expressions
Backport of ceaf31adff from master
2015-03-06 13:31:43 +11:00
Benjamin Wohlwend 3bc35f7e08 [1.8.x] Moved definition of chunks out of timesince function.
This speeds up the timesince function/filter substantially.

Backport of d6969ab from master.
2015-03-04 22:31:27 +01:00
Tim Graham 20bf320502 [1.8.x] Fixed #24426 -- Displayed admin actions panel when show_full_result_count=False.
Backport of 36a17be9f3 from master
2015-03-04 13:56:51 -05:00
Tim Graham 4fa61e0e4f [1.8.x] Used format_html() in contrib.admin.utils for consistency.
Backport of fe42bfaaff from master
2015-03-04 10:44:44 -05:00
Markus Holtermann bff446c205 [1.8.x] Fixed #24435 -- Prevented m2m field removal and addition in migrations when changing blank
Thanks Mark Tranchant for the report and Tim Graham for the test and
review.

Backport of a9e29fae10 from master
2015-03-04 15:44:38 +01:00
Mathias André 44dd65fb2c [1.8.x] Removed outdated docstring for get_admin_url().
Since a4b8a4b632 the admin
URL returned by get_admin_url() is no longer relative to
the Django admin index page.

Backport of 85757d0e79 from master
2015-03-03 07:47:32 -05:00
Claude Paroz c0df8d1be9 [1.8.x] Fixed #24413 -- Prevented translation fallback for English
Thanks Tomasz Kontusz for the report, Baptiste Mispelon for
analysis and Tim Graham for the review.
Backport of 3cf1c02695 from master.
2015-02-28 10:09:01 +01:00
Claude Paroz b825ec38c1 [1.8.x] Fixed #24418 -- Prevented crash in refresh_from_db with null fk
Thanks Johannes Lerch for the report, Tim Graham for the test case,
and Simon Charette for the review.
Backport of 5cf96b49e4 from master.
2015-02-27 20:25:12 +01:00
Tim Graham 3fff408a27 [1.8.x] Bumped version to 1.8 beta 1. 2015-02-25 08:26:23 -05:00
Tim Graham dfcdf64d47 [1.8.x] Fixed #24411 -- Avoided dict key/method clash in admin delete views.
Backport of 47b35b1844 from master
2015-02-25 08:07:25 -05:00
Michael Angeletti 278b698794 [1.8.x] Fixed #24391 -- Made BoundField.value() cache callable values.
Backport of 65441bbdb0 from master
2015-02-24 20:05:16 -05:00
Stanislas Guerra a3fca05b05 [1.8.x] Fixed #24395 -- Ensured inline ModelsForms have an updated related instance.
Backport of 4c2f546b55 from master
2015-02-24 11:49:27 -05:00
Tim Graham 41d5ed480c [1.8.x] Fixed #24377 -- Fixed model inline formsets with primary key's that have defaults.
Backport of 1306cd1e8a from master
2015-02-23 09:01:00 -05:00
Emin Mastizada ff2e0896a3 [1.8.x] Added formats for the Azerbaijani locale.
Backport of dda2a3cf4c from master
2015-02-23 07:37:42 -05:00
Anssi Kääriäinen 155a127afb [1.8.x] Fixed #24381 -- removed ForeignObjectRel opts and to_opts
These cached properies were causing problems with pickling, and in
addition they were confusingly defined: field.rel.model._meta was
not the same as field.rel.opts.

Instead users should use field.rel.related_model._meta inplace of
field.rel.opts, and field.rel.to._meta in place of field.rel.to_opts.

Backport of f95122e541 from master
2015-02-23 07:26:10 -05:00
Marten Kenbeek 980dfca717 [1.8.x] Fixed #24366 -- Optimized traversal of large migration dependency graphs.
Switched from an adjancency list and uncached, iterative depth-first
search to a Node-based design with direct parent/child links and a
cached, recursive depth-first search. With this change, calculating
a migration plan for a large graph takes several seconds instead of
several hours.

Marked test `migrations.test_graph.GraphTests.test_dfs` as an expected
failure due to reaching the maximum recursion depth.

Backport of 78d43a5e10 from master
2015-02-23 12:55:43 +01:00
Michael Manfre ed941ef2d0 Fixed signature of BaseDatabaseOperations.date_interval_sql()
Backport of 7fa7dd48c4 from master
2015-02-23 00:04:57 -05:00
Aymeric Augustin 19c2fe04a8 [1.8.x] Fixed a few uses of Template that relied on a default engine.
Refs #24389.

Backport of 556a748 from master
2015-02-22 23:22:19 +01:00
Aymeric Augustin c564033408 [1.8.x] Fixed #24389 -- Isolated the CSRF view from the TEMPLATES setting.
Thanks uranusjr for the report and analysis.

Backport of 88a5f17 from master
2015-02-22 15:47:11 +01:00
Michael Angeletti 1feeefe918 [1.8.x] Fixed #24376 -- added verbose_name arg to UUIDField
Backport of ea3168dc6c from master
2015-02-21 14:26:47 -05:00
Don Kirkby 5131aec7d2 [1.8.x] Fixed typo in django/db/models/fields/files.py comment.
Backport of 99a1bbf985 from master
2015-02-20 20:11:58 -05:00
foresmac 3207fcd0a0 [1.8.x] Fixed #24341 -- Added specific error messages to RangeField subclasses
Backport of 1d1d5d1c31 from master
2015-02-20 16:50:41 -05:00
Aymeric Augustin e4e140c49b [1.8.x] Removed a non-obvious side-effect of assigning Context.template.
Explicit is better than implicit.

Backport of 51b606f from master
2015-02-20 22:28:24 +01:00
Anssi Kääriäinen 6f03a4ca91 [1.8.x] Fixed #24328 -- cleaned up Options._get_fields() implementation
Backport of bad5f262bf from master
2015-02-20 13:11:59 -05:00
Loic Bistuer 3a6c37fce4 [1.8.x] Fixed #24351, #24346 -- Changed the signature of allow_migrate().
The new signature enables better support for routing RunPython and
RunSQL operations, especially w.r.t. reusable and third-party apps.

This commit also takes advantage of the deprecation cycle for the old
signature to remove the backward incompatibility introduced in #22583;
RunPython and RunSQL won't call allow_migrate() when when the router
has the old signature.

Thanks Aymeric Augustin and Tim Graham for helping shape up the patch.

Refs 22583.

Conflicts:
	django/db/utils.py

Backport of bed504d70b from master
2015-02-20 21:55:50 +07:00
Marc Tamlyn b6ef67d752 [1.8.x] Fixed #24373 -- Added run_validators to ArrayField.
Thanks to DavidMuller for the report.

Backport of c490e410af from master
2015-02-20 11:53:17 +00:00
Marc Tamlyn 3886338c1d [1.8.x] Update converters to take a consistent set of parameters.
As suggested by Anssi. This has the slightly strange side effect of
passing the expression to Expression.convert_value has the expression
passed back to it, but it allows more complex patterns of expressions.

Backport of 32d4db66b9 from master
2015-02-20 11:47:48 +00:00
Marc Tamlyn c54d73ae01 [1.8.x] Fixed #24343 -- Ensure db converters are used for foreign keys.
Joint effort between myself, Josh, Anssi and Shai.

Conflicts:
	django/db/models/query.py
	tests/model_fields/models.py

Backport of 4755f8fc25 from master.
2015-02-20 11:46:57 +00:00
Alex Vidal 82f39bfb1a [1.8.x] Fixed typo in django.core.servers.basehttp message.
Backport of e467919c63 from master
2015-02-19 19:37:22 -05:00
Aymeric Augustin cc4effba0b [1.8.x] Set context.template instead of context.engine while rendering.
This opens more possibilities, like accessing context.template.origin.

It also follows the chain of objects instead of following a shortcut.

Backport of 1bfcc95 from master
2015-02-19 22:10:56 +01:00
Claude Paroz 84e7fec88d [1.8.x] Fixed #20889 -- Prevented BadHeaderError when Python inserts newline
Workaround for http://bugs.python.org/issue20747.
In some corner cases, Python 2 inserts a newline in a header value
despite `maxlinelen` passed in Header constructor.
Thanks Tim Graham for the review.
Backport of efb1f99f94 from master.
2015-02-19 20:19:38 +01:00
Shai Berger 66d37e593c [1.8.x] Fixed #24307: Avoided redundant column nullability modifications on Oracle
Thanks Joris Benschop for the report, and Tim Graham for the tests.

Backport of ceadc94f09 from master
2015-02-19 02:44:08 +02:00
Marten Kenbeek 84c9b24c5a [1.8.x] Fixed #24291 - Fixed migration ModelState generation with unused swappable models
Swapped out models don't have a _default_manager unless they have
explicitly defined managers. ModelState.from_model() now accounts for
this case and uses an empty list for managers if no explicit managers
are defined and a model is swapped out.

Backport of 15dc8d1c9d from master
2015-02-18 19:11:51 +01:00
Adam Chainz 4abadc4872 [1.8.x] Removed unused foreign_key_re variables in MySQL/Oracle DB backends
Backport of e9282747a4 from master
2015-02-18 10:24:40 -05:00
Tim Graham 1153bccc1b [1.8.x] Refs #24324 -- Fixed crash in {% debug %} tag on Python 2.
If Django is installed in a path that contains non-ASCII characters,
the tag failed with UnicodeDecodeError.

Backport of 098fa12dd3 from master
2015-02-18 07:35:56 -05:00
Tim Graham 09da1b465e [1.8.x] Refs #24324 -- Fixed UnicodeDecodeError in MigrationWriter on Python 2.
Backport of fa66ea7532 from master
2015-02-17 18:50:15 -05:00
Tim Graham f9a99c410e [1.8.x] Refs #24324 -- Fixed UnicodeDecodeError in template_backends tests
The message for the SuspiciousFileOperation exception needs to
be a unicode string.

Backport of bebc1e53a3 from master
2015-02-17 18:45:07 -05:00
Tim Graham a1fa0135ec [1.8.x] Refs #24324 -- Fixed get_app_template_dirs() UnicodeDecodeError on Python 2.
The function implemented most of upath(), but skipped the check for
strings that are already unicode.

Backport of bad6280c4e from master
2015-02-17 08:24:36 -05:00
Tim Graham ba3a7636f1 [1.8.x] Refs #24324 -- Fixed UnicodeDecodeError in makemigrations.
If the project path contained a non-ASCII character, Python 2 crashed.

Backport of c9ece2e6b9 from master
2015-02-17 08:14:01 -05:00
Tim Graham 4f43e5c435 [1.8.x] Refs #24324 -- Fixed UnicodeEncodeError in SQLite backend while testing.
If 'name' contained non-ASCII characters, the comparison raised a
UnicodeEncodeError on Python 2.

Backport of 63c5c98701 from master
2015-02-17 08:11:38 -05:00
Tim Graham 9dba901d9c [1.8.x] Refs #24324 -- Fixed makemessages crash when Django is installed in a non-ASCII path.
Backport of 81a94cc616 from master
2015-02-17 08:08:28 -05:00
Tim Graham bcb3bfa5a2 [1.8.x] Refs #24324 -- Fixed management command discovery on non-ASCII paths.
Backport of 4a0aeac1b5 from master
2015-02-17 07:29:30 -05:00
Tim Graham 730fb593ad [1.8.x] Fixed #24335 -- Bumped required psycopg2 version to 2.4.5 (2.5 for contrib.postgres).
Backport of 3adc5f1ee6 from master
2015-02-17 06:21:59 -05:00
Aymeric Augustin d027993ed1 [1.8.x] Removed 'autocommit' options for the psycopg2 backend.
It was documented as not having any effect since Django 1.6.

Backport of a73c8540a8 from master
2015-02-17 06:21:37 -05:00
Aymeric Augustin 30e5356c2e [1.8.x] Cleaned up init_connection_state in the psycopg2 backend.
settings_dict['TIME_ZONE'] is set in ConnectionHandler.ensure_defaults.

Backport of 28e97a9bdc from master
2015-02-17 06:21:24 -05:00
Preston Timmons 2b79a35a83 [1.8.x] Removed unnecessary __init__ definition from DebugLexer.
Backport of ad9ecc2c20 from master
2015-02-16 18:06:53 -05:00
Tim Graham ad2c6a756b [1.8.x] Moved contrib.contenttypes tests out of contrib.
Backport of 664c038f2c from master
2015-02-16 18:06:13 -05:00
Tim Graham 77e3f7dd58 [1.8.x] Fixed #24299 -- Added an auth migration to ensure contenttypes is migrated.
Without this migration, the auth signal handlers will fail if migrating
only auth.

Backport of 4538cbf17d from master
2015-02-16 14:55:24 -05:00
Sergey Fedoseev 870d900cdc [1.8.x] Refs #24299 -- Made contenttypes migrations signal handler more robust.
Backport of d392c1e150 from master
2015-02-16 13:44:04 -05:00
Markus Holtermann a1ba462793 [1.8.x] Fixed #24225, #24264, #24282 -- Rewrote model reloading in migration project state
Instead of naively reloading only directly related models (FK, O2O, M2M
relationship) the project state needs to reload their relations as well
as the model changes as well. Furthermore inheriting models (and super
models) need to be reloaded in order to keep inherited fields in sync.

To prevent endless recursive calls an iterative approach is taken.

Backport of b29f3b5120 from master
2015-02-16 19:38:02 +01:00
Markus Holtermann 681efedce4 [1.8.x] Explicitly checked for LookupError in contenttypes migration
Backport of 4dd1f4c5eb from master
2015-02-16 17:14:33 +01:00
Aymeric Augustin e8950668ca [1.8.x] Deprecated TEMPLATE_DEBUG setting.
Backport of 15b711b from master.
2015-02-15 20:48:48 +01:00
Michael Angeletti e13dca859c [1.8.x] Added missing return value to DurationField.prepare_value(); refs #24339.
Backport of 49647bec6e from master
2015-02-14 18:39:17 -05:00
Aymeric Augustin 87e9cad4a4 [1.8.x] Fixed #24318 -- Set the transaction isolation level with psycopg >= 2.4.2.
Backport of 76356d96 from master
2015-02-14 18:52:28 +01:00
Michael Angeletti 2e6d8e51db [1.8.x] Fixed #24339 -- Fixed crash with empty DurationField form field.
Backport of 8a21d25033 from master
2015-02-14 07:38:20 -05:00
Aymeric Augustin 0f3eb8260b [1.8.x] Fixed #24338 -- Accepted Template wrapper in {% extends %}.
Explicitly checking for django.template.Template subclasses is
preferrable to duck-typing because both the django.template.Template and
django.template.backends.django.Template have a render() method.

Thanks spectras for the report.

Backport of 47ee7b48 from master
2015-02-14 10:36:44 +01:00
Loic Bistuer 20b621eb3c [1.8.x] Fixed #24289 -- Reversed usage of Field.many_to_one and one_to_many.
Thanks Carl Meyer and Tim Graham for the reviews and to all involved
in the discussion.

Backport of 18c0aaa912 from master
2015-02-14 02:42:06 +07:00
Andriy Sokolovskiy 136edac897 [1.8.x] Fixed #24320 - Used field.value_to_string() in serialization of foreign key.
This fixes serialization of a ForeignKey to a UUIDField as the
test indicates.

Backport of 5c995dcfc2 from master
2015-02-13 12:45:35 -05:00
Tim Graham 2347f3267f [1.8.x] Fixed #24315 -- Fixed auth.views.password_reset_confirm() with a UUID user.
Backport of 002425fe39 from master
2015-02-13 09:57:44 -05:00
Tim Graham 8fc4840289 [1.8.x] Fixed #24334 -- Allowed admin password reset to work with non-digit custom user model primary key.
Thanks Loic for help and Simon for review.

Backport of fdf20093e0 from master
2015-02-13 09:50:55 -05:00
Markus Holtermann bd80fa6b0f [1.8.x] Fixed #24184 -- Prevented automatic soft-apply of migrations
Previously Django only checked for the table name in CreateModel
operations in initial migrations and faked the migration automatically.
This led to various errors and unexpected behavior. The newly introduced
--fake-initial flag to the migrate command must be passed to get the
same behavior again. With this change Django will bail out in with a
"duplicate relation / table" error instead.

Thanks Carl Meyer and Tim Graham for the documentation update, report
and review.

Backport of f287bec583 from master
2015-02-13 15:21:10 +01:00
Tim Graham 4c948c7c9d [1.8.x] Fixed #24332 -- Fixed contrib.sites create_default_site() when 'default' DATABASES is empty.
Backport of e8cf4f8abe from master
2015-02-13 07:02:37 -05:00
Josh Smeaton 1784c326b1 [1.8.x] Fixed #24319 -- Added validation for UUID model field
Backport of de0241eb98 from master
2015-02-13 10:01:06 +11:00
Tim Graham 03f4e2d909 [1.8.x] Fixed #24333 -- Fixed admin history view crash with non-integer slug.
Backport of d64baaef3b from master
2015-02-12 14:20:17 -05:00
Tim Graham 7b5aa20a28 [1.8.x] Fixed #17716 -- Prevented include('...', app_name='...') without a namespace.
Backport of 27eeb64a96 from master
2015-02-12 08:19:10 -05:00
Nik Nyby 0ab8ec4312 [1.8.x] Subclassed template.Node instead of Node for consistency.
Backport of 34ccb3cc03 from master
2015-02-12 08:05:04 -05:00
Tim Graham 596564e808 [1.8.x] Fixed #24161 -- Stored the user primary key as a serialized value in the session.
This allows using a UUIDField primary key along with the JSON session
serializer.

Thanks to Trac alias jamesbeith for the report and Simon Charette
for the initial patch.

Backport of 0f7f5bc9e7 from master
2015-02-12 07:40:14 -05:00
Lukas Klein 1904022f91 [1.8.x] Fixed #24321 -- Improved `utils.http.same_origin` compliance with RFC6454
Backport of 93b3ef9b2e from master.
2015-02-12 09:01:59 +01:00
Josh Smeaton a6ea62aeaf [1.8.x] Refs #14030 -- Improved expression support for python values
Backport of e2d6e14662 from master
2015-02-12 08:53:03 +11:00
Collin Anderson 343c087533 [1.8.x] Refs #14497 -- Handled empty readonly admin FileFields
Backport of 07cfe1bd82 from master
2015-02-11 13:01:25 -05:00
Tim Graham e06971340d [1.8.x] Moved contrib.webdesign tests out of contrib.
Backport of 8ec306a3a9 from master
2015-02-11 12:35:32 -05:00
Tim Graham 69c89aeccf [1.8.x] Moved contrib.gis tests out of contrib.
Backport of ad0be620ae from master
2015-02-11 12:05:29 -05:00
Tim Graham 2482c9dd24 [1.8.x] Moved non-documented auth test models to the new test location.
Backport of 5ab327a389 from master
2015-02-11 12:03:03 -05:00
Tim Graham e55d888b66 [1.8.x] Moved contrib.auth tests out of contrib.
Backport of 2d7aca3da0 from master
2015-02-11 12:02:35 -05:00
Tim Graham 44df17d53c [1.8.x] Moved contrib.humanize tests out of contrib.
Backport of 8192a164de from master
2015-02-11 11:55:53 -05:00
Tim Graham c0f0f93b5d [1.8.x] Moved contrib.redirects tests out of contrib.
Backport of 00da46091a from master
2015-02-11 11:55:40 -05:00
Tim Graham bbe7964185 [1.8.x] Moved contrib.messages tests out of contrib.
Backport of b3cd9e0d07 from master
2015-02-11 11:55:05 -05:00
Tim Graham 10fdd2fc1d [1.8.x] Moved contrib.sessions tests out of contrib.
Backport of fac3a34cbb from master
2015-02-11 11:54:51 -05:00
Tim Graham e1046a96bc [1.8.x] Moved contrib.sitemaps tests out of contrib.
Backport of fbc467c26b from master
2015-02-11 11:52:10 -05:00
Tim Graham 0520cfe94a [1.8.x] Moved contrib.sites tests out of contrib.
Backport of d8341bf024 from master
2015-02-11 11:50:23 -05:00
Tim Graham 36bf6ec9eb [1.8.x] Moved contrib.flatpages tests out of contrib.
Backport of d3a725054f from master
2015-02-11 11:47:58 -05:00
Tim Graham a0553d1a7c [1.8.x] Prevented some test commands from needlessly running system checks.
This is a performance optimization and also fixes test errors with the
upcoming merge of contrib tests into tests/. The tests failed on MySQL
because the models with GeometryField were being checked but the
non-GIS MySQL backend didn't know how to handle them.

Backport of 197dd4b8f1 from master
2015-02-11 10:17:53 -05:00
Daniel Pyrathon fdcc9c47d5 [1.8.x] Fixed #24146 -- Allowed model._meta.get_field() to be used after apps.models_ready
Backport of 19188826b4 from master
2015-02-10 19:55:42 -05:00
Aymeric Augustin c6a49d4f17 [1.8.x] Fixed a crash of the debug page.
During the autumn DST change, the template engine would fail to convert
the naive representation of now when USE_TZ = True. Passing now in UTC
eliminates the issue.

Thanks mbertheau and tricoder42.

Refs #23714.

Backport of c7a6996df7 from master
2015-02-10 19:07:07 -05:00
Loic Bistuer 00f76b018f [1.8.x] Fixed isort import that's inconsistent between platforms.
Backport of c8e24bbc9b from master
2015-02-10 18:53:23 -05:00
Josh Smeaton 3518d51697 [1.8.x] Fixed #24200 -- Made introspection bypass statement cache
Backport of 1fbe8a2de3 from master
2015-02-10 23:42:16 +02:00
Aymeric Augustin 9b7b37382c [1.8.x] Split DTL context creation into its own function.
This reduces the length of rope RequestContext gives users to hang
themselves with.

Thanks Alex Hill for the report and Tim Graham for the review.

Backport of f2c104a from master.
2015-02-10 14:35:05 +01:00
Tim Graham a8b70d251d [1.8.x] Sorted imports with isort; refs #23860.
Backport of 0ed7d15563 from master
2015-02-09 14:24:06 -05:00
Tim Graham 9744529c12 [1.8.x] Fixed #24302 -- Added DurationField.formfield()
Backport of 2d7c27d387 from master
2015-02-09 10:21:15 -05:00
jMyles ac576e9f45 [1.8.x] Fixed #24287 -- Added friendly error if a model is in a models.py outside an installed app. 2015-02-09 09:38:03 -05:00
Tim Graham 6e50fc9246 [1.8.x] Removed unnecessary parentheses in model check messages.
Backport of e144e0e237 from master
2015-02-09 08:57:02 -05:00
Aron Podrigal eb9fbc0b1d [1.8.x] Fixed #24249 -- Improved field shadowing validation in model multi-inheritance.
Backport of 4d73303ee9 from master
2015-02-09 08:43:40 -05:00
Aymeric Augustin 8cb2cfdda5 [1.8.x] Called parent in SimpleTestCase.setUpClass/tearDownClass.
Backport of 146dd7be8d from master
2015-02-08 21:31:28 -05:00
Claude Paroz cd260d03bd [1.8.x] Replaced hardcoded URLs in admin_* tests
Refs #15779. This will allow easier admin URL changes, when needed.
Thanks Simon Charette for the review.

Backport of 32e6a7d3a5 from master
2015-02-08 15:12:07 -05:00
Alex Gaynor d54638727a [1.8.x] Simplified the lazy CSRF token implementation in csrf context processor.
This significantly improves performance on PyPy. The previous
implementation would generate a new class on every single request,
which is relatively slow.

Backport of 8099d33b65 from master
2015-02-08 15:03:29 -05:00
Alex Gaynor ee86bf24d2 [1.8.x] Optimized allow_lazy() by not generating a new lazy wrapper on each invocation.
This dramatically improves performance on PyPy. The following benchmark:

python -mtimeit -s "from django.utils.functional import allow_lazy; from django.utils.translation import ugettext_lazy; f = allow_lazy(lambda s: s, str)" "f(ugettext_lazy('abc'))"

goes from 390us per loop to 165us.

Backport of 82e0cd1571 from master
2015-02-08 14:57:19 -05:00
Varun Sharma b44a56c308 [1.8.x] Fixed #24181 -- Fixed multi-char THOUSAND_SEPARATOR insertion
Report and original patch by Kay Cha.
Backport of 540ca563de from master.
2015-02-08 20:09:04 +01:00
Markus Holtermann edbf6de753 [1.8.x] Revert "Fixed #24075 -- Prevented running post_migrate signals when unapplying initial migrations of contenttypes and auth"
This reverts commit 737d24923a.

Backport of 2832a9b028 from master
2015-02-07 20:35:20 +01:00
Markus Holtermann b2b5ea88b7 [1.8.x] Revert "Refs #24075 -- Silenced needless call_command output while running tests"
This reverts commit 51dc617b21.

Backport of bd3d796ecd from master
2015-02-07 19:52:50 +01:00
Collin Anderson fc8e1e0c10 [1.8.x] Fixed E265 comment style
Backport of db77915c9f from master
2015-02-06 09:35:08 -05:00
Tim Graham 232a1d297c [1.8.x] Removed django-2to3.py
Aymeric says, "It was fun to write, but I don't think it's very useful."

Backport of 607af78bb8 from master
2015-02-06 08:56:01 -05:00
Tim Graham 289660f52d [1.8.x] Removed bin/unique-messages.py
This script is no longer used according to Claude, our translations manager.

Backport of eb45a29565 from master
2015-02-06 08:55:10 -05:00
Tim Graham 6adc23d6b6 [1.8.x] Removed gather_profile_stats.py
This script uses the unmaintained hotshot module (gone on Python 3)
and doesn't seem to be Django specific in any way.

Backport of 388d986b8a from master
2015-02-06 08:55:02 -05:00
Tim Graham fc1e9107d7 [1.8.x] Added UUIDField.deconstruct()
Backport of 0f54cf28c0 from master
2015-02-05 19:15:37 -05:00
Aymeric Augustin aed1b1f6e5 [1.8.x] Fixed #24265 -- Preserved template backend loading exceptions.
If importing or initializing a template backend fails, attempting to
access this template backend again must raise the same exception.

Backport of 44ad6915 from master
2015-02-05 20:09:22 +01:00
Aymeric Augustin 67787db22a [1.8.x] Caught all exceptions raised by Engine.get_default().
In addition to ImproperlyConfigured, Engine.get_default() may also raise
ImportError or other exceptions. It's better to catch all exceptions in
places where the default engine isn't strictly required.

Backport of 27f9ff45 from master
2015-02-05 20:09:10 +01:00
Aymeric Augustin 5fbec369aa [1.8.x] Fixed #24273 -- Allowed copying RequestContext more than once.
Thanks Collin Anderson for the report.

Backport of 31d3a355 from master
2015-02-05 14:07:18 +01:00
Matthew Somerville 2a55301f9f [1.8.x] Fixed #24242 -- Improved efficiency of utils.text.compress_sequence()
The function no longer flushes zfile after each write as doing so can
lead to the gzipped streamed content being larger than the original
content; each flush adds a 5/6 byte type 0 block. Removing this means
buf.read() may return nothing, so only yield if that has some data.
Testing shows without the flush() the buffer is being flushed every 17k
or so and compresses the same as if it had been done as a whole string.

Backport of caa3562d5b from master
2015-02-04 15:17:22 -05:00
mlavin d585ade0df [1.8.x] Fixed #24197 -- Added clearing of staticfiles caches on settings changes during tests
Cleared caching in staticfiles_storage and get_finder when
relevant settings are changed.

Backport of 2730dad0d7 from master
2015-02-04 10:54:33 -05:00
Riccardo Magliocchetti 4957b8a406 [1.8.x] Fixed #14497 -- Improved admin widget for "read only" FileFields
Based on patch by Adam J Forster, Paul Collins, and Julien.

Backport of 2be621e44c from master
2015-02-04 09:05:41 -05:00
Aron Podrigal fc49e73648 [1.8.x] Fixed #15321 -- Honored ancestors unique checks.
Thanks to Tim for the review.

Backport of 79f27f2b61 from master
2015-02-03 18:58:48 -05:00
Simon Charette cbcf92e95f [1.8.x] Fixed #24266 -- Changed get_parent_list to return a list ordered by MRO.
Thanks to Aron Podrigal for the initial patch and Tim for the review.

Backport of 65e005f8cd from master
2015-02-03 16:41:51 -05:00
Tim Graham 92d5bedc56 [1.8.x] Reverted "Fixed #24146 -- Fixed a missing fields regression in admin checks."
This reverts commit e8171daf0c.

A new solution is forthcoming.

Backport of 0e489c19f1 from master
2015-02-03 15:24:24 -05:00
Claude Paroz ea3e40c278 [1.8.x] Fixed #24252 -- Forced lazy __str__ to utf-8 on Python 2
Thanks Stanislas Guerra for the report and Tomas Ehrlich for
the review.
Backport of cd0ceaa102 from master.
2015-02-03 18:26:08 +01:00
Matthew Somerville d88c24f436 [1.8.x] Fixed #24240 -- Allowed GZipping a Unicode StreamingHttpResponse
make_bytes() assumed that if the Content-Encoding header is set, then
everything had already been dealt with bytes-wise, but in a streaming
situation this was not necessarily the case.

make_bytes() is only called when necessary when working with a
StreamingHttpResponse iterable, but by that point the middleware has
added the Content-Encoding header and thus make_bytes() tried to call
bytes(value) (and dies). If it had been a normal HttpResponse,
make_bytes() would have been called when the content was set, well
before the middleware set the Content-Encoding header.

This commit removes the special casing when Content-Encoding is set,
allowing unicode strings to be encoded during the iteration before they
are e.g. gzipped. This behaviour was added a long time ago for #4969 and
it doesn't appear to be necessary any more, as everything is correctly
made into bytes at the appropriate places.

Two new tests, to show that supplying non-ASCII characters to a
StreamingHttpResponse works fine normally, and when passed through the
GZip middleware (the latter dies without the change to make_bytes()).
Removes the test with a nonsense Content-Encoding and Unicode input - if
this were to happen, it can still be encoded as bytes fine.

Backport of 250aa7c39b from master.
2015-02-03 18:19:06 +01:00
Anssi Kääriäinen 43b0131fb5 [1.8.x] Fixed #23617 -- Added get_pk_value_on_save()
The method is mainly intended for use with UUIDField. For UUIDField we
want to call the field's default even when primary key value is
explicitly set to None to match the behavior of AutoField.

Thanks to Marc Tamlyn and Tim Graham for review.

Backport of 8adc59038c from master
2015-02-03 09:25:55 -05:00
Tim Graham 9ffe013caa [1.8.x] Fixed #24263 -- Prevented extra queries on BaseDateDetailView with a custom queryset.
Thanks jekka-ua for the report and patch.

Backport of 118b11221f from master
2015-02-03 09:13:10 -05:00
Tim Graham c65c8f5696 [1.8.x] Skipped tests from refs #24168 on Python 3.2. 2015-02-03 08:21:06 -05:00
Aymeric Augustin f87457a460 [1.8.x] Fixed #24168 -- Allowed selecting a template engine in a few APIs.
Specifically in rendering shortcuts, template responses, and class-based
views that return template responses.

Also added a test for render_to_response(status=...) which was missing
from fdbfc980.

Thanks Tim and Carl for the review.

Backport of 2133f31 from master.

Conflicts:
	docs/topics/http/shortcuts.txt
	tests/generic_views/test_base.py
2015-02-03 08:32:14 +01:00
Tim Graham 3af1e7860e [1.8.x] Removed contrib.auth.forms.mask_password()
This function is unused since dce820ff70
after being introduced in 718a5ba1a1

Backport of a53541852d from master
2015-02-02 11:13:48 -05:00
Tim Graham 3cd8f51f21 [1.8.x] Removed query.alias_diff()
This function is unused since 6fe2b001db

Backport of f79ce63fdb from master
2015-02-01 21:38:34 -05:00
Tim Graham c9df163d0c [1.8.x] Removed UpdateCacheMiddleware._session_accessed()
This method is unused since f567d04b24

Backport of 0e60912492 from master
2015-02-01 20:35:57 -05:00
Tim Graham 7580876fbd [1.8.x] Removed Query.raise_field_error()
This method was inadvertently reintroduced in
f59fd15c49

Backport of 99ca7c2bd3 from master
2015-02-01 20:26:43 -05:00
Tim Graham 26e07a996d [1.8.x] Removed InlineAdminForm.field_count()
This method is unused since 337d102b86

Backport of 327a00f48b from master
2015-02-01 20:13:58 -05:00
Tim Graham c9e538b174 [1.8.x] Removed threading fallback imports.
Django imports threading in many other places without fallback.

Backport of 18f3e79b13 from master
2015-02-01 18:45:01 -05:00
Tim Graham 0fc2f94699 [1.8.x] Removed PostgreSQL DatabaseWrapper._set_isolation_level().
This method is unused since 8717b0668c.

Backport of 64a899dc81 from master
2015-01-31 11:06:03 -05:00
Claude Paroz c77dd64402 [1.8.x] Fixed #14483 -- Allowed using subqueries with GIS lookups
Backport of a0b5f15ea5 from master.
2015-01-30 20:29:05 +01:00
Tim Graham 7060ef7158 [1.8.x] Reverted "Fixed #6785 -- Made QuerySet.get() fetch a limited number of rows."
This reverts commit da79ccca1d.

This optimized the unsuccessful case at the expense of the successful one.

Backport of 293fd5da5b from master
2015-01-30 12:52:39 -05:00
Tim Graham df68751134 [1.8.x] Fixed #24164 -- Fixed Oracle GIS limited aggregation test failure.
Backport of 29c0073335 from master
2015-01-30 06:34:36 -05:00
Simon Charette a301061f88 [1.8.x] Fixed #23940 -- Allowed model fields to be named `exact`.
An explicit `__exact` lookup in the related managers filters
was interpreted as a reference to a foreign `exact` field.

Thanks to Trac alias zhiyajun11 for the report, Josh for the investigation,
Loïc for the test name and Tim for the review.

Backport of eb4cdfbdd6 from master
2015-01-29 14:42:28 -05:00
Matt 7b92acea70 [1.8.x] Fixed #24223 -- Prevented a session test from leaking.
Backport of 55c76f4e3b from master
2015-01-29 14:37:33 -05:00
Tim Graham d0c343372f [1.8.x] Removed ForeignObjectRel.get_lookup_constraint() [unused].
Backport of f609731118 from master
2015-01-29 14:12:35 -05:00
Reza Mohammadi 590ee3ed16 [1.8.x] Fixed Persian locale FIRST_DAY_OF_WEEK & DECIMAL/THOUSAND_SEPARATORs.
Reference: http://lh.2xlibre.net/locale/fa_IR/

Backport of f1ff9407c9 from master
2015-01-29 13:02:49 -05:00
Emin Mastizada 6002393a97 [1.8.x] Updated Azerbaijani language name.
Backport of 0f3ea8c0bc from master
2015-01-28 06:48:48 -05:00
Josh Smeaton f858b51ee3 [1.8.x] Refs #14030 -- Renamed CombinableMixin to Combinable
Removed unused method and updated docstrings.

Backport of 14d0bd67d4 from master
2015-01-28 11:04:12 +11:00
Josh Smeaton 6c68e40e6e [1.8.x] Refs #14030 -- Added repr methods to all expressions
Backport of 7171bf755b from master
2015-01-28 11:03:39 +11:00
Raul Cumplido 7cc1b4710e [1.8.x] Fixed #24209 -- Prevented crash when parsing malformed RFC 2231 headers
Thanks Tom Christie for the report and review.
Backport of ac650d02cb from master.
2015-01-27 20:16:53 +01:00
Josh Smeaton e56810e839 [1.8.x] Fixed #24154 -- Backends can now check support for expressions
Backport of 8196e4bdf4 from master
2015-01-27 14:47:38 +11:00
Tomáš Ehrlich 5dff3513cc [1.8.x] Fixed #24220 - Allowed lazy objects for success_url
Backport of 511be35779 from master
2015-01-26 12:42:08 -05:00
Tomáš Ehrlich 2d990fb7fa [1.8.x] Fixed #24221 - Used precompiled regexp for percent-placeholder matching.
Backport of ea0ea7859a from master
2015-01-26 10:49:55 -05:00
Tim Graham 1ee18a6046 [1.8.x] Moved imports in GIS tests to avoid failure if dependencies aren't installed.
Backport of 1e219ac62f from master
2015-01-23 16:20:08 -05:00
Ng Zhi An 56015c01c4 [1.8.x] Fixed #24170 -- Implemented decompress for BaseRangeField widgets
Backport of 4669b6a807 from master
2015-01-23 15:07:03 -05:00
Tim Graham 2ed1980e0f [1.8.x] Clarified docstring in dispatch/dispatcher.py
Backport of 851f5bd413 from master
2015-01-23 13:00:24 -05:00
Tim Graham 1806e059f6 [1.8.x] Isolated a flatpages test; refs #11505.
Backport of 4135d83702 from master
2015-01-22 15:50:26 -05:00
Andriy Sokolovskiy 11a5e45b96 [1.8.x] Fixed #24104 -- Fixed check to look on field.many_to_many instead of class instance
Backport of 38c17871bb from master
2015-01-22 18:53:47 +01:00
Loic Bistuer 0580133971 [1.8.x] Fixed small inconsistency when handling aggregate's default_alias.
Refs #14030.

Backport of d450af8a26 from master
2015-01-22 08:02:07 +07:00
Adam Taylor 45aaced91e [1.8.x] Fixed typos in code comments.
Backport of 039465a6a7 from master
2015-01-20 12:18:29 -05:00
Tim Graham cb90d489da [1.8.x] Fixed a query failure on Python 3.5; refs #23763.
The failure was introduced in Django by
c7fd9b242d and the change in
Python 3.5 is https://hg.python.org/cpython/rev/a3c345ba3563.

Backport of be1357e709 from master
2015-01-20 08:15:39 -05:00
Marc Tamlyn c80b2144d2 [1.8.x] Fixes #24169 -- More arrayfield specific lookups.
varchar()[] cannot compare itself to text[]

Thanks to joelburton for the patch.

Backport of 0ae94d0d31 from master
2015-01-20 10:26:32 +00:00
Josh Smeaton 504cd5d3be [1.8.x] Fixed #24183 -- Fixed wrong comparisons in Substr
Backport of 61c102d010 from master
2015-01-20 12:11:27 +11:00
Tim Graham 06fa019c1b [1.8.x] Fixed #24153 -- Fixed cookie test compatibility with Python 3.4.3+
Backport of b19b81b396 from master
2015-01-19 15:39:36 -05:00
Markus Holtermann e55cb91bd4 [1.8.x] Fixed #24163 -- Removed unique constraint after index on MySQL
Thanks Łukasz Harasimowicz for the report.

Backport of 5792e6a88c from master
2015-01-19 16:55:25 +01:00
Claude Paroz 6eddaa42c3 [1.8.x] Fixed header of contrib.postgres translation catalog
Backport of eb6e12ca6f from master.
2015-01-19 10:19:42 +01:00
Josh Smeaton 0c910823c1 [1.8.x] Fixed #24174 -- Fixed extra order by descending
Backport of 69c6a6868f from master
2015-01-19 13:18:09 +11:00
Tim Graham 559e15a23a [1.8.x] Removed an obsolete comment in django/apps/config.py
Backport of bd98926f0e from master
2015-01-18 16:31:21 -05:00
Claude Paroz 8c8a1a0846 [1.8.x] Added contrib.postgres translation catalog 2015-01-18 21:01:42 +01:00
Claude Paroz 6b1b7263f4 [1.8.x] Fixed PostGIS crosses lookup and added crosses test
Backport of aff0e54d5 from master.
2015-01-17 15:46:50 +01:00
Claude Paroz 666c12e529 [1.8.x] Updated en translation catalogs 2015-01-17 11:18:45 +01:00
Claude Paroz dec5157a72 [1.8.x] Complemented test about non-supported aggregation exception
Backport of d69ecf922d from master.
2015-01-17 10:04:38 +01:00
David Robles eb6a07e069 [1.8.x] Fixed typo in 'Django Template Language'
Backport of d60b96d988 from master
2015-01-17 03:06:26 +01:00
Tim Graham c72448b597 Bumped version to 1.8 alpha 1. 2015-01-16 17:06:32 -05:00
Marc Tamlyn 39d95fb6ad Fixed #24092 -- Widened base field support for ArrayField.
Several issues resolved here, following from a report that a base_field
of GenericIpAddressField was failing.

We were using get_prep_value instead of get_db_prep_value in ArrayField
which was bypassing any extra modifications to the value being made in
the base field's get_db_prep_value. Changing this broke datetime
support, so the postgres backend has gained the relevant operation
methods to send dates/times/datetimes directly to the db backend instead
of casting them to strings. Similarly, a new database feature has been
added allowing the uuid to be passed directly to the backend, as we do
with timedeltas.

On the other side, psycopg2 expects an Inet() instance for IP address
fields, so we add a value_to_db_ipaddress method to wrap the strings on
postgres. We also have to manually add a database adapter to psycopg2,
as we do not wish to use the built in adapter which would turn
everything into Inet() instances.

Thanks to smclenithan for the report.
2015-01-16 16:15:16 -05:00