Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for named URLs with parameters #33

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ludwiktrammer
Copy link

It is now possible to pass names of parametrized URLs to
the STRONGHOLD_PUBLIC_NAMED_URLS setting.
Previously it was only possible to use names of URLs that didn't
capture any parameters.
This commit should also have a positive impact on speed.

Ludwik Trammer added 2 commits March 20, 2014 17:32
It is now possible to pass names of parametrized URLs to
the STRONGHOLD_PUBLIC_NAMED_URLS setting.
Previously it was only possible to use names of URLs that didn't
capture any parameters.
This commit should also have a positive impact on speed.
The "resolver_match" is not accessible in the CI testing environment
@ludwiktrammer
Copy link
Author

This feature requires Django 1.5 or newer.

@mgrouchy
Copy link
Owner

I like this, but do you mean 1.6 or newer? I looked at the builds and it looks like before you changed fixed the symptom of the broken test, it was breaking in < 1.6.

@ludwiktrammer
Copy link
Author

No, according to the documentation this should work in Django 1.5.

I will add tests that explicitly check this functionality and we will see.

@ludwiktrammer
Copy link
Author

Luckily the documentation is correct :) This works both in Django 1.5 and 1.6.

I had to add the additional check in cdb3979, because when request happens outside of the usual "url pattern recognition - request - response" cycle (like when you use RequestFactory in tests) Django 1.5 does not set the resolver_match argument at all (Django 1.6 makes it None).

@mgrouchy
Copy link
Owner

Just so you know Im still looking at this, will be looking to get it merged this weekend.

@mgrouchy
Copy link
Owner

Just to let you know, had some stuff that has got into the way of me doing any work on this. I am circling around on this again now. Want to keep 1.4 compat until Django stops issuing updates for Django 1.4, so I will likely reimplement these changes with a check for Django Version.

@mgrouchy
Copy link
Owner

Again :) I am circling around on this again, looks like 1.7 is coming out soon, which means Django will be dropping support for 1.4, and I will likely drop support for 1.4 for new features as well. So I will roll out your PR unchanged, upon release of 1.7.

@ludwiktrammer
Copy link
Author

Sounds great :) Thank you for keeping me updated!

@mgrouchy
Copy link
Owner

No problem :) Been feeling bad this has been just sitting there for so long!

@ludwiktrammer
Copy link
Author

What's the current status on this? :)

@mgrouchy
Copy link
Owner

mgrouchy commented Nov 3, 2014

Hey, Thanks for checking in on this! I am coming to this during the week or this weekend.

Hoping to tackle this ticket and this one #38 .

@ludwiktrammer
Copy link
Author

Cool :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants