On Oct 21, 2010, at 6:25 PM, ron_m wrote:
>
> I would like to clarify one thing for my own work in this area. If I
> take one of the menu lines out of the "Edit" menu in the Welcome
> application menu.py as an example the URL for item Controller is
>
> URL('admin', 'default', 'edit/%s/controllers
I would like to clarify one thing for my own work in this area. If I
take one of the menu lines out of the "Edit" menu in the Welcome
application menu.py as an example the URL for item Controller is
URL('admin', 'default', 'edit/%s/controllers/%s.py' \
% (request.application,request.controlle
I personally always use routes... for me, it's just a matter of my
perspective. As a developer I am thinking from the conrollers
perspective. I want to call a particular function in a controller . No
doubt in my programming mind, I should always want to call things from
the controller with a pyt
I think it is very important to use URL and not hard-code any url.
If you deploy the app under apache for example, in a subfolder, you
need to add the /subfoldername/ prefix to all paths. It will break all
urls. URL and routes will take care of this.
On Oct 21, 9:38 am, Jonathan Lundell wrote:
>
On Oct 20, 2010, at 11:18 PM, ron_m wrote:
>
> Certainly the way you describe is in the book and is right, what I
> suggest is something I have done that works. However it could be one
> of things that bites later because I am depending on the current
> mapping of args to additional path elements
Sorry that was a really dumb moment. Of course I can just put it in the
URL. :P Sorry about that.
On Wed, 2010-10-20 at 22:44 -0700, ron_m wrote:
> This works
>
> URL(request.application,'default','products/used'), [])
>
> On Oct 20, 7:40 pm, Jason Brower wrote:
> > response.menu = [
> >
Certainly the way you describe is in the book and is right, what I
suggest is something I have done that works. However it could be one
of things that bites later because I am depending on the current
mapping of args to additional path elements and am essentially
bypassing what the API should be do
On Oct 20, 2010, at 10:44 PM, ron_m wrote:
>
> This works
>
> URL(request.application,'default','products/used'), [])
You can also do something like this, which to my mind is more readable:
URL('default', 'products', args=['used'])
or equivalently, and even more readable:
URL(c='default', f='
This works
URL(request.application,'default','products/used'), [])
On Oct 20, 7:40 pm, Jason Brower wrote:
> response.menu = [
> (T('Home'), False, URL(request.application,'default','index'), []),
> (T('Products'), False,
> URL(request.application,'default','products'), []),
> (T('U
response.menu = [
(T('Home'), False, URL(request.application,'default','index'), []),
(T('Products'), False,
URL(request.application,'default','products'), []),
(T('Used Products'), False,
URL(request.application,'default','products'), []),
(T('Company'), False, URL(request.applicat
?
On Oct 20, 12:26 pm, Jason Brower wrote:
> Are there no arg in response.menu? If not I can build it different, but
> I thought it would so I can do some special menu items.
> :/ Innerestin'
> ---
> BR,
> Jason
>
> face-uncertain.png
> 1KViewDownload
11 matches
Mail list logo