[web2py] Re: routes.py and how to activate them

2017-06-07 Thread Anthony
On Wednesday, June 7, 2017 at 3:21:44 PM UTC-4, Scorpa wrote:
>
> Ok, 
>
> Created new project from scratch, renamed this file, copied it everywhere 
> - app folder, web2py library etc etc.
> used breakpoints, but none of them works.
>

You're not supposed to copy it everywhere -- it stays in the app folder. A 
*different* routes.py file should be created in the /web2py folder, as 
noted in the docs. Also, you must change the "app" key in the sample file 
to the name of your actual application.

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.


[web2py] Re: routes.py and how to activate them

2017-06-07 Thread Scorpa
Ok, 

Created new project from scratch, renamed this file, copied it everywhere - 
app folder, web2py library etc etc.
used breakpoints, but none of them works.

how can i debug routes ?
I couldn't find a root cause of this :(

понедельник, 5 июня 2017 г., 22:10:17 UTC+3 пользователь Anthony написал:
>
> For example, how actually routes.py works ? I renamed routes.example.py 
>>>  to routes.py according to internal notes. 
>>> Reloaded routes|reloaded web2py and... no effect.
>>>
>>
>> As the docs state, you don't just rename those files -- the routes.py 
>> file must be put in the /web2py root folder. If it is in the right place 
>> and still not working as expected, there is probably something wrong with 
>> the code.
>>
>
> Oh, I see you are referring to the example app-specific routes.py file, 
> which can remain where it is, in its own app's folder. However, you need to 
> make sure you also have a base routes.py file in the /web2py root folder, 
> and as noted in the routes.example.py file, you must change the 
> dictionary key "app" to be the name of your actual application.
>
> 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.


[web2py] Re: routes.py and how to activate them

2017-06-05 Thread Dave S


On Monday, June 5, 2017 at 11:59:49 AM UTC-7, Anthony wrote:
>
> Many times when i'm searching for an answer in the official docs about how 
>> to do this or that i'm ending in the stack overflow questions area or in 
>> this group.
>> and thats really frustrating that even simplest tasks can't be done easy.
>>
>
> What are some examples?
>

Some of the OP's recent posts:

Re: Saving to database random type data 


web2py-users  May 7
Saving to database random type data 

 
web2py-users  May 3
Re: Web2py multiple request variables to filter database output 

 
web2py-users  Apr 10
Re: Web2py multiple request variables to filter database output 

 
web2py-users  Apr 9
Re: Web2py multiple request variables to filter database output 

 
web2py-users  Apr 9
Web2py multiple request variables to filter database output 

 
web2py-users  Mar 20
Filter data based on clicked images 

 
web2py-users  Mar 20
His filtering thread relates to tagging, I think.  Tagging is only 
discussed briefly in the book, and my guidelines come from Massimo's 
github'd example and Leonel's comments:

I don't know if those help the OP, who seems to have a solution that I 
haven't absorbed yet.

His May posts relate to BLOB types and are unanswered.  I haven't any 
direct experience with BLOBs so I don't know how much is paticular to the 
DB engine and how much the various drivers smooth that out.  I don't store 
images or videos in the DB yet, and the upload files are all I've had to 
deal with (and those are, of course, stored in the filesystem with a 
reference in the DB).

/dps


-- 
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.


[web2py] Re: routes.py and how to activate them

2017-06-05 Thread Dave S


On Monday, June 5, 2017 at 12:10:17 PM UTC-7, Anthony wrote:
>
> For example, how actually routes.py works ? I renamed routes.example.py 
>>>  to routes.py according to internal notes. 
>>> Reloaded routes|reloaded web2py and... no effect.
>>>
>>
>> As the docs state, you don't just rename those files -- the routes.py 
>> file must be put in the /web2py root folder. If it is in the right place 
>> and still not working as expected, there is probably something wrong with 
>> the code.
>>
>
> Oh, I see you are referring to the example app-specific routes.py file, 
> which can remain where it is, in its own app's folder. However, you need to 
> make sure you also have a base routes.py file in the /web2py root folder, 
> and as noted in the routes.example.py file, you must change the 
> dictionary key "app" to be the name of your actual application.
>
>
And of course that's described in the book, but as a sub-sub-heading under 
the pattern system subheading.


(Perhaps instead of being 3rd level, that paragraph should be elevated to 
2nd level?)

/dps
 

-- 
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.


[web2py] Re: routes.py and how to activate them

2017-06-05 Thread Anthony

>
> For example, how actually routes.py works ? I renamed routes.example.py 
>>  to routes.py according to internal notes. 
>> Reloaded routes|reloaded web2py and... no effect.
>>
>
> As the docs state, you don't just rename those files -- the routes.py file 
> must be put in the /web2py root folder. If it is in the right place and 
> still not working as expected, there is probably something wrong with the 
> code.
>

Oh, I see you are referring to the example app-specific routes.py file, 
which can remain where it is, in its own app's folder. However, you need to 
make sure you also have a base routes.py file in the /web2py root folder, 
and as noted in the routes.example.py file, you must change the dictionary 
key "app" to be the name of your actual application.

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.


[web2py] Re: routes.py and how to activate them

2017-06-05 Thread Anthony

>
> Many times when i'm searching for an answer in the official docs about how 
> to do this or that i'm ending in the stack overflow questions area or in 
> this group.
> and thats really frustrating that even simplest tasks can't be done easy.
>

What are some examples?
 

> For example, how actually routes.py works ? I renamed routes.example.py 
>  to routes.py according to internal notes. 
> Reloaded routes|reloaded web2py and... no effect.
>

As the docs state, you don't just rename those files -- the routes.py file 
must be put in the /web2py root folder. If it is in the right place and 
still not working as expected, there is probably something wrong with the 
code.

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.


[web2py] Re: routes.py and how to activate them

2017-06-05 Thread Dave S


On Sunday, June 4, 2017 at 3:33:18 AM UTC-7, Scorpa wrote:
>
> Hello folks ! 
>
>
> Many times when i'm searching for an answer in the official docs about how 
> to do this or that i'm ending in the stack overflow questions area or in 
> this group.
> and thats really frustrating that even simplest tasks can't be done easy.
>

I found, in contrast,  that I could get a lot done by reading the book, and 
even now many of my questions here have answers in the book ... I just lost 
track of where.  (Early on, I got the hardcopy of the book, and read all 
the way through it, putting in a lot of bookmarks.  Now, I mostly use the 
online copy, as I do for Python documentation.)


> For example, how actually routes.py works ? I renamed routes.example.py 
>  to routes.py according to internal notes. 
> Reloaded routes|reloaded web2py and... no effect.
>
> How to actually use this tool ?
>
>
It's cheating to say I just used what was in the book and what was in the 
routes.py sample file, because before I tried I had been reading the group 
for quite a while.  Also, I chose the simpler technique, and have it do 
simple things:

routers = dict(

# base router
BASE=dict(
default_application='LogServer',
root_static = ['favicon.ico', 'robots.txt'],
),
)




 

> By the way, why pyCharm can't find packages  in this file ?
>


I don't use pyCharm; we have a couple people who have posted here about how 
to use pyCharm with web2py;  I believe one of them even got some changes 
adopted by pyCharm to handle web2py better, and those related to directory 
structure IIRC.
 

Good luck!

/dps
 

>
> 
>
>

-- 
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.