Commit Graph

7491 Commits

Author SHA1 Message Date
Claude Paroz 865cd35c9b Made more extensive usage of context managers with open. 2012-05-05 14:06:36 +02:00
Claude Paroz 11a5355517 Inserted more simplefilter calls to be sure warnings are emitted.
Thanks to Florian Apolloner for suggesting the patch.
2012-05-03 21:31:23 +02:00
Claude Paroz 00c0d3c44e Made warning assertions work with or without -Wall python switch 2012-05-03 20:18:05 +02:00
Claude Paroz 10cf3c6427 Used catch_warnings instead of save/restore methods. Refs #17049. 2012-05-03 18:30:07 +02:00
Claude Paroz b52672d778 Replaced deprecated TestCase methods. Refs #17049. 2012-05-03 16:39:16 +02:00
Aymeric Augustin e84f79f051 Fixed #18042 -- Advanced deprecation warnings.
Thanks Ramiro for the patch.
2012-05-03 15:27:01 +02:00
Karen Tracey b86a00187d Merge pull request #28 from akaariai/ticket_18163
Ticket 18163 - use faster password hasher in tests.
2012-05-02 16:06:00 -07:00
Aymeric Augustin 46b082e05c Fixed #17742 -- Handled aware datetimes in DateField
Converted aware datetimes to the default time zone before using them
in the context of a DateField.
2012-05-01 11:29:55 +02:00
Anssi Kääriäinen 4fdd378beb Skip model validation when models are known good.
In some situations Django calls model validation when the models are
already known good. This is most visible in tests, which use flush
and loaddata commands. This resulted in around 10% overhead when
running tests under sqlite.
2012-05-01 08:40:04 +03:00
Anssi Kääriäinen 8fad77da95 Ensured tests pass using custom PASSWORD_HASHERS. 2012-04-30 22:10:27 +03:00
Anssi Kääriäinen 2a09404792 Reset password hashers cache on settings_changed. 2012-04-30 22:10:27 +03:00
Aymeric Augustin ddfc7c2530 Fixed #4746 -- Allowed spaces around filter separator. 2012-04-30 21:01:06 +02:00
Aymeric Augustin 78ba9670af Fixed #18217 -- Time zone support in generic views
Introduced a distinct implementation depending on the type of the
date field (DateField or DateTimeField), and applied appropriate
conversions is the latter case, when time zone support is enabled.
2012-04-30 20:48:19 +02:00
Claude Paroz 596cb9c7e2 Replaced print statement by print function (forward compatibility syntax). 2012-04-30 20:45:03 +02:00
Aymeric Augustin 3d842a0a94 Merge branch 'master' of github.com:django/django 2012-04-30 17:50:22 +02:00
Anssi Kääriäinen 4b11762f7d Fixed SortedDict.__copy__()
Fixed #18175 -- Calling SortedDict.__copy__() resulted in changes to
the original dictionary. The reason was likely related to subclassing
dict.

Thanks to linovia for report and patch.
2012-04-30 17:19:55 +03:00
Alex Gaynor aa1aa1ad41 Fix a typo in a comment. 2012-04-30 10:15:36 -04:00
Aymeric Augustin e4d4cb6130 Simplified date-based generic views.
Removed a confusing helper function that was confusing -- it used
last_day to store the first day of the next month.
2012-04-30 14:45:25 +02:00
Anssi Kääriäinen a18e43c5bb Made get_indexes() consistent across backends.
Fixed #15933, #18082 -- the get_indexes() method introspection was
done inconsitently depending on the backend. For example SQLite
included all the columns in the table in the returned dictionary,
while MySQL introspected also multicolumn indexes.

All backends return now consistenly only single-column indexes.

Thanks to andi for the MySQL report, and ikelly for comments on
Oracle's get_indexes() changes.
2012-04-30 14:30:29 +03:00
Claude Paroz eba4197c71 Fixed #18240 -- Made admindocs tests pass even when language is not en.
Thanks miguel.ventura@gmail.com for the report and the patch.
2012-04-30 09:41:59 +02:00
Alex Gaynor d5a277ba4d Switch a datastructure internal to the ORM to be a set, instead of a dictionary. 2012-04-29 22:18:30 -04:00
Adrian Holovaty 6ff118cdb9 Fixed #17644 -- Changed Query.alias_map to use namedtuples
This makes the code easier to understand and may even have a benefit in memory usage (namedtuples instead of dicts). Thanks, lrekucki and akaariai
2012-04-29 17:50:48 -05:00
Claude Paroz 3904b74a3f Fixed #18013 -- Use the new 'as' syntax for exceptions.
Thanks Clueless for the initial patch.
Note that unittest has been purposely left out (external package only used by Python 2.6).
2012-04-29 20:57:15 +02:00
Claude Paroz eefb00f301 Fixed #18220 -- Removed the CACHE_BACKEND setting, as per official deprecation timeline.
Thanks Ramiro Morales for the review.
2012-04-29 20:47:36 +02:00
Adrian Holovaty 5b644a5464 Moved version code out of __init__.py.
Moved everything except VERSION and a get_version() stub out of the top-level __init__.py, so that we're not importing all that stuff all the time. And because it's cleaner.
2012-04-29 13:44:32 -05:00
Anssi Kääriäinen 76c3314b6d Removed unused variable from sql/query.py 2012-04-29 21:23:38 +03:00
Aymeric Augustin cec6bd5a59 Fixed #18023 -- Removed bundled simplejson.
And started the deprecation path for django.utils.simplejson.

