Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
wants to merge 70 commits into from

24 participants

Bradley Ayers Bouke Haarsma Tim Graham Claude Paroz Luke Plant Sindre Sorhus Kenneth Reitz Florian Apolloner Aymeric Augustin Audrey Roy Anssi Kääriäinen Adrian Holovaty Simon Charette Jannis Leidel Julien Phalip Daniel Hepper Gabe Jackson Chris Beaven Tim Saylor Daniel Gerzo Alex Gaynor Jannis Bojan Mihelac Dmitry Medvinsky
apollo13 and others added some commits
Florian Apolloner apollo13 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 aaugustin Fixed #18445 -- Added a links in the docs.
Thanks Audrey Roy for the patch.
33999d9
Luke Plant spookylukey Small corrections to committing-code docs f269f30
Aymeric Augustin aaugustin Fixed #18125 -- Explained caveat with filters
Thanks ebrelsford AT gmail.com and oinopion.
06ea10e
Aymeric Augustin aaugustin 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 aaugustin 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 aaugustin Proof-read the new contributing guide.
Many thanks to Daniele Procida.
329bb92
Aymeric Augustin aaugustin Explained an alternative way to fetch a branch.
This avoids adding each contributor as a remote.

Thanks Fruneau for the report.
1f203f8
Aymeric Augustin aaugustin 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 audreyr Revised the text in the 'Using a form in a view' section. 3c05b50
Audrey Roy audreyr Revised the text in the 'Processing the data from a form' section. 7ab6e32
Aymeric Augustin aaugustin Fixed an error in a git command. 7ae6651
Anssi Kääriäinen akaariai Added myself to committers 18aed86
Adrian Holovaty adrianholovaty Fixed #18440 -- Pointed out that ReportLab is not thread safe. Thanks…
…, jens@lundstroem.com
c63c62a
Anssi Kääriäinen akaariai 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 charettes 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 akaariai Cleaned whitespace errors introduced in previous commit a035d9d
Anssi Kääriäinen akaariai 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 claudep 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 claudep 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 claudep Removed test of connection features before setting up databases ef906b1
Claude Paroz claudep 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 claudep Fixed pagination example wrt new next_page_number behavior 514e827
Claude Paroz claudep Fixed #18157 -- Documented that setting PASSWORD_HASHERS can speed up…
… tests
17d6cd9
Claude Paroz claudep Added note about including fixtures hashing algorithm
Refs #18157.
b0d8085
Luke Plant spookylukey Corrected way to get URL of object in admin history template e9497a3
Claude Paroz claudep Fixed #18457 -- Fixed encoding error in yaml deserializer
Thanks jpaugh64 for the report.
1a10a06
Jannis Leidel jezdez 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
claudep and others added some commits
Claude Paroz claudep Fixed #18463 -- Forced type() argument to be a byte string 3dd5d72
Claude Paroz claudep Cleaned up locale-related encoding issues 35f9c2c
Claude Paroz claudep Added missing encoding prefix in localflavor test a7ef802
Claude Paroz claudep Fixed #18461 -- Ensured that last_executed_query returns Unicode
Thanks Anssi Kääriäinen for the review.
e9ef977
Anssi Kääriäinen akaariai 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 claudep 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 claudep Fixed #12140 -- Fixed http.urlencode result for empty lists
Thanks aneil for the report and the initial patch.
fe873e2
Claude Paroz claudep 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 claudep Discovered some geodjango tests with standard mechanism
No need to special case tests discovery for regular first-level
gis tests.
88601ba
Claude Paroz claudep Executed SpatialRefSysTest only with spatial backend 023b704
Luke Plant spookylukey 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 spookylukey IfParser.next() method renamed to avoid confusion with iterator proto…
…col.
fd6a9d3
Claude Paroz
Collaborator

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

Collaborator
Collaborator

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

claudep and others added some commits
Claude Paroz claudep 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 jphalip Skip GeometryFieldTest if there's no spacial database. 1794e36
Julien Phalip jphalip Fixed #18477 -- Fixed colspan value when a TabularInline form contain…
…s validation errors. Thanks to yedpodtrzitko for the report and patch.
1ace912
Julien Phalip jphalip Fixed the path to the admin's compress.py script in the doc. 79ef390
Julien Phalip jphalip Updated the admin's minified JS files. fadcc6d
Julien Phalip jphalip 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 apollo13 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 dhepper Fixed #18450 -- Removed default values for i18n JavaScript URLs in Ad…
…min templates
108f8dd
Daniel Hepper dhepper Fixed #18444 -- Replace hard coded "View on Site" URLs aee9eec
Gabe Jackson gabejackson Fixed #18154 -- Documentation on closing File objects and best practices ffa6d95
Chris Beaven SmileyChris 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 tsaylor Fixed a documentation typo on the widget page. f8ef93a
Daniel Gerzo dgerzo Added support for gdal 1.9. 45a1a54
Claude Paroz claudep Fixed #15271 -- Defined a to_python method for GeometryField
Thanks volrath and copelco for their work on the patch.
41eb70f
Claude Paroz claudep Removed unneeded u prefixes f08fa5b
Luke Plant spookylukey Fixed #17776 - DoesNotExist is not picklable
Thanks to ambv for the report
a54a8ba
Florian Apolloner apollo13 Fixed our HTMLParser patches for python 2.7.4 6bc1b22
Florian Apolloner apollo13 Corrected the `instance_dict` description for form wizards. 7f22588
Alex Gaynor alex Note that Jython has an alpha with 2.7 support. ea9536b
Jannis jnns 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 bmihelac Fixed url translation docs.
``include`` calls shouldn't have a $ sign at the end of the url pattern.
946d3d9
Dmitry Medvinsky dmedvinsky 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 alex Don't use a list comprehension when we don't need the resulting list. e1b74d0
Alex Gaynor alex Switch to using context managers for acquiring and releasing locks. e0fce87
Claude Paroz claudep Fixed #14917 -- Hinted that view should redirect after form post success 19a810b
Claude Paroz claudep Fixed #16317 -- Fixed dumpdata for self-referencing models and natura…
…l keys

