On Monday, March 28, 2016 at 1:20:59 PM UTC-4, Carlos Cesar Caballero wrote:
>
> They provide related but different information with a different structure 
> (country show main country info, an basic States and Cities info and so 
> on), The separate country, city, and state controller files are not 
> strictly needed, but I prefer to maintain the code structure for 
> extensibility and maintainability. The controllers have other functions 
> that can be accessed in the classical way.
>

Still not sure I follow. What exactly is in your country.py controller? Do 
you literally have a cuba() function? Are there functions for other 
countries, and if so, how do they differ from the cuba() function? What is 
in the city.py controller? Is there a function for each city?

I'm guessing it would make more sense to have the /default/index function 
accept up to three URL args specifying the country and (optionally) the 
state and city. Then you would have logic in that function to call the 
appropriate functions, which can reside in modules and be imported. But 
it's hard to say without knowing what you are really trying to do.

Anthony

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to