google-code-export / django-page-cms

Automatically exported from code.google.com/p/django-page-cms
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Details-view page traverse through request path. #213

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Calling view details() with no path
2. Accessing such view through request{'path': '/my/page/'}
3. Having tow pages with the same slug (different level however).

What is the expected output? What do you see instead?
Well, see
http://github.com/batiste/django-page-cms/blob/master/pages/managers.py#L118
Here one string is a full (NON-stripped string like '/my/page/' and the second 
one is 'my/page'), Thus strings are not equal, get 404 :)

Are you using the master version or a released version of this CMS on the
github repository?
Master

If you can write a test that reproduce the problem, there is better chance
it will be resolved quickly.
Sorry, working on py2.3.2, get tons of errors running the test_runner of CMS, 
hard to do it right now.

Original issue reported on code.google.com by klich...@gmail.com on 13 Oct 2010 at 2:04

GoogleCodeExporter commented 9 years ago
1. Calling view details() with no path

Hummm the CMS was never realy meant to be called with no path. I can't recall 
why I decided to implement this feature. In which way do you use the CMS so you 
don't pass the path?

In the meantime, I gonna have a look. Python 2.3? Is Django still running with 
2.3?

Original comment by batiste....@gmail.com on 13 Oct 2010 at 2:16

GoogleCodeExporter commented 9 years ago
Well, i saw the "feature"
if not path:
    path = request.path
So tried to test it :) That's all. 
Honestly, i just adjusted my urls.py bad, so "path" regex group wasn't passed, 
and than recognised that 'feature'.

Well,..yeah, Django 1.1.2 is still running on my py2.3.2, by the way, 
package on PyPi of CMS looks django-page-cms-1.3.0-py2.3.egg
It's implemented well for py2.3 (except tests), but it depends on 
django-authority... I had to port it to the old python (decorators 
everywhere...)
Well, the process of installink django was a bit painful, *-py2.3.egg 
dependencies, ensuring me that they are compatible with py2.3.2, but in 
actually contain lots of >=py2.4 syntax, classes...

Original comment by klich...@gmail.com on 13 Oct 2010 at 2:27

GoogleCodeExporter commented 9 years ago
Is there no way for you to update to newer version of Python? 2.3 is really 
antic.
Sad for the decorators... People shouldn't use the new syntax. It's just eye 
sugar and break anything < 2.4.

Here I remove the magic "path" feature:

http://github.com/batiste/django-page-cms/commit/08b926745035a3d831ca4f8775dcb7b
f8fc18246

Hopefully forcing people to setup the urls.py properly will restore a bit of 
sanity in URLs handling. I might force the language parameter too later on.

Original comment by batiste....@gmail.com on 15 Oct 2010 at 1:12

GoogleCodeExporter commented 9 years ago
Well, i would be glad to use at least 2.5 :) But i have a project with such 
restrictions, building a system on such an old Python, client is stubborn and 
does not understand, that this is an old crap.

Thanks, that is a good solution.

Original comment by klich...@gmail.com on 15 Oct 2010 at 4:20