Thanks aldaran for the patch.
4b722b3
Bradley Ayers bradleyayers Add a test for #17914 74527ba
Bradley Ayers bradleyayers Add support for reversing namespaced view references. e0cd450
Bradley Ayers bradleyayers When reversing a view reference, choose the first occurrence in the U…
…RLconf rather than the last.
6e845ea
Bradley Ayers bradleyayers 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 7, 2012
  1. Florian Apolloner

    Don't escape object ids when passing to the contenttypes.shortcut view.

    apollo13 authored
    This commit also changes the string pk to string_pk instead of id, to test
    if the admin uses .pk throughout the codebase.
  2. Aymeric Augustin

    Fixed #18445 -- Added a links in the docs.

    aaugustin authored
    Thanks Audrey Roy for the patch.
  3. Luke Plant
Commits on Jun 8, 2012
  1. Aymeric Augustin

    Fixed #18125 -- Explained caveat with filters

    aaugustin authored
    Thanks ebrelsford AT gmail.com and oinopion.
  2. Aymeric Augustin

    Merge pull request #127 from dhepper/master

    aaugustin authored
    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.
  3. Aymeric Augustin

    Merge pull request #123 from apollo13/ticket18381

    aaugustin authored
    Fixed #18381 -- Stopped escaping object ids
    
    when passing them to the contenttypes.shortcut view.
    
    Thanks apollo13 for the patch and dhepper for the review.
  4. Aymeric Augustin

    Proof-read the new contributing guide.

    aaugustin authored
    Many thanks to Daniele Procida.
  5. Aymeric Augustin

    Explained an alternative way to fetch a branch.

    aaugustin authored
    This avoids adding each contributor as a remote.
    
    Thanks Fruneau for the report.
  6. Aymeric Augustin

    Clarified the purpose of the pull requsets docs

    aaugustin authored
    One is for the community, the other for the core team.
    
    Thanks Reinout van Rees for the report.
  7. Audrey Roy Aymeric Augustin
  8. Audrey Roy Aymeric Augustin
  9. Aymeric Augustin
  10. Anssi Kääriäinen

    Added myself to committers

    akaariai authored
  11. Adrian Holovaty
  12. Anssi Kääriäinen

    Used git log instead of git show for last commit's timestamp

    akaariai authored
    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.
  13. Simon Charette Anssi Kääriäinen

    Fixed #18399 – Added a way to get ContentTypes for proxy models

    charettes authored akaariai committed
    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.
  14. Anssi Kääriäinen
  15. Anssi Kääriäinen

    Fixed #16418 -- Made generic views work with ModelForms

    akaariai authored
    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.
