0
0
mirror of https://github.com/django/django.git synced 2024-12-01 15:42:04 +01:00
Commit Graph

17902 Commits

Author SHA1 Message Date
Alex Gaynor
e79725cdf9 Simplified, very slightly, some code in the oracle backend 2014-05-28 17:17:58 -07:00
Andrew Godwin
61185bba72 Merge pull request #2734 from valberg/double_order_trouble
Fixed #22720 -- Migrations attempt to create _order twice.
2014-05-28 17:12:01 -07:00
Víðir Valberg Guðmundsson
bf9953cfb8 Adding test to fix of duplicate _order fields (#22720) 2014-05-29 01:38:59 +02:00
Víðir Valberg Guðmundsson
6cfa2fae39 Fixed #22720 -- Migrations attempt to create _order twice. 2014-05-29 01:00:30 +02:00
Shai Berger
69337d485c Set straight the sense of 'uppercases_column_names' feature flag 2014-05-28 21:16:24 +03:00
Florian Apolloner
7e3cf3cfd2 Fixed constant_time_compare on Python 2.7.7
Python 2.7.7 includes compare_digest in the hmac module, but it requires
both arguments to have the same type. This is usually not a problem on
Python 3 since everything is text, but we have mixed unicode and str on
Python 2 -- hence make sure everything is bytes before feeding it into
compare_digest.
2014-05-28 19:51:39 +02:00
Guillaume Pannatier
32586b0ba4 Fixed #22684 -- Added empty_label option on django.forms.extras.widets.SelectDateWidget
Thanks danielsamuels for the report
2014-05-28 13:23:28 -04:00
Shai Berger
fd427f1fe3 Fixed #22715: Corrected sql for defaults of BinaryField on Oracle with Python3
While at it, fixed a problem in returning empty values
(still with BinaryField/Oracle/Python3).
2014-05-28 18:57:40 +03:00
Claude Paroz
e97b7a2677 Fixed #22714 -- Made contrib.gis use six-provided memoryview type
Thanks Tim Graham for the report.
2014-05-28 09:24:08 +02:00
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