[web2py] Re: posibility to disable the mobile admin interface

2017-08-14 Thread Paolo Caruccio
My known way.

In the "web2py/applications/admin/controllers/default.py" file at line nr.3 
set EXPERIMENTAL_STUFF to False

You must apply the above change every time you update web2py.


Il giorno lunedì 14 agosto 2017 12:50:39 UTC+2, Vic Ding ha scritto:
>
> I know this is pretty old post, but is there a way to do so? Thanks!
>
> On Tuesday, November 22, 2016 at 10:30:24 AM UTC+1, Oli wrote:
>>
>> is there a posibility to disable the mobile interface? there is only a 
>> white screen on pythonanywhere.com with web2py version 2.14.6 .
>
>

-- 
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] 'DAL' object has no attribute ""table_name""

2017-08-14 Thread Halili Celik
1. web2py internet download link is wrong for  windows platform. The link 
points to old version: 2.15.2-stable+timestamp.2017.07.19.12.18.41

2. With the version: 2.15.2-stable+timestamp.2017.07.19.12.18.41, when I 
try to export csv format I get  'DAL' 
object has no attribute ""table_name"".

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


Re: [web2py] pycharm and web2py - setup project

2017-08-14 Thread Kirill Shatalaev
Richard, as you can see at 2:20, parameter info is NOT working (indexing is 
finished, view->parameter info or ctrl+p is not working too)
After that I've added pyDAL package (2:43)
And ONLY then it starting to work, yes (3:26).

Pycharm is professional version, 2017.2.1

понедельник, 14 августа 2017 г., 17:21:45 UTC+4 пользователь Richard 
написал:
>
> hmm... I don't understand why you say it not working... Once the pycharm 
> indexing end, at the end of your vid you have autocomplete working no???
>
> I do have last pycharm version 
>
> PyCharm 2017.2
> Build *#PY-172.3317.103*, built on July 25, 2017
> JRE: 1.8.0_152-release-915-b5 amd64
> JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
> Linux 4.4.0-89-generic
>
> Richard
>
> On Mon, Aug 14, 2017 at 5:11 AM, Kirill Shatalaev  > wrote:
>
>> Richard, how did you do that?
>>
>> This is my scrincast on a clean installation and without any virtual 
>> environment. Does not work.
>>
>> https://youtu.be/51mmwUSJ_VM
>>
>>
>> пятница, 11 августа 2017 г., 17:57:46 UTC+4 пользователь Richard написал:
>>>
>>> Kirill, I just try to create a new project and the autocompletion was 
>>> working, so I guess the issue is limited to virtual environement...
>>>
>>>
>>> -- 
>> 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+un...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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: Please: A simple template for accessing the same db from web2py and standalone

2017-08-14 Thread Anthony

>
> (1) unless one is dealing with a pretty basic db, almost inevitably one 
> starts including web2py specific pieces that make sharing considerably more 
> complicated than just "from gluon import DAL, Field" :(  In my case, 
> besides record versioning, validators etc.  there's a trivial example - I 
> specify the path to the uploads folder as relative to "request.folder"  :)
>

Yes. You either need to write all the model code so it is independent of 
the web2py environment from the beginning (e.g., put models in modules, 
explicitly import any web2py objects needed, and explicitly specify 
relevant filesystem paths, such as the uploads folder), or plan to run your 
external program in the web2py environment (via the mechanisms discussed). 
 

> (2) As you say, unless there really is a very strong argument for stepping 
> outside the web2py environment, it really is just easier (and probably more 
> future proof) to extend the app to include the formerly standalone 
> functions (in a much extended modules directory) or, perhaps a separate 
> web2py app e.g. where the db is shared but where the user populations are 
> different. btw, how DOES one best share models between two web2py apps
>

If you really need separate apps, the best way to share model code is to 
put it in modules and import (which means you'll need to wrap calls to 
db.define_table in functions or classes within those modules). An 
alternative is to use auto_import 
,
 
though that only gets you very minimal table definitions (just the 
attributes needed by the database, such as column names and types).

You might still consider a single application, though -- there's no reason 
you can't have a separate interface for different groups of users. Also, if 
you don't want a web interface but are instead creating a CLI or desktop 
app, you can still interface with a running web2py app via HTTP requests or 
RPC calls -- see http://web2py.com/books/default/chapter/29/10/services for 
details.

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: Please: A simple template for accessing the same db from web2py and standalone

