Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Fixed #17914 — reverse() does not support namespaced view references #174

Closed
wants to merge 70 commits into from
and others added some commits June 07, 2012
Florian Apolloner Don't escape object ids when passing to the contenttypes.shortcut view.
This commit also changes the string pk to string_pk instead of id, to test
if the admin uses .pk throughout the codebase.
e1643e3
Aymeric Augustin Fixed #18445 -- Added a links in the docs.
Thanks Audrey Roy for the patch.
33999d9
Luke Plant Small corrections to committing-code docs f269f30
Aymeric Augustin Fixed #18125 -- Explained caveat with filters
Thanks ebrelsford AT gmail.com and oinopion.
06ea10e
Aymeric Augustin Merge pull request #127 from dhepper/master
Fixed #18433 -- Fixed "View on Site" link in inline admin for models with custom PK

Thanks dhepper for the patch and apollo13 for the review.
c172951
Aymeric Augustin Merge pull request #123 from apollo13/ticket18381
Fixed #18381 -- Stopped escaping object ids

when passing them to the contenttypes.shortcut view.

Thanks apollo13 for the patch and dhepper for the review.
23d230f
Aymeric Augustin Proof-read the new contributing guide.
Many thanks to Daniele Procida.
329bb92
Aymeric Augustin Explained an alternative way to fetch a branch.
This avoids adding each contributor as a remote.

Thanks Fruneau for the report.
1f203f8
Aymeric Augustin Clarified the purpose of the pull requsets docs
One is for the community, the other for the core team.

Thanks Reinout van Rees for the report.
d2ad3b0
Audrey Roy Revised the text in the 'Using a form in a view' section. 3c05b50
Audrey Roy Revised the text in the 'Processing the data from a form' section. 7ab6e32
Aymeric Augustin Fixed an error in a git command. 7ae6651
Anssi Kääriäinen Added myself to committers 18aed86
Adrian Holovaty Fixed #18440 -- Pointed out that ReportLab is not thread safe. Thanks…
…, jens@lundstroem.com
c63c62a
Anssi Kääriäinen Used git log instead of git show for last commit's timestamp
The reason for this was that git show included the whole changeset in
the output, but only the UTC timestamp was needed. By using git log
it is possible to get just the timestamp. The whole changeset can be
large, and can cause unicode encoding errors.
9098504
Simon Charette Fixed #18399 – Added a way to get ContentTypes for proxy models
Added kwargs for_concrete_model and for_concrete_models to ContentType
methods get_for_model() and get_for_models(). By setting the flag to
False, it is possible to get the contenttype for proxy models.
b6d533a
Anssi Kääriäinen Cleaned whitespace errors introduced in previous commit a035d9d
Anssi Kääriäinen Fixed #16418 -- Made generic views work with ModelForms
Generic views assumed any object's _meta will be model Options. This
is not true for ModelForms for example. Took isinstance(obj, Model)
in use instead.
484fcd3
Claude Paroz Fixed #17760 -- Implemented callable database features as cached prop…
…erties