Thanks Alex Ogier, Clueless, and other contributors for their
work on the patch.
2012-04-29 19:58:00 +02:00
Anssi Kääriäinen 584e2c0337 Prevent Oracle from changing field.null to True
Fixed #17957 -- when using Oracle and character fields, the fields
were set null = True to ease the handling of empty strings. This
caused problems when using multiple databases from different vendors,
or when the character field happened to be also a primary key.

The handling was changed so that NOT NULL is not emitted on Oracle
even if field.null = False, and field.null is not touched otherwise.

Thanks to bhuztez for the report, ramiro for triaging & comments,
ikelly for the patch and alex for reviewing.
2012-04-29 19:25:46 +03:00
Aymeric Augustin a15cfb2e45 Simplified timezones tests with settings_changed.
All relevant state is now properly reset whenever TIME_ZONE or USE_TZ
are changed in tests.
2012-04-29 16:03:46 +02:00
Aymeric Augustin 3e8b40f479 Fixed #17992 -- Added a public API for localtime.
Thanks Bradley Ayers for the report.
2012-04-29 15:37:23 +02:00
Anssi Kääriäinen 5aa51fa999 Simplified QuerySet field.null handling
QuerySet had previously some complex logic for dealing with nullable
fields in negated add_filter() calls. It seems the logic is leftover
from a time where the WhereNode wasn't as intelligent in handling
field__in=[] conditions.

Thanks to aaugustin for comments on the patch.
2012-04-29 16:27:25 +03:00
Aymeric Augustin 9350d1d59c Fixed #17976 -- Made forms.BooleanField pickleable.
This was a regression in Django 1.4.
Thanks bronger for the report and claudep for the patch.
2012-04-29 14:25:06 +02:00
Aymeric Augustin 02a5b41db4 Fixed #18224 -- Changed the dev version number.
Following the move from SVN to git.
2012-04-29 13:40:10 +02:00
Aymeric Augustin 905bd7fb44 Fixed #13196 -- Formatting in admin changelists.
Handled values returned by functions more like field values.
In particular, localized dates, times and datetimes properly,
and converted datetimes to the current timezone.
2012-04-29 11:51:12 +02:00
Mike Yumatov b1be28554f Fixed template syntax error, introduced in pull request #17 2012-04-29 11:03:12 +04:00
Aviral Dasgupta 9bea857957 Fixed #17967: Hide "Change Password" link in admin if user.has_usable_password is False. 2012-04-29 07:36:50 +05:30
Adrian Holovaty 97c8992840 Merge pull request #16 from akaariai/ticket_18218
Made table_names() output sorted.
2012-04-28 17:19:49 -07:00
Karen Tracey 75743c189d Fixed #18234: Avoided exception on flatpage add 2012-04-28 19:44:14 -04:00
Anssi Kääriäinen 527cce80dc Made table_names() output sorted.
Fixed #18218 -- previously Django's introspection table_names() and
get_table_list() methods did not sort the output consistently. This
resulted in random order of inspected models.

This commit also removed all external usages of get_table_list().
table_names() should be used instead.

Thanks to claudep for patch and report.
2012-04-29 02:11:55 +03:00
Adrian Holovaty c2055ee161 Merge pull request #14 from matthewwithanm/js-i18n-patch-2
Corrected i18n javascript_catalog Reference Error
2012-04-28 14:40:07 -07:00
Matthew Tretter 97502a96f4 Correct reference error (undefined variable) 2012-04-28 15:32:22 -04:00
Adrian Holovaty 50b0984a8b Merge pull request #2 from notcarl/master
Changed phone2numeric to use generator expressions instead of lambdas
2012-04-28 12:11:56 -07:00
Not Carl 6b430b883f Whitespace formatting 2012-04-28 14:58:11 -04:00
Tom Terrace a0d34348dd fix typo: instanciating -> instantiating 2012-04-28 14:18:16 -03:00
Not Carl a7829f3334 forgot the allow_lazy(phone2numeric) 2012-04-28 03:33:37 -04:00
Not Carl cfe552ccb3 Modified phone2numeric to not use regular expression or lambdas 2012-04-28 03:29:42 -04:00
Adrian Holovaty f4cc782711 Updated unique-messages.py to reference Git instead of SVN 2012-04-27 23:05:13 -05:00
Adrian Holovaty 21f11e5280 Updated compilemessages and makemessages management commands to change SVN->Git references 2012-04-27 22:37:59 -05:00
Claude Paroz ddc5d59c6a Fixed #15076 -- Quoted ForeignKey target class names in inspectdb when class is defined below.
Thanks saschwarz for the report, jeff@deserettechnology.com for the initial patch and Ramiro Morales for the review. 


git-svn-id: http://code.djangoproject.com/svn/django/trunk@17942 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-27 06:56:31 +00:00
Claude Paroz c34d069a75 Removed direct print statements from django management commands.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17941 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-26 19:56:20 +00:00