Commit Graph

10898 Commits

Author SHA1 Message Date
Florian Apolloner 9d1bf8f841 Removed executeable bit from a few files. 2014-05-25 23:16:40 +02:00
Loic Bistuer b7de5f5d3f Fixed a few ResourceWarning in the test suite. Refs #22680. 2014-05-26 03:23:17 +07:00
Claude Paroz 2779c299c8 Removed code deprecated from Django 1.2 2014-05-25 21:25:23 +02:00
Claude Paroz c5d73b687d Removed comment forgotten in 3caf957ed5 2014-05-24 16:22:08 +02:00
Claude Paroz 3caf957ed5 Removed GeoWhereNode, obsoleted by GISLookup 2014-05-24 16:18:45 +02:00
Moayad Mardini 63fc91b3ca Fixed #22676 -- makemigrations --dry-run should not ask for defaults
Made the fix in InteractiveMigrationQuestioner class code, rather than
MigrationAutodetector, because --dry-run shouldn't affect whether
MigrationAutodetector will detect non-nullable fields, but the
questioner should skip the question and returns a None for default
(since that won't be used anyway) if --dry-run is used.
2014-05-24 09:56:18 -04:00
Marc Tamlyn 9fb0f5dddc Fixed #22510 -- Harden field removal to only None.
Refs #8620.

If we allow any value to remove form fields then we get name clashes
with method names, media classes etc. There was a backwards
incompatibility introduced meaning ModelForm subclasses with declared
fields called media or clean would lose those fields.

Field removal is now only permitted by using the sentinel value None.
The docs have been slightly reworded to refer to removal of fields
rather than shadowing.

Thanks to gcbirzan for the report and initial patch, and several of the
core team for opinions.
2014-05-24 13:10:50 +01:00
Claude Paroz dbb48d2bb9 Applied unicode_literals to makemessages command
This also fixes #22686 as some sort of side-effect.
2014-05-24 11:51:57 +02:00
Preston Timmons be88b062af Fixed #21357 -- Fixed test client session initialization.
The test client will now create a session when it is first accessed
if no session already exists.
2014-05-22 20:29:48 -04:00
Unai Zalakain 4dc4d12e27 Fixed #21598 -- cleaned up template loader overrides in tests
- Template loader overriding is managed with contexts.
- The test loader is a class (function based loaders entered deprecation timeline
  in 1.4).
- Template loader overrider that overrides with test loader added.
2014-05-22 18:35:16 -04:00
Moayad Mardini ad994a3c5b Fixed #22679 -- Fixed empty tuple serialization in MigrationWriter.
Thanks rockallite.wulf for the report.
2014-05-22 16:15:09 +02:00
Marc Tamlyn 3545f31bcf Merge pull request #2699 from graingert/patch-3
the SECRET_KEY is not a hash
2014-05-22 13:32:03 +01:00
Marc Tamlyn 6ab67919ac Made nested deconstruction support both forms of deconstruct()
Nested deconstruction should (silently) handle Field.deconstruct() as
well as other arbitrary deconstructable objects. This allows having a
field in the deconstruction of another field.
2014-05-22 13:23:51 +01:00
Thomas Grainger 46082339d2 the SECRET_KEY is not a hash 2014-05-22 11:19:54 +01:00
Marc Tamlyn 604162604b Added array field support for PostgreSQL.
The first part of django.contrib.postgres, including model and two form
fields for arrays of other data types.

This commit is formed of the following work:

    Add shell of postgres app and test handling.

    First draft of array fields.

    Use recursive deconstruction.

    Stop creating classes at lookup time.

    Add validation and size parameter.

    Add contained_by lookup.

    Add SimpleArrayField for forms.

    Add SplitArrayField (mainly for admin).

    Fix prepare_value for SimpleArrayField.

    Stop using MultiValueField and MultiWidget.

    They don't play nice with flexible sizes.

    Add basics of admin integration.

    Missing:
    - Tests
    - Fully working js

    Add reference document for django.contrib.postgres.fields.ArrayField.

    Various performance and style tweaks.

    Fix internal docs link, formalise code snippets.

    Remove the admin code for now.

    It needs a better way of handing JS widgets in the admin as a whole
    before it is easy to write. In particular there are serious issues
    involving DateTimePicker when used in an array.

    Add a test for nested array fields with different delimiters.

    This will be a documented pattern so having a test for it is useful.

    Add docs for SimpleArrayField.

    Add docs for SplitArrayField.

    Remove admin related code for now.

    definition -> description

    Fix typo.

    Py3 errors.

    Avoid using regexes where they're not needed.

    Allow passing tuples by the programmer.

    Add some more tests for multidimensional arrays.

    Also fix slicing as much as it can be fixed.

    Simplify SplitArrayWidget's data loading.

    If we aren't including the variable size one, we don't need to search
    like this.
2014-05-22 09:53:26 +01:00
Ramiro Morales fce6a29428 Merge pull request #2498 from ramiro/move-serverhandler
Moved ServerHandler helper class to tests.
2014-05-21 18:59:01 -03:00
Ramiro Morales d731f48ece Merge pull request #2679 from ramiro/t22421
Fixed #22421 -- Regression in fixtures loading.
2014-05-21 18:57:46 -03:00
Martin Brochhaus bb0a9a070b Fixed #20477: Allowed list of modules for FORMAT_MODULE_PATH
Previously the FORMAT_MODULE_PATH setting only accepted one string (dotted
module path). A feature has been added to also allow a list of strings.

This is useful when using several reusable third party apps that define new
formats. We can now use them all and we can even override some of the formats
by providing a project-wide format module.
2014-05-21 07:35:47 -04:00
Loic Bistuer 27a3cfcd77 Fixed unused import. 2014-05-21 10:42:07 +07:00
Loic Bistuer 870b0a1f86 Fixed the ordering of prefetch lookups so that latter lookups can refer to former lookups.
Thanks Anssi Kääriäinen and Tim Graham for the reviews. Refs #17001 and #22650.
2014-05-21 10:30:48 +07:00
Loic Bistuer bdf3473e64 Fixed #22650 -- Fixed regression on prefetch_related.
Regression from f51c1f59 when using select_related then prefetch_related
on the reverse side of an O2O:

Author.objects.select_related('bio').prefetch_related('bio__books')

Thanks Aymeric Augustin for the report and tests. Refs #17001.
2014-05-21 10:26:04 +07:00
Denis Cornehl 3bec38888f Fixed #22557 -- ManifestStaticFilesStorage did not cleanup deleted files.
When using ManifestStaticFilesStorage, deleted static files would be
correctly cleaned up by "collectstatic --clear", but the manifest file
would still contain the stale entries.

Thanks to tedtieken for the report
2014-05-20 18:14:49 +02:00
Andrew Godwin 12c72796c3 Revert "Fixed #22645: Allow apps with no models module to still have migrations"
This reverts commit a4737bf6ae.
2014-05-20 16:53:21 +01:00
Andrew Godwin 03900a02d5 Fixed #22432: SQLite M2M repointing now works. Thanks to xelnor. 2014-05-20 16:25:59 +01:00
Andrew Godwin 125b3d4407 Fixed #22649: Beefed up quote_value 2014-05-20 15:41:01 +01:00
Andrew Godwin 4e32e47348 Merge pull request #2634 from loic/ticket22424
Fixed #22424 -- MySQL doesn't accept migrations' one-off default values ...
2014-05-20 14:25:59 +01:00
Andrew Godwin 1b07781292 Add feature for implied null (needed for Firebird backend) 2014-05-20 13:27:07 +01:00
Andrew Godwin a4737bf6ae Fixed #22645: Allow apps with no models module to still have migrations 2014-05-20 13:19:17 +01:00
Claude Paroz b8c480a12b Removed unused translations in auth tests 2014-05-20 12:21:05 +02:00
Erik Romijn ba5ddf7aed Fixed #22638 -- Changed CookieWizardView to ignore invalid cookies 2014-05-19 19:16:45 +02:00
Marc Tamlyn ecbabc216d Revert "Fixed regression from a2dd618e3b4a7472fab852da450ca5eef92a922f."
This reverts commit 5a2556afb9.
2014-05-19 14:57:06 +01:00
Claude Paroz 1a69d276bd Updated translation catalogs 2014-05-19 15:17:35 +02:00
Tim Graham b68fac7e88 Fixed #22652 -- Replaced UserModel.objects with UserModel._default_manager.
Thanks alexdlaird for the report.
2014-05-19 08:35:44 -04:00
Tim Graham 5abc811a40 Revert "Fixed #20477: Allowed settings.FORMAT_MODULE_PATH to be a list of modules."
This reverts commit 950b6de16a.
2014-05-19 08:22:46 -04:00
Claude Paroz a1f0c4c697 Removed locale dirs for single-message apps
Considering that these apps only translate their app name, it's not
worth having a whole bunch of po files just for that. The translatable
app name for those apps will be integrated in Django core catalog.
2014-05-19 14:13:01 +02:00
Martin Brochhaus 950b6de16a Fixed #20477: Allowed settings.FORMAT_MODULE_PATH to be a list of modules.
Previously the FORMAT_MODULE_PATH setting only accepted one string (dotted
module path).

This is useful when using several reusable third party apps that define new
formats. We can now use them all and we can even override some of the formats
by providing a project-wide format module.
2014-05-19 07:59:13 -04:00
Claude Paroz 7999ed9b69 Updated Django makemessages process
makemessages should now automatically distribute translatable
strings in the proper locale files, for Django too
(see 50a8ab7cd1).
2014-05-19 09:30:26 +02:00
Claude Paroz 813ded775d Merge pull request #2682 from alimony/welcome_page_local_02
Fixed #22635 -- Make "It worked!" page localizable
2014-05-19 08:58:18 +02:00
Markus Amalthea Magnuson 5f24cf9705 Fixed #22635 -- Made "It worked!" page localizable. 2014-05-19 01:05:19 +02:00
Tim Graham c7a4ae94a0 Removed some unnecessary exception naming; thanks claudep. 2014-05-18 17:42:03 -04:00
Esau Rodriguez ec9043ab2f Fixed #21799 - Modified loaddata --ignorenonexistent to ignore models. 2014-05-18 15:52:07 -04:00
Florian Apolloner 5a2556afb9 Fixed regression from a2dd618e3b. 2014-05-18 20:35:06 +02:00
SaeX e3a9714ce3 Added "/" divider for DATE(TIME)_INPUT_FORMATS for Dutch locale.
Dutch ('nl-NL' and 'nl-BE') has several valid input formats;
see http://nl.wikipedia.org/wiki/Datum_(dagtekening).

Thanks Erik Romijn for review.
2014-05-18 12:49:14 -04:00
Loic Bistuer 1d3d01b4f7 Fixed #22424 -- Fixed handling of default values for TextField/BinaryField on MySQL.
Thanks syphar for the review and suggestions.
2014-05-18 11:58:16 +07:00
Ramiro Morales 862e1ff234 Fixed #22421 -- Regression in fixtures loading.
Loading fixtures were failing since the refactoring in 244e2b71f5 for
inheritance setups where the chain contains abstract models and the
root ancestor contains a M2M relation.

Thanks Stanislas Guerra for the report.

Refs #20946.
2014-05-17 17:36:45 -03:00
Markus Amalthea Magnuson acb20016c0 Fixed #6668 -- Optimized utils.text wrap function
This fixes a failing test after applying an optimization of the
utils.text.wrap function by user SmileyChris.
2014-05-17 20:42:58 +02:00
Alex Gaynor b6b873d2ad Fixed several flake8 errors, including one where a test wouldn't be run 2014-05-17 09:54:34 -07:00
Raphaël Barrois 6aacb4c991 Fixed #22626 -- Allow BinaryField defaults with SQlite.
Also fixes a slight issue in sqlite3.schema._remake_table where
default values where quoted with "column name" quoting rules.

Reference for quoting: http://www.sqlite.org/lang_expr.html

Thanks Shai Berger for the review. Refs #22424.
2014-05-17 22:32:17 +07:00
Baptiste Mispelon a0d5970d44 Fixed contrib.gis tests breaking in some edge cases.
The tests would error out with an ImproperlyConfigured error
if the user had psycopg installed but not geos.
Thanks to mcgohier for the report.
2014-05-17 15:01:06 +02:00
Marc Tamlyn a2dd618e3b Fixed #22648 -- Transform.output_type should respect overridden custom_lookup and custom_transform.
Previously, class lookups from the output_type would be used, but any
changes to custom_lookup or custom_transform would be ignored.
2014-05-17 12:26:15 +02:00