Andrew Godwin
d0b3536964
More schema test fixing
2012-09-17 21:16:36 +01:00
Mike Grouchy
cb1614f7b3
Fixed #18611 -- Display current date/time when running runserver
2012-09-10 13:35:21 +02:00
Carl Meyer
307706d082
Fixed #18545 -- Make the 'no DJANGO_SETTINGS_MODULE' error message more useful.Thanks Nick Coghlan for the report, and Malcolm Tredinnick for review.
2012-09-08 14:26:33 -06:00
Claude Paroz
ae88e73fa6
Replaced some smart_xxx by force_xxx equivalent
...
smart_str/smart_text should only be used when a potential lazy
string should be preserved in the result of the function call.
2012-08-30 15:46:16 +02:00
Aymeric Augustin
723c9a8c6d
[py3] Ported the 'shell' management command.
...
The user module and the execfile function were removed in Python 3.
Thanks Linovia for the report.
2012-08-29 23:44:12 +02:00
Florian Apolloner
3afb5916b2
Fixed #18091 -- Non-ASCII templates break `django-admin.py startproject --template=TEMPLATE`.
...
Thanks to Claude Huchet and Tomáš Ehrlich for the patch.
2012-08-28 23:23:07 +02:00
Claude Paroz
f5ea730dac
Fixed #18843 -- Replaced more special chars in column names (inspectdb)
...
Thanks airstrike for the report.
2012-08-23 22:59:45 +02:00
Claude Paroz
395c6083af
Fixed #12460 -- Improved inspectdb handling of special field names
...
Thanks mihail lukin for the report and elijahr and kgibula for their
work on the patch.
2012-08-23 21:46:57 +02:00
Claude Paroz
4353a6163c
Fixed #18196 -- Improved loaddata error messages.
2012-08-21 21:52:25 +02:00
Claude Paroz
fd58d6c258
Merge walk and find_files in makemessages command
2012-08-21 14:43:37 +02:00
Aymeric Augustin
16ab519f62
[py3] Removed gratuitous use of map/lambda
...
that causes a test failure on Python 3 because map returns an iterator.
2012-08-18 11:55:36 +02:00
Alex Gaynor
52c351a151
Fixed the erorr handling code for missing management commands.
2012-08-15 02:18:11 -07:00
Alex Gaynor
20a7a244d7
Make sure to explicitly close opened files.
2012-08-15 01:21:40 -07:00
Anssi Kääriäinen
4e7f04cdad
[py3] Fixed file.read().decode(), used codecs.open() instead
2012-08-14 16:09:01 +03:00
Aymeric Augustin
0c198b85a3
[py3] Replace filter/lambda by list comprehensions
...
This is more idiomatic and avoids returning a list on Python 2 and
an iterator on Python 3.
2012-08-14 14:31:06 +02:00
Claude Paroz
0dac73ebd7
Removed binary flag to open files for writing text content
2012-08-13 18:23:26 +02:00
Claude Paroz
96a6912ec5
[py3] Fixed compilemessages tests
2012-08-08 23:40:20 +02:00
Claude Paroz
b8e49d70f2
[py3] Replaced raw_input by input
...
The six addition has been borrowed from:
https://bitbucket.org/gutworth/six/changeset/733ef740
2012-08-08 19:53:11 +02:00
Alex Gaynor
4c97101b1f
remove a bunch of unnescesarry iterkeys() calls
2012-08-08 07:33:15 -07:00
Aymeric Augustin
a8b3ddec5f
[py3] Applied minor fixes so the test suite starts
2012-08-07 12:00:22 +02:00
Aymeric Augustin
c5ef65bcf3
[py3] Ported django.utils.encoding.
...
* Renamed smart_unicode to smart_text (but kept the old name under
Python 2 for backwards compatibility).
* Renamed smart_str to smart_bytes.
* Re-introduced smart_str as an alias for smart_text under Python 3
and smart_bytes under Python 2 (which is backwards compatible).
Thus smart_str always returns a str objects.
* Used the new smart_str in a few places where both Python 2 and 3
want a str.
2012-08-07 12:00:22 +02:00
Aymeric Augustin
ee191715ea
[py3] Fixed access to dict keys/values/items.
2012-08-07 12:00:22 +02:00
Marc Tamlyn
a875f612e0
Fixed #18634 -- Don't escape variables in the context for startproject/startapp.
...
The & symbols which can come up in the secret key were
being escaped to &.
2012-07-25 22:24:41 +02:00
Ramiro Morales
f758bdab5e
Fixed #18271 -- Changed stage at which TransactionTestCase flushes DB tables.
...
Previously, the flush was done before the test case execution and now
it is performed after it.
Other changes to the testing infrastructure include:
* TransactionTestCase now doesn't reset autoincrement sequences either
(previous behavior can achieved by using `reset_sequences`.)
With this, no implicit such reset is performed by any of the provided
TestCase classes.
* New ordering of test cases: All unittest tes cases are run first and
doctests are run at the end.
THse changes could be backward-incompatible with test cases that relied
on some kind of state being preserved between tests. Please read the
relevant sections of the release notes and testing documentation for
further details.
Thanks Andreas Pelme for the initial patch. Karen Tracey and Anssi
Kääriäinen for the feedback and Anssi for reviewing.
This also fixes #12408 .
2012-07-24 17:24:16 -03:00
Aymeric Augustin
0d914d08a0
[py3] Updated urllib/urllib2/urlparse imports.
...
Lots of functions were moved. Use explicit imports in all cases
to keey it easy to identify where the functions come from.
2012-07-22 09:29:55 +02:00
Aymeric Augustin
bdca5ea345
[py3] Replaced unicode/str by six.text_type/bytes.
2012-07-22 09:29:54 +02:00
Aymeric Augustin
3cb2457f46
[py3] Replaced basestring by six.string_types.
2012-07-22 09:29:54 +02:00
Aymeric Augustin
cacd845996
[py3] Fixed remaining Python 3 syntax errors.
...
django.utils.unittest.* weren't touched -- they're only imported on Python 2.6.
2012-07-22 09:29:53 +02:00
Claude Paroz
423244bc6b
Fixed #4680 -- Improved initial_sql parsing
...
In particular, allow the '--' sequence to be present in string
values without being interpreted as comment marker.
Thanks Tim Chase for the report and shaleh for the initial patch.
2012-07-21 14:24:29 +02:00
Claude Paroz
c54905b359
Fixed #18479 -- Stopped makemessages raising error on gettext warnings
...
Thanks Niels Busch for the initial patch.
2012-07-18 20:43:35 +02:00
Claude Paroz
8184aff2b0
Fixed #18547 -- Improved error message when gettext is missing
2012-07-17 22:04:47 +02:00
Mike Grouchy
f2abfe1e48
Adds interpreter option to shell command as per ticket #18639
...
Specify python interpreter interface ipython or bpython with the -i,
--interface options
argument.
ex// python manage.py shell -i bpython
ex// python manage.py shell --interface bpython
Like all other options, defaults to default python interpreter when your
selected choice isn't available.
updated documentation where appropriate
2012-07-17 13:45:35 -04:00
Alex Gaynor
76d5daa60f
Changed `manage.py shell`'s help text to reflect that it can invoke bpython.
2012-07-10 14:26:42 -07:00
Claude Paroz
4b722b31e1
Fixed #16317 -- Fixed dumpdata for self-referencing models and natural keys
...
Thanks aldaran for the patch.
2012-06-24 19:54:56 +02:00
Claude Paroz
4a103086d5
Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.
...
Thanks Vinay Sajip for the support of his django3 branch and
Jannis Leidel for the review.
2012-06-07 18:08:47 +02:00
Claude Paroz
6fd1950a4e
Fixed #10200 -- Raised CommandError when errors happen in loaddata.
2012-06-07 10:32:10 +02:00
Claude Paroz
f0664dc8ae
Made TestNoInitialDataLoading pass with MySQL (Refs #15926 )
2012-06-06 13:54:40 +02:00
Honza Kral
fedac99c85
Fixed #15926 -- Added option --no-initial-data to syncdb and flush.
...
Thanks msiedlarek, jpaugh64 and vlinhart!
2012-06-05 16:46:15 +02:00
Ramiro Morales
72130385bf
Made inspectdb tests deal with a smaller generated models.py file.
...
Implemented this by adding a stealth table_name_filter option for the
command.
2012-06-01 21:46:07 -03:00
Claude Paroz
cc4b4d9fd3
Used CommandError in createcachetable command.
...
Raising CommandError whenever a management command meets an error
condition is the standard way to handle errors in commands.
2012-05-27 23:03:21 +02:00
Claude Paroz
f2b6763ad7
Fixed #18387 -- Do not call sys.exit during call_command.
...
Moved sys.exit(1) so as failing management commands reach it
only when running from command line.
2012-05-27 20:38:47 +02:00
Claude Paroz
12f4bd74fc
Removed unneeded sys import added in previous commit
2012-05-26 11:53:33 +02:00
Claude Paroz
3b5083bee5
Fixed #5423 -- Made dumpdata output one row at a time.
...
This should prevent storing all rows in memory when big sets of
data are dumped.
See ticket for heroic contributors.
2012-05-26 11:43:37 +02:00
Claude Paroz
edfa95c22f
Specified when open should use binary mode.
...
Thanks Vinaj Sajip for the help of his django3 branch.
2012-05-25 20:43:43 +02:00
Claude Paroz
822d6d6dab
Fixed #18325 -- Wrapped self.stdout/stderr in OutputWrapper class
2012-05-19 13:51:54 +02:00
Claude Paroz
bb4452f212
Fixed #18019 -- Use threaded runserver only when database supports it.
2012-05-15 09:21:10 +02:00
Claude Paroz
d7dfab59ea
Replaced cStringIO.StringIO by io.BytesIO.
...
Also replaced StringIO.StringIO by BytesIO in some other appropriate
places. StringIO is not available in Python 3.
2012-05-05 21:41:44 +02:00
Claude Paroz
865cd35c9b
Made more extensive usage of context managers with open.
2012-05-05 14:06:36 +02:00
Aymeric Augustin
e84f79f051
Fixed #18042 -- Advanced deprecation warnings.
...
Thanks Ramiro for the patch.
2012-05-03 15:27:01 +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