Commit Graph

18193 Commits

Author SHA1 Message Date
Tim Graham 4b57e203fe Fixed spelling in docs. 2014-05-27 19:46:48 -04:00
Moayad Mardini 2ea1e70b85 Fixed #22601 -- Added a note about model inheritance.
Thanks semenov for the report.
2014-05-27 19:42:16 -04:00
Simon Charette d0f7c7f59a Argument to `reversed` must be a sequence on Py3. 2014-05-27 18:28:13 -04:00
Simon Charette fed2877cf1 Fix a regression introduced by f011b90363.
`django.get_version` was actually used by the module.
2014-05-27 18:23:44 -04:00
Claude Paroz f011b90363 Removed an old compatibility shim added in 1.0 2014-05-27 22:28:49 +02:00
Claude Paroz fe53bc524b Fixed #21630 -- Simplified management command discovery
Thanks Aymeric Augustin for the report end the review.
2014-05-27 22:18:51 +02:00
Aymeric Augustin 4865326f22 Fixed #22699 -- Configure default settings in some management commands.
This makes it possible to run django.setup() in management commands that
don't need a settings module. In addition it simplifies error handling.

Thanks Claude for the review.
2014-05-27 21:43:52 +02:00
Moayad Mardini 2e613ea5c5 Fixed #22675 -- makemigrations --dry-run to output migrations to stdout.
`makemigrations --dry-run` will output the complete migrations file
that would be written if it's used along with `--verbosity 3`.
2014-05-27 00:40:55 +03:00
Marc Tamlyn b625e861e5 Fix an error in a documented lookup example. 2014-05-26 14:44:50 +01:00
Moayad Mardini e98d303562 Fixed #22692 -- Added docs for `makemigrations` two command options.
Added documentation about `--dry-run` and `--merge`.
2014-05-25 19:34:20 -04:00
Tim Graham 83f4e86595 Fixed too short title underline in docs. 2014-05-25 19:26:12 -04:00
Matthew Schinckel 2b432d4634 Fixed typo in docs/ref/models/custom-lookups.txt. 2014-05-25 19:01:51 -04:00
Florian Apolloner ee51ab9d23 Restored Python 2 compatibility. 2014-05-26 00:07:15 +02:00
Florian Apolloner 9d1bf8f841 Removed executeable bit from a few files. 2014-05-25 23:16:40 +02:00
Florian Apolloner 536ebaa048 Fixed a few warnings in the testsuite. 2014-05-25 23:14:50 +02:00
Loic Bistuer 417ec4a68b Fixed a ResourceWarning that wasn't properly fixed by the previous commit.
Also removed unused import in runtests.py.
2014-05-26 04:01:41 +07: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
Claude Paroz b8fc167b32 Fixed #22688 -- Documented ready() may be called more than once 2014-05-24 15:58:57 +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 f47e226ff7 Moved some imports in runtests.py 2014-05-24 13:29:23 +02: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
Claude Paroz 19b4908206 Made runtests.py use 'set_installed_apps' API
This will also trigger the ready method of any tested application,
which was not run before.
2014-05-24 11:02:58 +02:00
Baptiste Mispelon f01d2a8f9b Fixed tuple serialization test.
Thanks to rockallite for the report.
2014-05-23 14:50:10 +02:00
Huu Nguyen f851a954ac Fixed #22602 -- Improved code coverage of makemigrations command tests. 2014-05-23 08:05:46 -04: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
Claude Paroz 756c390fb5 Fixed #20816 -- Added hints about Django middleware ordering
Thanks gthb Trac user for the report, kolypto StackOverflow
user for the initial list and Tim Graham for the review.
2014-05-22 18:33:10 +02:00
Flavio Curella beec05686c Fixed #22667 -- Replaced leader/follower terminology with primary/replica 2014-05-22 11:59:17 -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 635acf42c5 Fix a test dependent on json ordering. 2014-05-22 15:05:19 +01:00
Marc Tamlyn 48348782e6 Added omitted documentation for ArrayField__len. 2014-05-22 13:50:13 +01: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
Claude Paroz d9d9242505 Used link label in models FAQ to ease translation 2014-05-22 09:46:34 +02: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
Niclas Åhdén 64ee097b3b Fixed #22639 -- Added missing imports in docs
Added ModelForm and NON_FIELD_ERRORS imports.
2014-05-21 17:11:01 +02: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
Tim Graham dfeef8e147 Skipped a migrations test that's not supported on MySQL + Python 3. 2014-05-21 06:54:24 -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
Alex Gaynor 8a95b4fca7 Merge pull request #2692 from fcurella/patch-5
#22667 replaced occurrences of master/slave terminology with leader/follower
2014-05-20 09:37:04 -07:00
Flavio Curella 73a57b06f9 replaced occurrences of master/slave terminology with leader/follower 2014-05-20 11:35:16 -05:00