Commits on Jun 9, 2012
  1. Claude Paroz

    Fixed #17760 -- Implemented callable database features as cached prop…

    claudep authored
    …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.
  2. Claude Paroz

    Reverted 905e33f, now that DatabaseFeatures does not need confirm

    claudep authored
    Connection.features does not need to be confirmed any more, after
    commit aa42357, rendering obsolete the workaround when using
    TEST_MIRROR (Refs #16885, #17760).
  3. Claude Paroz
  4. Claude Paroz

    Fixed #17159 -- Validated returned number of next|previous_page_number

    claudep authored
    Thanks mehta.apurva at gmail.com for the report and the initial patch
    and neaf for the complete patch.
  5. Claude Paroz
  6. Claude Paroz
  7. Claude Paroz
Commits on Jun 10, 2012
  1. Luke Plant
  2. Claude Paroz

    Fixed #18457 -- Fixed encoding error in yaml deserializer

    claudep authored
    Thanks jpaugh64 for the report.
Commits on Jun 11, 2012
  1. Jannis Leidel

    Fixed #18451 -- Vastly improved class based view documentation.

    jezdez authored
    Many thanks to Daniel Greenfeld, James Aylett, Marc Tamlyn, Simon Williams, Danilo Bargen and Luke Plant for their work on this.
  2. Claude Paroz
Commits on Jun 12, 2012
  1. Claude Paroz
  2. Claude Paroz
Commits on Jun 13, 2012
  1. Claude Paroz

    Fixed #18461 -- Ensured that last_executed_query returns Unicode

    claudep authored
    Thanks Anssi Kääriäinen for the review.
  2. Anssi Kääriäinen

    Fixed connection.queries encoding handling on Oracle

    akaariai authored
    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.
  3. Claude Paroz

    Removed escaping test of query content

    claudep authored
    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.
Commits on Jun 14, 2012
  1. Claude Paroz

    Fixed #12140 -- Fixed http.urlencode result for empty lists

    claudep authored
    Thanks aneil for the report and the initial patch.
  2. Claude Paroz

    Fixed #17754 -- Refactored gis.measure

    claudep authored
    This refactoring does allow much easier MeasureBase subclassing.
    Many thanks to Ricardo di Virgilio for the initial patch.
  3. Claude Paroz

    Discovered some geodjango tests with standard mechanism

    claudep authored
    No need to special case tests discovery for regular first-level
    gis tests.
  4. Claude Paroz
  5. Luke Plant

    Reverted part of 169b1a4 which was mistakenly applied to a non-iterat…

    spookylukey authored
    …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.
  6. Luke Plant
Commits on Jun 15, 2012
  1. Claude Paroz

    Favored text (StringIO) over binary content for deserialization

    claudep authored
    This is also more Python 3 compatible, as the json module in
    Python 3 is expecting text. Thanks Vinay Sajip for noticing it.
Commits on Jun 16, 2012
  1. Julien Phalip
  2. Julien Phalip

    Fixed #18477 -- Fixed colspan value when a TabularInline form contain…

    jphalip authored
    …s validation errors. Thanks to yedpodtrzitko for the report and patch.
  3. Julien Phalip
  4. Julien Phalip
Commits on Jun 17, 2012
  1. Julien Phalip

    Fixed #18420 -- Prevented the admin JS from crashing when the main fo…

    jphalip authored
    …rm contains no field. Thanks to maciej.maciaszek for the report and patch.
  2. Florian Apolloner

    Fixed GIS testsuite.

    apollo13 authored
    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.
Commits on Jun 18, 2012
  1. Daniel Hepper Florian Apolloner

    Fixed #18450 -- Removed default values for i18n JavaScript URLs in Ad…

    dhepper authored apollo13 committed
    …min templates
  2. Daniel Hepper Florian Apolloner

    Fixed #18444 -- Replace hard coded "View on Site" URLs

    dhepper authored apollo13 committed
  3. Gabe Jackson Chris Beaven
  4. Chris Beaven

    Fixed #14502 again -- saner verbatim closing token

    SmileyChris authored
    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.
Commits on Jun 19, 2012
  1. Tim Saylor Florian Apolloner

    Fixed a documentation typo on the widget page.

    tsaylor authored apollo13 committed
  2. Daniel Gerzo Florian Apolloner

    Added support for gdal 1.9.

    dgerzo authored apollo13 committed
  3. Claude Paroz

    Fixed #15271 -- Defined a to_python method for GeometryField

    claudep authored
    Thanks volrath and copelco for their work on the patch.
  4. Claude Paroz

    Removed unneeded u prefixes

    claudep authored
Commits on Jun 22, 2012
  1. Luke Plant

    Fixed #17776 - DoesNotExist is not picklable

    spookylukey authored
    Thanks to ambv for the report
  2. Florian Apolloner
  3. Florian Apolloner
Commits on Jun 23, 2012
  1. Alex Gaynor
  2. Jannis Florian Apolloner

    Updated TEMPLATE_CONTEXT_PROCESSORS defaults in the docs.

    jnns authored apollo13 committed
    django.core.context_processors.tz was missing from default
    TEMPLATE_CONTEXT_PROCESSORS in the template api documentation.
  3. Bojan Mihelac Florian Apolloner

    Fixed url translation docs.

    bmihelac authored apollo13 committed
    ``include`` calls shouldn't have a $ sign at the end of the url pattern.
  4. Dmitry Medvinsky Florian Apolloner

    Fixed #18454 -- Added ability to pass a list of signals to `receiver`.

    dmedvinsky authored apollo13 committed
    Added ability to use receiver decorator in the following way:
    
        @receiver([post_save, post_delete], sender=MyModel)
        def signals_receiver(sender, **kwargs):
            ...
  5. Alex Gaynor
  6. Alex Gaynor
  7. Claude Paroz
Commits on Jun 24, 2012
  1. Claude Paroz

    Fixed #16317 -- Fixed dumpdata for self-referencing models and natura…

    claudep authored
    …l keys
    
    Thanks aldaran for the patch.
Commits on Jun 25, 2012
  1. Bradley Ayers

    Add a test for #17914

    bradleyayers authored
  2. Bradley Ayers
Commits on Jun 26, 2012
  1. Bradley Ayers

    When reversing a view reference, choose the first occurrence in the U…

    bradleyayers authored
    …RLconf rather than the last.
  2. Bradley Ayers
Something went wrong with that request. Please try again.