- bug fixes
- auth.user_id (shortcut for auth.user.id that defaults to None if not
logged it)
- support for all native types on Google App Engine (for example
StringListProperty)
- restored python 2.4 support,thanks ont.rif
- cache.ram usage statictics, thanks Thadus
- no more auth manu in scaffolding
- no more spash screen with -Q
- fixed doctest in html.py, thanks Anand Vaidya
- export_to_csv_file has represent, thanks Thadeus
Possible I found a bug.
It's the "[id]" thing with crud next url...
Before:
url: http://127.0.0.1:8000/borverseny/adatok/sablonok
controllers/adatok.py:
def sablonok():
...
n='sablonsor_jog/[id]'
sablon_sor=crud.create(db.oklevel_sablon,
message=T("Oklevél sablonsor felvéve"),
next=n)
The resulted url was: http://127.0.0.1:8000/borverseny/adatok/sablonok/sablonsor_jog/7
Now:
url: http://127.0.0.1:8000/borverseny/adatok/sablonok
controllers/adatok.py:
def sablonok():
...
n='sablonsor_jog/[id]'
sablon_sor=crud.create(db.oklevel_sablon,
message=T("Oklevél sablonsor felvéve"),
next=n)
The resulted url now: http://127.0.0.1:8000/borverseny/default/sablonsor_jog/7
http://127.0.0.1:8000/borverseny/adatok/sablonok/sablonsor_jog/7 <- OK
http://127.0.0.1:8000/borverseny/default/sablonsor_jog/7 <-
Error
Massimo
On Dec 31, 4:24 am, szimszon <szims...@gmail.com> wrote:
> Hello!
>
> Possible I found a bug.
>
> It's the "[id]" thing with crud next url...
>
> Before:
>
> url:http://127.0.0.1:8000/borverseny/adatok/sablonok
>
> controllers/adatok.py:
>
> def sablonok():
> ...
> n='sablonsor_jog/[id]'
> sablon_sor=crud.create(db.oklevel_sablon,
> message=T("Oklevél sablonsor felvéve"),
> next=n)
> The resulted url was:http://127.0.0.1:8000/borverseny/adatok/sablonok/sablonsor_jog/7
>
> Now:
>
> url:http://127.0.0.1:8000/borverseny/adatok/sablonok
>
> controllers/adatok.py:
>
> def sablonok():
> ...
> n='sablonsor_jog/[id]'
> sablon_sor=crud.create(db.oklevel_sablon,
> message=T("Oklevél sablonsor felvéve"),
> next=n)
> The resulted url now:http://127.0.0.1:8000/borverseny/default/sablonsor_jog/7
>
> http://127.0.0.1:8000/borverseny/adatok/sablonok/sablonsor_jog/7<- OKhttp://127.0.0.1:8000/borverseny/default/sablonsor_jog/7 <-
which says to me that:
If I call crud with the
http://127.0.0.1:8000/borverseny/adatok/sablonok
url, the next="sablonsor_jogok/[id]", then I get
http://127.0.0.1:8000/borverseny/adatok/sablonok/sablonsor_jogok/7
and _not_:
http://127.0.0.1:8000/borverseny/default/sablonsor_jogok/7
which is the result now.
So why is the controller replaced from the calling controller to the
default controller and removed the calling function?
With the Version 1.74.3 (2009-12-16 15:11:54) I got
http://127.0.0.1:8000/borverseny/adatok/sablonok/sablonsor_jogok/7
On the other thread:
"12. Yarko Tymciurak
További lehetőségek 2009 szept. 23, 20:01
On Wed, Sep 23, 2009 at 1:53 PM, szimszon <szims...@gmail.com> wrote:
> Okay :)
> I'm not particular good in English but in:
> "• next is the URL to redirect to after success. If the URL
> contains the
> substring "[id]" this will be replaced by the id of the record
> currently
> created/updated."
> is nowhere that the URL must not contain '/' in the first place.
... thanks for the correction ... also, must not be absolute path...
"
So if the next "must not be absoulte path" then it's I think the
expected behavior that the next is just written after the original URL
so the original controller's function can handle it...
Thanks for the prompt replay and a Happy New Year to Everyone! :)
auth.settings.controller ='adatok'
You can also set
auth.settings.controller =None
to make the controller to be the same as the one of the calling
action.
On Jan 1, 5:25 am, szimszon <szims...@gmail.com> wrote:
> There is a small thread about the behavior of the [id]:
>
> http://groups.google.com/group/web2py/browse_frm/thread/eca9b3d5e71c3...
Or what is the relation of auth and the next [id] thing? What if I
doesn't have auth at all?
If I understand it well then the crud "next" parameter's relative path
is the uri's part after the application and the default controller:
So the expected behavior is:
http[s]://<domain.tld>[:portnumber]/application/<[crud|
auth]?.settings.controller>/<next>
and not:
http[s]://<domain.tld>[:portnumber]/application/<contoller of the
function the crud in it>/<the function where the crud is>/<next>
It's a bit weird to me. :-o And not backward compatible :(
crud.settings.controller ='adatok'
next can have three possible values:
1) a full url starting with http://
2) an absolute url starting with /
3) a function/args than it is relative to /application/controller/
where controller is crud.settings.controller
If in some early version it behaved differently in case 3 that was a
bug.
Massimo
Thanks anyway.