-
Notifications
You must be signed in to change notification settings - Fork 134
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
fix #257 and test various url patterns #258
Conversation
Sorry can't accept it there's probably a ton of symbols that can brake Admin, besides, it seems that a URL resolution makes no sense in Admin at all. |
1 similar comment
@idlesign What do you mean by that? If other symbols would break the Admin (I will try that), we need to try different approach to fix this. But I don't think, that it is acceptable that any value would break the admin in such way, that the user can't fix his mistake it anymore. I am probably missing the point of the |
@idlesign And no, any other symbol that I tried, didn't break the admin, I tried: |
@idlesign And that brings me to the question. Why That is the problem - |
Ok, let's try it the other way round: why do you need to resolve tree items URLs in admin at all?
Hard to come back for the exact reasoning from 2010. Most probably it's due to the fact that to exactly mimic the behaviour you ended up with a code copies from various versions of Django (as back then Nowadays, when 1.7 is the lowest supported version we might indeed try to use |
55da7de
to
03079d8
Compare
03079d8
to
d5e6562
Compare
@idlesign I think, this is some kind of misunderstanding. I don't use I cleaned the PR a bit. The problem is that the quotes was not cleaned from PS: There is one failing test, but I don't think, that it is caused by this PR. |
Probably. And I undertood #257 from the beginning.
Further: if we do not need to resolve in admin, we could bypass resovling, so there'd be no change to brake the Admin. Site itself still could be broken, but that can be fixed, as you've said in Admin. |
If you still really want to cure a symptom not the cause, you can do better: no need to strip chars on every call, sanitization on model save would suffice. We could probably also add validation on admin form save, but it won't really add value. |
URLs are being resolved in the
|
@timthelion |
|
@idlesign I forgot about this for some time, glad to see, that it is fixed now. |
@PetrDlouhy Sure, PR with test is welcome. |
fix #257