This does remove the requirement to call features.confirm() method
before checking the properties.
Thanks cdestiger and Ramiro Morales for their work on the patch.
aa42357
Claude Paroz Reverted 905e33f, now that DatabaseFeatures does not need confirm
Connection.features does not need to be confirmed any more, after
commit aa42357, rendering obsolete the workaround when using
TEST_MIRROR (Refs #16885, #17760).
ad47364
Claude Paroz Removed test of connection features before setting up databases ef906b1
Claude Paroz Fixed #17159 -- Validated returned number of next|previous_page_number
Thanks mehta.apurva at gmail.com for the report and the initial patch
and neaf for the complete patch.
fc40a65
Claude Paroz Fixed pagination example wrt new next_page_number behavior 514e827
Claude Paroz Fixed #18157 -- Documented that setting PASSWORD_HASHERS can speed up…
… tests
17d6cd9
Claude Paroz Added note about including fixtures hashing algorithm
Refs #18157.
b0d8085
Luke Plant Corrected way to get URL of object in admin history template e9497a3
Claude Paroz Fixed #18457 -- Fixed encoding error in yaml deserializer
Thanks jpaugh64 for the report.
1a10a06
Jannis Leidel Fixed #18451 -- Vastly improved class based view documentation.
Many thanks to Daniel Greenfeld, James Aylett, Marc Tamlyn, Simon Williams, Danilo Bargen and Luke Plant for their work on this.
c4c7fbc
and others added some commits June 11, 2012
Claude Paroz Fixed #18463 -- Forced type() argument to be a byte string 3dd5d72
Claude Paroz Cleaned up locale-related encoding issues 35f9c2c
Claude Paroz Added missing encoding prefix in localflavor test a7ef802
Claude Paroz Fixed #18461 -- Ensured that last_executed_query returns Unicode
Thanks Anssi Kääriäinen for the review.
e9ef977
Anssi Kääriäinen Fixed connection.queries encoding handling on Oracle
In addition, removed a possibly problematic .filter() call from
backends.test_query_encoding test. It is possible the .filter could
cause collation problems on MySQL, and as it wasn't absolutely needed
for the test it seemed better to get rid of the call.

Refs #18461.
86c20e3
Claude Paroz Removed escaping test of query content
As the content of last_executed_query() is not under Django's control
for most backends, it is useless to test too specific aspects of it.
a2022da
Claude Paroz Fixed #12140 -- Fixed http.urlencode result for empty lists
Thanks aneil for the report and the initial patch.
fe873e2
Claude Paroz Fixed #17754 -- Refactored gis.measure
This refactoring does allow much easier MeasureBase subclassing.
Many thanks to Ricardo di Virgilio for the initial patch.
4d46106
Claude Paroz Discovered some geodjango tests with standard mechanism
No need to special case tests discovery for regular first-level
gis tests.
88601ba
Claude Paroz Executed SpatialRefSysTest only with spatial backend 023b704
Luke Plant Reverted part of 169b1a4 which was mistakenly applied to a non-iterat…
…or class.

Doing next(IfParser()) works for Python 2.7, because it calls
IfParser.next(), but in Python 3 will call IfParser.__next__() which does
not work since it is not an iterator and does not have that method.
edee20f
Luke Plant IfParser.next() method renamed to avoid confusion with iterator proto…
…col.
fd6a9d3
Claude Paroz
Owner

Thanks Luke for fixing it and sorry for the confusion I made.

Owner
Owner

No, no, that's fine. That's collaborate work, isn't it? :-)

and others added some commits June 15, 2012
Claude Paroz Favored text (StringIO) over binary content for deserialization
This is also more Python 3 compatible, as the json module in
Python 3 is expecting text. Thanks Vinay Sajip for noticing it.
5bdd0d6
Julien Phalip Skip GeometryFieldTest if there's no spacial database. 1794e36
Julien Phalip Fixed #18477 -- Fixed colspan value when a TabularInline form contain…
…s validation errors. Thanks to yedpodtrzitko for the report and patch.
1ace912
Julien Phalip Fixed the path to the admin's compress.py script in the doc. 79ef390
Julien Phalip Updated the admin's minified JS files. fadcc6d
Julien Phalip Fixed #18420 -- Prevented the admin JS from crashing when the main fo…
…rm contains no field. Thanks to maciej.maciaszek for the report and patch.
d708298
Florian Apolloner Fixed GIS testsuite.
Moved HAS_SPATIALREFSYS back into the tests namespace since it only operates
on the default database and isn't a global flag like HAS_GDAL.
ac1b9ae
Daniel Hepper Fixed #18450 -- Removed default values for i18n JavaScript URLs in Ad…
…min templates
108f8dd
Daniel Hepper Fixed #18444 -- Replace hard coded "View on Site" URLs aee9eec
Gabe Jackson Fixed #18154 -- Documentation on closing File objects and best practices ffa6d95
Chris Beaven Fixed #14502 again -- saner verbatim closing token
Previously, the closing token for the verbatim tag was specified as the
first argument of the opening token. As pointed out by Jannis, this is
a rather major departure from the core tag standard.

The new method reflects how you can give a specific closing name to
{% block %} tags.
c57ba67
Tim Saylor Fixed a documentation typo on the widget page. f8ef93a
Daniel Gerzo Added support for gdal 1.9. 45a1a54
Claude Paroz Fixed #15271 -- Defined a to_python method for GeometryField
Thanks volrath and copelco for their work on the patch.
41eb70f
Claude Paroz Removed unneeded u prefixes f08fa5b
Luke Plant Fixed #17776 - DoesNotExist is not picklable
Thanks to ambv for the report
a54a8ba
Florian Apolloner Fixed our HTMLParser patches for python 2.7.4 6bc1b22
Florian Apolloner Corrected the `instance_dict` description for form wizards. 7f22588
Alex Gaynor Note that Jython has an alpha with 2.7 support. ea9536b
Jannis Updated TEMPLATE_CONTEXT_PROCESSORS defaults in the docs.
django.core.context_processors.tz was missing from default
TEMPLATE_CONTEXT_PROCESSORS in the template api documentation.
c864b36
Bojan Mihelac Fixed url translation docs.
``include`` calls shouldn't have a $ sign at the end of the url pattern.
946d3d9
Dmitry Medvinsky Fixed #18454 -- Added ability to pass a list of signals to `receiver`.
Added ability to use receiver decorator in the following way:

    @receiver([post_save, post_delete], sender=MyModel)
    def signals_receiver(sender, **kwargs):
        ...
d4da083
Alex Gaynor Don't use a list comprehension when we don't need the resulting list. e1b74d0
Alex Gaynor Switch to using context managers for acquiring and releasing locks. e0fce87
Claude Paroz Fixed #14917 -- Hinted that view should redirect after form post success 19a810b
Claude Paroz Fixed #16317 -- Fixed dumpdata for self-referencing models and natura…
…l keys

Thanks aldaran for the patch.
4b722b3
Bradley Ayers Add a test for #17914 74527ba
Bradley Ayers Add support for reversing namespaced view references. e0cd450
Bradley Ayers When reversing a view reference, choose the first occurrence in the U…
…RLconf rather than the last.
6e845ea
Bradley Ayers Only propagate callables from resolver.reverse_dict to parents, rathe…
…r than everything.
079e93e
Bouke Haarsma

This PR has gotten quite polluted; could you update the PR to only include commits relevant to the ticket?

Tim Graham
Owner

This PR needs to be reworked so it doesn't include unrelated commits (caused by when someone accidentally force pushed to (django/django)). There have also been a lot of changes in the last 2 years so the PR probably needs updating.

Tim Graham timgraham closed this February 07, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 70 unique commits by 20 authors.

Jun 07, 2012
Florian Apolloner Don't escape object ids when passing to the contenttypes.shortcut view.
This commit also changes the string pk to string_pk instead of id, to test
if the admin uses .pk throughout the codebase.
e1643e3
Aymeric Augustin Fixed #18445 -- Added a links in the docs.
Thanks Audrey Roy for the patch.
33999d9
Jun 08, 2012
Luke Plant Small corrections to committing-code docs f269f30
Aymeric Augustin Fixed #18125 -- Explained caveat with filters
Thanks ebrelsford AT gmail.com and oinopion.
06ea10e
Aymeric Augustin Merge pull request #127 from dhepper/master
Fixed #18433 -- Fixed "View on Site" link in inline admin for models with custom PK

Thanks dhepper for the patch and apollo13 for the review.
c172951
Aymeric Augustin Merge pull request #123 from apollo13/ticket18381
Fixed #18381 -- Stopped escaping object ids

when passing them to the contenttypes.shortcut view.

Thanks apollo13 for the patch and dhepper for the review.
23d230f
Aymeric Augustin Proof-read the new contributing guide.
Many thanks to Daniele Procida.
329bb92
Aymeric Augustin Explained an alternative way to fetch a branch.
This avoids adding each contributor as a remote.

Thanks Fruneau for the report.
1f203f8
Aymeric Augustin Clarified the purpose of the pull requsets docs
One is for the community, the other for the core team.

Thanks Reinout van Rees for the report.
d2ad3b0
Audrey Roy Revised the text in the 'Using a form in a view' section. 3c05b50
Audrey Roy Revised the text in the 'Processing the data from a form' section. 7ab6e32
Aymeric Augustin Fixed an error in a git command. 7ae6651
Anssi Kääriäinen Added myself to committers 18aed86
Adrian Holovaty Fixed #18440 -- Pointed out that ReportLab is not thread safe. Thanks…
…, jens@lundstroem.com
c63c62a
Anssi Kääriäinen Used git log instead of git show for last commit's timestamp
The reason for this was that git show included the whole changeset in
the output, but only the UTC timestamp was needed. By using git log
it is possible to get just the timestamp. The whole changeset can be
large, and can cause unicode encoding errors.
9098504
Simon Charette Fixed #18399 – Added a way to get ContentTypes for proxy models
Added kwargs for_concrete_model and for_concrete_models to ContentType
methods get_for_model() and get_for_models(). By setting the flag to
False, it is possible to get the contenttype for proxy models.
b6d533a
Anssi Kääriäinen Cleaned whitespace errors introduced in previous commit a035d9d
Jun 09, 2012
Anssi Kääriäinen Fixed #16418 -- Made generic views work with ModelForms
Generic views assumed any object's _meta will be model Options. This
is not true for ModelForms for example. Took isinstance(obj, Model)
in use instead.
484fcd3
Claude Paroz Fixed #17760 -- Implemented callable database features as cached prop…
…erties

This does remove the requirement to call features.confirm() method
before checking the properties.
Thanks cdestiger and Ramiro Morales for their work on the patch.
aa42357
Claude Paroz Reverted 905e33f, now that DatabaseFeatures does not need confirm
Connection.features does not need to be confirmed any more, after
commit aa42357, rendering obsolete the workaround when using
TEST_MIRROR (Refs #16885, #17760).
ad47364
Claude Paroz Removed test of connection features before setting up databases ef906b1
Claude Paroz Fixed #17159 -- Validated returned number of next|previous_page_number
Thanks mehta.apurva at gmail.com for the report and the initial patch
and neaf for the complete patch.
fc40a65
Claude Paroz Fixed pagination example wrt new next_page_number behavior 514e827
Claude Paroz Fixed #18157 -- Documented that setting PASSWORD_HASHERS can speed up…
… tests
17d6cd9
Claude Paroz Added note about including fixtures hashing algorithm
Refs #18157.
b0d8085
Jun 10, 2012
Luke Plant Corrected way to get URL of object in admin history template e9497a3
Claude Paroz Fixed #18457 -- Fixed encoding error in yaml deserializer
Thanks jpaugh64 for the report.
1a10a06
Jun 11, 2012
Jannis Leidel Fixed #18451 -- Vastly improved class based view documentation.
Many thanks to Daniel Greenfeld, James Aylett, Marc Tamlyn, Simon Williams, Danilo Bargen and Luke Plant for their work on this.
c4c7fbc
Claude Paroz Fixed #18463 -- Forced type() argument to be a byte string 3dd5d72
Jun 12, 2012
Claude Paroz Cleaned up locale-related encoding issues 35f9c2c
Claude Paroz Added missing encoding prefix in localflavor test a7ef802
Jun 13, 2012
Claude Paroz Fixed #18461 -- Ensured that last_executed_query returns Unicode
Thanks Anssi Kääriäinen for the review.
e9ef977
Anssi Kääriäinen Fixed connection.queries encoding handling on Oracle
In addition, removed a possibly problematic .filter() call from
backends.test_query_encoding test. It is possible the .filter could
cause collation problems on MySQL, and as it wasn't absolutely needed
for the test it seemed better to get rid of the call.

Refs #18461.
86c20e3
Claude Paroz Removed escaping test of query content
As the content of last_executed_query() is not under Django's control
for most backends, it is useless to test too specific aspects of it.
a2022da
Jun 14, 2012
Claude Paroz Fixed #12140 -- Fixed http.urlencode result for empty lists
Thanks aneil for the report and the initial patch.
fe873e2
Claude Paroz Fixed #17754 -- Refactored gis.measure
This refactoring does allow much easier MeasureBase subclassing.
Many thanks to Ricardo di Virgilio for the initial patch.
4d46106
Claude Paroz Discovered some geodjango tests with standard mechanism
No need to special case tests discovery for regular first-level
gis tests.
88601ba
Claude Paroz Executed SpatialRefSysTest only with spatial backend 023b704
Luke Plant Reverted part of 169b1a4 which was mistakenly applied to a non-iterat…
…or class.

Doing next(IfParser()) works for Python 2.7, because it calls
IfParser.next(), but in Python 3 will call IfParser.__next__() which does
not work since it is not an iterator and does not have that method.
edee20f
Luke Plant IfParser.next() method renamed to avoid confusion with iterator proto…
…col.
fd6a9d3
Jun 15, 2012
Claude Paroz Favored text (StringIO) over binary content for deserialization
This is also more Python 3 compatible, as the json module in
Python 3 is expecting text. Thanks Vinay Sajip for noticing it.
5bdd0d6
Jun 16, 2012
Julien Phalip Skip GeometryFieldTest if there's no spacial database. 1794e36
Julien Phalip Fixed #18477 -- Fixed colspan value when a TabularInline form contain…
…s validation errors. Thanks to yedpodtrzitko for the report and patch.
1ace912
Julien Phalip Fixed the path to the admin's compress.py script in the doc. 79ef390
Julien Phalip Updated the admin's minified JS files. fadcc6d
Julien Phalip Fixed #18420 -- Prevented the admin JS from crashing when the main fo…
…rm contains no field. Thanks to maciej.maciaszek for the report and patch.
d708298
Jun 17, 2012
Florian Apolloner Fixed GIS testsuite.
Moved HAS_SPATIALREFSYS back into the tests namespace since it only operates
on the default database and isn't a global flag like HAS_GDAL.
ac1b9ae
Jun 18, 2012
Daniel Hepper Fixed #18450 -- Removed default values for i18n JavaScript URLs in Ad…
…min templates
108f8dd
Daniel Hepper Fixed #18444 -- Replace hard coded "View on Site" URLs aee9eec
Jun 19, 2012
Gabe Jackson Fixed #18154 -- Documentation on closing File objects and best practices ffa6d95
Chris Beaven Fixed #14502 again -- saner verbatim closing token
Previously, the closing token for the verbatim tag was specified as the
first argument of the opening token. As pointed out by Jannis, this is
a rather major departure from the core tag standard.

The new method reflects how you can give a specific closing name to
{% block %} tags.
c57ba67
Tim Saylor Fixed a documentation typo on the widget page. f8ef93a
Daniel Gerzo Added support for gdal 1.9. 45a1a54
Claude Paroz Fixed #15271 -- Defined a to_python method for GeometryField
Thanks volrath and copelco for their work on the patch.
41eb70f
Claude Paroz Removed unneeded u prefixes f08fa5b
Jun 22, 2012
Luke Plant Fixed #17776 - DoesNotExist is not picklable
Thanks to ambv for the report
a54a8ba
Florian Apolloner Fixed our HTMLParser patches for python 2.7.4 6bc1b22
Florian Apolloner Corrected the `instance_dict` description for form wizards. 7f22588
Alex Gaynor Note that Jython has an alpha with 2.7 support. ea9536b
Jun 23, 2012
Jannis Updated TEMPLATE_CONTEXT_PROCESSORS defaults in the docs.
django.core.context_processors.tz was missing from default
TEMPLATE_CONTEXT_PROCESSORS in the template api documentation.
c864b36
Bojan Mihelac Fixed url translation docs.
``include`` calls shouldn't have a $ sign at the end of the url pattern.
946d3d9
Dmitry Medvinsky Fixed #18454 -- Added ability to pass a list of signals to `receiver`.
Added ability to use receiver decorator in the following way:

    @receiver([post_save, post_delete], sender=MyModel)
    def signals_receiver(sender, **kwargs):
        ...
d4da083
Alex Gaynor Don't use a list comprehension when we don't need the resulting list. e1b74d0
Alex Gaynor Switch to using context managers for acquiring and releasing locks. e0fce87
Claude Paroz Fixed #14917 -- Hinted that view should redirect after form post success 19a810b
Jun 24, 2012
Claude Paroz Fixed #16317 -- Fixed dumpdata for self-referencing models and natura…
…l keys

Thanks aldaran for the patch.
4b722b3
Jun 25, 2012
Bradley Ayers Add a test for #17914 74527ba
Bradley Ayers Add support for reversing namespaced view references. e0cd450
Jun 26, 2012
Bradley Ayers When reversing a view reference, choose the first occurrence in the U…
…RLconf rather than the last.
6e845ea
Bradley Ayers Only propagate callables from resolver.reverse_dict to parents, rathe…
…r than everything.
079e93e
Something went wrong with that request. Please try again.