2017-08-14 Thread 'jim kaubisch' via web2py-users
Anthony,

Thank you VERY much for reply.

Out of it I take that 

(1) unless one is dealing with a pretty basic db, almost inevitably one 
starts including web2py specific pieces that make sharing considerably more 
complicated than just "from gluon import DAL, Field" :(  In my case, 
besides record versioning, validators etc.  there's a trivial example - I 
specify the path to the uploads folder as relative to "request.folder"  :)

(2) As you say, unless there really is a very strong argument for stepping 
outside the web2py environment, it really is just easier (and probably more 
future proof) to extend the app to include the formerly standalone 
functions (in a much extended modules directory) or, perhaps a separate 
web2py app e.g. where the db is shared but where the user populations are 
different. btw, how DOES one best share models between two web2py apps

Thanks again,
Jim

On Sunday, August 13, 2017 at 3:18:54 PM UTC-7, jim kaubisch wrote:
>
> I have good reason to want to create a database using a web2py app, but 
> also access the db from a standalone app that does tons of data processing 
> but basically does not need/want any user interaction
> The web2py app makes sure all data is consistent, supports the user in 
> entering valid data, manages YouTube videos, and media maps on a website 
> etc - lots of reasons for an interactive app.
> The standalone app does LOTS of data processing on the definitions created 
> via the web2py app as well as other files. 
> Its interface (for non-tech people) is simply click on "Import", followed 
> by "Prepare" followed by "Deploy" - no UI wanted or needed (Logs are kept 
> of what happened)
>
> I’ve looked, but so far have not found a complete explanation of how to 
> access the same database both with web2py and standalone.
>
> 1. the book says;
>
> "
>  The web2py DAL can be used in a non-web2py environment via
> 1. from gluon import DAL, Field
> 2. # also consider: from gluon.validators import *
>"
>
>YET in the standalone, shouldn’t it be 
>
> from pydal import DAL, Field ?
>
> 2. Whichever I use, the db connection is made (good news) but, 
> next problem I hit is that when I import my db model definition into 
> the standalone, I get:
>
> NameError: "name 'T' is not defined"
> module body in dev.pyDAL_test.py at line 8
> import mfm_media_model
> module body in mfm_media_model.py at line 73
> Field('db_version',   'string' , label=T('DB Version')  , 
> writable=False),
>
> ... and there would be others once I got past this one
> I have found no explanation of how to access the definitions of T and 
> other helpers :(
>
> It would be really helpful to have even a simple template of how to 
> implement access to a common database defined in web2py and standalone.
> I’ve looked and haven’t found one.
>
> 1. what to include in the model imports to define the standalone db access?
> from gluon? or from pydal? import DAL, Field? Or does it even matter?
>
> 2. What to include to import the same table definitions on both 
> sides, 
>  including the helpers defined in the book for table 
> definitions?
>
> 3. What about the question of “migrate_enabled”. presumably 
>only set to True in one app? What are the gotchas, if any?
>
> 4. Is there anything else that’s required or, based on experience,
>wise to do include/exclude/avoid etc to make things work
>
> Apologies if I have missed someone's explanation or am not understanding 
> something so obvious that I should be embarrassed to be asking
>
> Thanks,
> Jim
>
>

-- 
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: Change value of select

2017-08-14 Thread Anthony
On Friday, August 11, 2017 at 6:59:17 AM UTC-4, Simona Chovancová wrote:
>
> I need to change selected option in the view, I know that to change input 
> value I do it like this: {{form.element('input', _name='field')['_value'] = 
> "new_value"}}, but how do I do this with select? Also, this needs to be 
> done in view, not controller so I cannot use default='some_option'.
>

{{form.element('input', _name='field')['_value'] = "new_value"}} is 
executed on the server immediately after the controller function returns, 
so there should be no reason that line could not be moved to the 
controller. It doesn't write anything to the view -- it simply manipulates 
the form object before it is written to the view, which can be done just as 
easily in the controller.

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: Please: A simple template for accessing the same db from web2py and standalone

2017-08-14 Thread Anthony
On Sunday, August 13, 2017 at 6:18:54 PM UTC-4, jim kaubisch wrote:
>
> I have good reason to want to create a database using a web2py app, but 
> also access the db from a standalone app that does tons of data processing 
> but basically does not need/want any user interaction
> The web2py app makes sure all data is consistent, supports the user in 
> entering valid data, manages YouTube videos, and media maps on a website 
> etc - lots of reasons for an interactive app.
> The standalone app does LOTS of data processing on the definitions created 
> via the web2py app as well as other files. 
> Its interface (for non-tech people) is simply click on "Import", followed 
> by "Prepare" followed by "Deploy" - no UI wanted or needed (Logs are kept 
> of what happened)
>
> I’ve looked, but so far have not found a complete explanation of how to 
> access the same database both with web2py and standalone.
>
> 1. the book says;
>
> "
>  The web2py DAL can be used in a non-web2py environment via
> 1. from gluon import DAL, Field
> 2. # also consider: from gluon.validators import *
>"
>
>YET in the standalone, shouldn’t it be 
>
> from pydal import DAL, Field ?
>

If you import from gluon, you get some extra web2py functionality attached 
to the DAL (JSON and XML serializers, default validators, default represent 
functions, and the web2py_uuid helper). You also get the database drivers 
available in /gluon/contrib.

2. Whichever I use, the db connection is made (good news) but, 
> next problem I hit is that when I import my db model definition into 
> the standalone, I get:
>
> NameError: "name 'T' is not defined"
> module body in dev.pyDAL_test.py at line 8
> import mfm_media_model
> module body in mfm_media_model.py at line 73
> Field('db_version',   'string' , label=T('DB Version')  , 
> writable=False),
>
> ... and there would be others once I got past this one
> I have found no explanation of how to access the definitions of T and 
> other helpers :(
>

T is part of the web2py global environment. You can create your own T if 
desired -- it is an instance of the translator class from gluon.languages 
(you must pass it a path to the language files folder as well as a default 
language).

It would be really helpful to have even a simple template of how to 
> implement access to a common database defined in web2py and standalone.
> I’ve looked and haven’t found one.
>
> 1. what to include in the model imports to define the standalone db access?
> from gluon? or from pydal? import DAL, Field? Or does it even matter?
>

See above.
 

> 2. What to include to import the same table definitions on both 
> sides, 
>  including the helpers defined in the book for table 
> definitions?
>

Validators are in gluon.validators and widgets are in gluon.sqlhtml.

If you want to share table definitions, you'll need to put them in a module 
somewhere (e.g., the application's /modules folder) and import where needed.

If you want to enable record versioning for all tables at once using 
auth.enable_record_versioning(), you will of course need Auth from 
gluon.tools. Otherwise, you can enable versioning for individual tables via 
db.mytable._enable_record_versioning().
 

> 3. What about the question of “migrate_enabled”. presumably 
>only set to True in one app? What are the gotchas, if any?
>

Yes, probably best to enable migrations from only one place.
 

> 4. Is there anything else that’s required or, based on experience,
>wise to do include/exclude/avoid etc to make things work
>

For upload fields, you may have to explicitly specify the "uploadfolder" 
argument to indicate where files should be uploaded.

All that having been said, you're probably much better off simply running 
your external program in the context of the web2py environment of your app 
via:

python web2py.py -S myapp -M -R /path/to/python/script.py

In that case, you don't have to worry about any of the above, as your 
script will be executed in the same environment as your application, 
include everything defined in your models as well as the web2py globals.

Another option is to use exec_environment 
. 
Actually, it's not documented, but the similar env 
 function 
from gluon.shell might be more useful, as it lets you create an environment 
that includes the models of a specific application.

You might also consider just making a very simple web interface with the 
import/prepare/deploy workflow -- it can be part of the same app.

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 

[web2py] Re: custom filter in grid

2017-08-14 Thread Leonel Câmara
Here's one way to do it. Note that when I start having this kind of 
problems I usually stop using the grid and make a custom solution.  
  
In the grid, the searchable argument, can be a function. In that case it 
gets the fields and keywords and its responsibility is to generate and 
return a query. You can disable advanced_search and then only have a search 
field. Then you will have a searchable function which will detect if one of 
the keywords entered in the search is a date, if that is the case then you 
will make a query where only records from that date are acceptable.

Your controller function would be something like this:

def mygrid():
import datetime


def searchable(fields, keywords):
query = db.my_table.id > 0:
for keyword in keywords:
date = None
try:
date = datetime.datetime.strptime(keyword,'%Y-%m-%d')
except ValueError:
pass
if date:
query &= db.my_table.created_on == date
else:
# this is just an example
query &= db.my_table.name.like('%' + keyword + '%', 
case_sensitive=False)
return query


return {'grid': SQLFORM.grid(db.my_table, searchable=searchable, 
advanced_search=False)}


-- 
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: Getting 404 NOT FOUND error when accessing a few pages of my app.

2017-08-14 Thread Anthony
Has the app been compiled? What happens if you reload routes or restart the 
web server?

On Monday, August 14, 2017 at 8:53:51 AM UTC-4, Rahul wrote:
>
> Hi All,
>I have an app and Off late I am strangely getting below error when 
> accessing a page. I have the cat_grid function in by controller(default.py) 
> as well have* .html *file in views. 
>
>1. Request URL:
>http://127.0.0.1:8000/Target/default/cat_grid
>2. Request Method:
>GET
>3. Status Code:
>404 NOT FOUND
>4. Remote Address:
>127.0.0.1:8000
>5. Referrer Policy:
>no-referrer-when-downgrade
>
> I see this in the browser (chrome)
> invalid function (default/cat_grid)
>
> It was all working previously. However I am not sure how come I am getting 
> this error for almost 60% of my functions. No ticket is thrown. I am 
> confused as to what got changed. I am using web2py 2.14.6 stable. I did 
> install a few plugins and then removed those too. but this is really 
> annoying as I cannot figure out why it aint working. Please suggest this 
> is killing me and my time badly. Any help and pointers would be highly 
> appreciated.
>
>
> Rahul D. 
>

-- 
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: Styling the Sign Up Page

2017-08-14 Thread Anthony
The .change() method sets up a handler for changes in input, select, and 
textarea elements, not for clicking buttons. If you want a change to happen 
when the button is clicked, set up a click handler or maybe simply a submit 
handler.

Anthony

On Monday, August 14, 2017 at 10:19:28 AM UTC-4, Mark Billion wrote:
>
> I have Jquery that works fine to style the user/login page
>
> $( document ).ready(function() {
> $(":submit").addClass( "btn btn-default" );
>
> $(".btn").css('margin-right', '10px');
> $(".w2p_fl").attr('align', 'right');
> $( "form>table" ).prepend( ' class="form__image"> src="/welcome/static/css/images/ico-dollar-happy-large.png" width="72px" 
> alt="">' )
> });
>
>
> But I cant for the life of me get it to apply when I hit the sign up 
> button.  This is what Im using, but Ive also tried form and even document 
> dot change
>
> $(".form-sign").change(function(){
> $(":submit").addClass( "btn btn-default" );
>
> $(".btn").css('margin-right', '10px');
> $(".w2p_fl").attr('align', 'right');
> //$( "form>table" ).prepend( ' class="form__image"$
>
>   $( "form>table" ).prepend( ' class="form__image"> src="/welcome/static/css/images/ico-dollar-happy-large.png" width="72px" 
> alt="">' )
>
> Any thoughts?
>

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


{Disarmed} [web2py] Re: custom filter in grid

2017-08-14 Thread Carlos Cesar Caballero Díaz
Yes, that's a possible solution, but I don't want to duplicate 
information that is already there, I just want to find a way to use it 
in the way I need.


Greetings.


El 11/08/17 a las 16:07, 黄祥 escribió:
just an idea why not create the new field with the date type with 
default value = request.now? so that user can search through the new 
date field


best regards,
stifan
--
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 *MailScanner ha detectado un intento de fraude 
en la siguiente p�gina web "groups.google.com". /No/ conf�e en esta 
p�gina web:* https://groups.google.com/d/optout 
.


--
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] Styling the Sign Up Page

2017-08-14 Thread Mark Billion
I have Jquery that works fine to style the user/login page

$( document ).ready(function() {
$(":submit").addClass( "btn btn-default" );

$(".btn").css('margin-right', '10px');
$(".w2p_fl").attr('align', 'right');
$( "form>table" ).prepend( '' )
});


But I cant for the life of me get it to apply when I hit the sign up 
button.  This is what Im using, but Ive also tried form and even document 
dot change

$(".form-sign").change(function(){
$(":submit").addClass( "btn btn-default" );

$(".btn").css('margin-right', '10px');
$(".w2p_fl").attr('align', 'right');
//$( "form>table" ).prepend( 'table" ).prepend( '' )

Any thoughts?

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


Re: [web2py] pycharm and web2py - setup project

2017-08-14 Thread Richard Vézina
Also, do you have professional version of pycharm (you seems too)?

On Mon, Aug 14, 2017 at 9:21 AM, Richard Vézina  wrote:

> hmm... I don't understand why you say it not working... Once the pycharm
> indexing end, at the end of your vid you have autocomplete working no???
>
> I do have last pycharm version
>
> PyCharm 2017.2
> Build *#PY-172.3317.103*, built on July 25, 2017
> JRE: 1.8.0_152-release-915-b5 amd64
> JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
> Linux 4.4.0-89-generic
>
> Richard
>
> On Mon, Aug 14, 2017 at 5:11 AM, Kirill Shatalaev 
> wrote:
>
>> Richard, how did you do that?
>>
>> This is my scrincast on a clean installation and without any virtual
>> environment. Does not work.
>>
>> https://youtu.be/51mmwUSJ_VM
>>
>>
>> пятница, 11 августа 2017 г., 17:57:46 UTC+4 пользователь Richard написал:
>>>
>>> Kirill, I just try to create a new project and the autocompletion was
>>> working, so I guess the issue is limited to virtual environement...
>>>
>>>
>>> --
>> 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.
>>
>
>

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


Re: [web2py] pycharm and web2py - setup project

2017-08-14 Thread Richard Vézina
hmm... I don't understand why you say it not working... Once the pycharm
indexing end, at the end of your vid you have autocomplete working no???

I do have last pycharm version

PyCharm 2017.2
Build *#PY-172.3317.103*, built on July 25, 2017
JRE: 1.8.0_152-release-915-b5 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.4.0-89-generic

Richard

On Mon, Aug 14, 2017 at 5:11 AM, Kirill Shatalaev 
wrote:

> Richard, how did you do that?
>
> This is my scrincast on a clean installation and without any virtual
> environment. Does not work.
>
> https://youtu.be/51mmwUSJ_VM
>
>
> пятница, 11 августа 2017 г., 17:57:46 UTC+4 пользователь Richard написал:
>>
>> Kirill, I just try to create a new project and the autocompletion was
>> working, so I guess the issue is limited to virtual environement...
>>
>>
>> --
> 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.
>

-- 
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: Getting 404 NOT FOUND error when accessing a few pages of my app.

2017-08-14 Thread Jim S
Can you show the code?

-Jim

On Monday, August 14, 2017 at 7:53:51 AM UTC-5, Rahul wrote:
>
> Hi All,
>I have an app and Off late I am strangely getting below error when 
> accessing a page. I have the cat_grid function in by controller(default.py) 
> as well have* .html *file in views. 
>
>1. Request URL:
>http://127.0.0.1:8000/Target/default/cat_grid
>2. Request Method:
>GET
>3. Status Code:
>404 NOT FOUND
>4. Remote Address:
>127.0.0.1:8000
>5. Referrer Policy:
>no-referrer-when-downgrade
>
> I see this in the browser (chrome)
> invalid function (default/cat_grid)
>
> It was all working previously. However I am not sure how come I am getting 
> this error for almost 60% of my functions. No ticket is thrown. I am 
> confused as to what got changed. I am using web2py 2.14.6 stable. I did 
> install a few plugins and then removed those too. but this is really 
> annoying as I cannot figure out why it aint working. Please suggest this 
> is killing me and my time badly. Any help and pointers would be highly 
> appreciated.
>
>
> Rahul D. 
>

-- 
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] Getting 404 NOT FOUND error when accessing a few pages of my app.

2017-08-14 Thread Rahul
Hi All,
   I have an app and Off late I am strangely getting below error when 
accessing a page. I have the cat_grid function in by controller(default.py) 
as well have* .html *file in views. 

   1. Request URL:
   http://127.0.0.1:8000/Target/default/cat_grid
   2. Request Method:
   GET
   3. Status Code:
   404 NOT FOUND
   4. Remote Address:
   127.0.0.1:8000
   5. Referrer Policy:
   no-referrer-when-downgrade
   
I see this in the browser (chrome)
invalid function (default/cat_grid)

It was all working previously. However I am not sure how come I am getting 
this error for almost 60% of my functions. No ticket is thrown. I am 
confused as to what got changed. I am using web2py 2.14.6 stable. I did 
install a few plugins and then removed those too. but this is really 
annoying as I cannot figure out why it aint working. Please suggest this is 
killing me and my time badly. Any help and pointers would be highly 
appreciated.


Rahul D. 

-- 
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: posibility to disable the mobile admin interface

2017-08-14 Thread Vic Ding
I know this is pretty old post, but is there a way to do so? Thanks!

On Tuesday, November 22, 2016 at 10:30:24 AM UTC+1, Oli wrote:
>
> is there a posibility to disable the mobile interface? there is only a 
> white screen on pythonanywhere.com with web2py version 2.14.6 .

-- 
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: web2py with js framework

2017-08-14 Thread 黄祥
thanks Carlos for the clear hints

best regards,
stifan
>
>

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


Re: [web2py] pycharm and web2py - setup project

2017-08-14 Thread Kirill Shatalaev
Richard, how did you do that?

This is my scrincast on a clean installation and without any virtual 
environment. Does not work.

https://youtu.be/51mmwUSJ_VM


пятница, 11 августа 2017 г., 17:57:46 UTC+4 пользователь Richard написал:
>
> Kirill, I just try to create a new project and the autocompletion was 
> working, so I guess the issue is limited to virtual environement...
>
>
>

-- 
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] scheduler speed up task run

2017-08-14 Thread Yebach
Hello

I am experiencing some issues with scheduler.py module

While running on my local machine (Windows 10, postgres database,..) the 
scheduler under the following command start relatively quick

scheduler = Scheduler(db, tasks = dict(runWoshiEngine = 
runWoshiEngine,saveIdOut=saveIdOut ) ,heartbeat = 1)

 
Lets say under 1 second. 

On my server machine (Windows server 2008, postgres db, etc) there is a 
huge delay when scheduler starts. about 20-30 seconds.

Any suggestions on what the issue migh tbe

Trough schedule I run an external exe application

The code:

How I call schedule 

task = scheduler.queue_task(runWoshiEngine, [scriptId, path, parallel])


in my scheduler.py 

def runWoshiEngine(scriptId, path, parallel):
# import os, sys
# import time
import subprocess
#UKAZ - woshi_engine.exe skripta.lls -4
#print "runWoshiEngine in progress.. with %s parallel instances" % 
(str(parallel))
if parallel == 0:
woshi_input_string = 'woshi_engine.exe ' + str(scriptId)
else:
parallel_str = " -p%s" % (str(parallel))
woshi_input_string = 'woshi_engine.exe ' + str(scriptId) + parallel_str

#print "engine run for script %s with %s parallel instances" % 
(str(scriptId), str(parallel))
print woshi_input_string
#p = subprocess.Popen([woshi_input_string], shell=True, stdout = 
subprocess.PIPE, cwd=path) #- ne dela na serverju - Blage zakaj
#p = subprocess.Popen(['woshi_engine.exe', woshi_input_string], shell=True, 
stdout = subprocess.PIPE, cwd=path)
p = subprocess.Popen(woshi_input_string, shell=True, stdout = 
subprocess.PIPE, cwd=path)
return dict(status = 1)

scheduler = Scheduler(db, tasks = dict(runWoshiEngine = 
runWoshiEngine,saveIdOut=saveIdOut ) ,heartbeat = 1)


any suggestions ?

thank you



-- 
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: Weird problems generating menu from database

2017-08-14 Thread Вячеслав Анатольевич


Hi! in that example - i have error:

   subsubmenu = [[key, None, link] for key, link in items]
ValueError: too many values to unpack

-- 
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] web2py with js framework

2017-08-14 Thread Carlos Kitu
Hi stifan,
I just wanted to share my recent experience with vue.js and web2py.
At first I didn't want to give up things like sqlform.
Then I tried to tweak the form generated by web2py with el1=form.element(...) 
to get a reference to the html element I wanted to add certain vue.js 
directives like v-if, v-model, ...
It was so easy as:
el1["_v-if"]="something"

It works but later I realized that it was not practical because I the logic 
spread between the controller, with the form generation, and vue.js directives, 
then the html view where I had more vue.js directives and components, and the 
main js vue controller. 

As I didn't want to renounce to the look and feel of web2py, because I just 
needed a very dynamic function made in vue, and the rest of the application 
could be made the traditional way with web2py, I resorted to generating just 
once the form with web2py and copying manually the resulting html code to the 
html view, and that way I just have to work with the html view and the JS code 
as usual in vue.js apps.
With regard to passing data from the controller to vue.js, you can use 
{{=ASSIGNJS(key1=val1, key2=val2, ...)}} in your view and you will get those 
keys available as global vars in JavaScript with the needed translations to 
JSON in case you use complex values as lists, dicts, ...

If anybody found a better way to integrate the things, please let us know.

Hope this helps.
Best regards.

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