I am trying to customize the location and appearance of the login form. I
am looking for the easiest way to do this. I am using return
dict(login=auth.login()) in my default.py and {{=login} in my html. I have
tried couple of things posted in here, but I found them vague and not quite
understan
How can title and some text of a link be displayed under it? For example,
if a link is posted to the website, it can show the title and some of the
first characters in its body. Take a news link for an example...
--
---
You received this message because you are subscribed to the Google Groups
er it when the link is entered.
>
> For scraping, look into the
> http://docs.python-requests.org/en/latest/(requests library) and go from
> there.
>
> Regards,
> Ales
>
> On Monday, September 2, 2013 7:41:57 PM UTC+2, Aydin S wrote:
>>
>> How can title and s
This might be asked before and I already found a similar question in here:
https://groups.google.com/forum/#!topic/web2py/0k0Fvw6fmb8
but this seemed a bit confusing. How to write on database from within a
module?
I have a table defined in db.py (model) as follows:
db.define_table('Table1',
F
I am running into this issue that the database does not update without
refreshing the website.
In model db.py I have:
db.define_table('Table1',
Field('var1', 'integer'),
from module1 import insert_record
insert_record(db)
and in a module1 I write on the database and also get access to the
d
>>>
>>> and in the module module1.py?:
>>>
>>> def module1():
>>> db = current.db
>>> var2=db().select(db.Table1.var1, orderby=~db.Table1.id, limitby=(0,
>>> 1))[0].var1
>>>
>>> Thanks
>>>
>>&g
.commit() or not.
>
> Richard
>
> On Tue, Dec 8, 2015 at 1:05 PM, Aydin S >
> wrote:
>
>> I got another question if you could help.
>> The database does not get updated without I refresh the website in this
>> scenario. I don't know why it is, do I need
In other words, module1 does not seem to run unless I refresh the website.
On Tuesday, 8 December 2015 13:28:26 UTC-5, Aydin S wrote:
>
> Here is what I have:
>
> In model db.py I have:
>
> db.define_table('Table1',
> Field('var1', '
eed to restart web2py... Or user
> track change feature, but in the past it was broken don't know if now it
> works properly...
> http://web2py.com/books/default/chapter/29/04/the-core?search=track_changes
>
> On Tue, Dec 8, 2015 at 1:33 PM, Aydin S >
> wrote:
>
>>
py cron or scheduled task.
On Tuesday, 8 December 2015 13:58:37 UTC-5, Richard wrote:
>
> 15 seconds... how many tables does your app has? I think you are doing
> something wrong somewhere...
>
> Richard
>
> On Tue, Dec 8, 2015 at 1:53 PM, Aydin S >
> wrote:
>
>>
:31 UTC-5, Aydin S wrote:
>
> I am testing it with a test code which is exactly what I wrote so there is
> only one table with my field.
> I think it makes sense, that's why there is scheduler and cron developed
> for web2py. I'm trying to understand if I should run model1
Thanks, that makes sense. Ok test2 in the above code comes from a potentiometer
that is sensed inside the module. Right now I'm not really doing anything
specific and I'm using the code I put in here; I'm just trying to learn.
So what you said matches with my tests that with http request it gets
Hi, how to run web2py without a need to specify the IP?
Running machine is linux. I know how to modify the file widget.py to
eleminate the need for password, but I'm stuck to get it work with an
pre-selected IP, meaning that to get web2py server to run from public IP
always and not to ask me to
e). From now on, you can start web2py simply
> issuing
>
> web2py.py -i 0.0.0.0 -p 8000 -a ''
>
> and web2py won't ask for a single thing.
>
> BTW: all commandline options are documented here
> <http://web2py.com/books/default/chapter/29/04/the-core#Command
I found it out. Just used the hostname after -i.
quinta-feira, 29 de Janeiro de 2015 às 21:33:08 UTC-5, Aydin S escreveu:
>
> Thanks so much for the very useful and precise answer. I understood,
> however, what I meant with public IP was not 0.0.0.0, I mean public IP
> assigned t
Hi, I'm trying to run web2py from linux. However, it fails with this error:
ERROR:Rocket.Errors.Port8000:Socket hostname:8000 in use by other process
and it won't share.
WARNING:Rocket.Errors.Port8000:Listener started when not ready.
I have tried various ports like 8001, and it fails still. Ther
typically ties up the port for several
>> minutes after the process has completed.*The length of the associated
>> timeout varies on different operating systems, and may be dynamic on some
>> operating systems, however typical values are in the range of one to four
>> min
, in windows it works fine with the public IP.
Any idea what's going on?
sexta-feira, 30 de Janeiro de 2015 às 08:06:26 UTC-5, Aydin S escreveu:
>
> Thanks for the replies.
>
> Mirko, do you mean I should wait for couple of minutes and run web2py and
> it will work?
>
Now the question is, my IP is dynamic, is there any way to run web2py from
public IP always without the need to enter the IP address? Web2py it self
gets the IP address, is there anyway to use that?
sexta-feira, 30 de Janeiro de 2015 às 08:14:48 UTC-5, Aydin S escreveu:
>
> I found ou
Hi, i tried to run web2py from public IP in linux like this: web2py -i
hostname -a pass
It did not work. I realized it was due to using hostname; it works fine
when doing web2py -i 192.168.0.0(for example) -a pass
Is there any way to not enter the IP address every time? I know web2py
itself rea
, 2015 at 2:43:02 PM UTC+1, Aydin S wrote:
>>
>> Hi, i tried to run web2py from public IP in linux like this: web2py -i
>> hostname -a pass
>> It did not work. I realized it was due to using hostname; it works fine
>> when doing web2py -i 192.168.0.0(for example) -a
Hi, does anyone know why web2py does not run on startup using crantab?
(linux machine)
When I call web2py.py normally in terminal it works fine, python web2py.py.
When I put the following command in the crantab it does not run. @reboot
python /root/web2py.py &
I've tested to see if the cronta
Hi, I finally got to know that web2py is best to be used in the startup
using system level configuration not as cron. I gave up running it from
crontab because it didn't work.
I
read
http://web2py.com/books/default/chapter/29/13#One-step-production-deployment
and implemented what is said in th
Thanks that was useful.
On Friday, 30 January 2015 22:34:30 UTC-5, Massimo Di Pierro wrote:
>
> This should not be the case.
>
>
> http://stackoverflow.com/questions/20778771/what-is-the-difference-between-0-0-0-0-127-0-0-1-and-localhost
>
> On Friday, 30 January 2015 16
Yes, I got it thanks.
On Friday, 30 January 2015 09:16:51 UTC-5, Michele Comitini wrote:
>
> One trick that could somewhat accelerate the release of a port not
> properly closed by a server is trying to connect to it.
> for instance:
>
> nc 127.0.0.1 8000
>
> and then CTRL-C
>
> the trick awakes
process exited, code=exited status=2
systemd[1]: Unit web2py.service entered failed state.
Any idea what's going on?
On Sunday, 1 February 2015 16:12:04 UTC-5, Aydin S wrote:
>
> Hi, I finally got to know that web2py is best to be used in the startup
> using system level configu
I appreciate if anyone can help with the following issue:
I'm trying to run web2py in startup on beaglebone (linux Debian). The
problem is that it does not start on the boot; however when i do service
web2py start, it starts and works. The reason I know it does not start on
the boot is that b
I've installed web2py using sudo ./setup-web2py-ubuntu.sh on Debian (BBB)
However, web2py does not start on startup. I did a test I did service
web2py start, it did not start. In another test I did service web2py stop
and then service web2py start and it worked.
Does anyone have any idea what
Hi, Upstart does not exist in the debian on beaglebone and i do not want to
mess with that. There is a script developed in
https://github.com/web2py/web2py/blob/master/scripts/setup-scheduler-centos.sh
which uses chkconfig to add the service to the start up. chkconfig also
does not exist in the
I read the solutions for this error, could not resolve it. Before, I had
the following code in the access.py deleted and everything worked fine.
if request.is_https:
session.secure()
elif not request.is_local and not DEMO_MODE:
raise HTTP(200, T('Admin is disabled because insecure channel'
This is probably very simple, sorry in advance!
I have a form defined in a model file:
db.define_table('table1',
Field('X', 'integer'))
I have a controller that is also defined as:
def index():
form = SQLFORM(db.X)
return dict(form=form)
In my index view file I have:
Input form
{{=form
No, the value of the form gets processed every time the scheduler runs.
On Tuesday, 28 April 2015 21:07:42 UTC-4, Dave S wrote:
>
>
>
> On Tuesday, April 28, 2015 at 6:01:04 PM UTC-7, Aydin S wrote:
>>
>> This is probably very simple, sorry in advance!
>> I have
It looks like the scheduler which is a model file does not see variable X
in the database!
On Tuesday, 28 April 2015 21:19:14 UTC-4, Aydin S wrote:
>
> No, the value of the form gets processed every time the scheduler runs.
>
> On Tuesday, 28 April 2015 21:07:42 UTC-4,
it use the last entered row?
On Wednesday, 29 April 2015 08:27:22 UTC-4, Anthony wrote:
>
> See answer on SO: http://stackoverflow.com/a/29932995/440323
>
> On Tuesday, April 28, 2015 at 9:35:31 PM UTC-4, Aydin S wrote:
>>
>> It looks like the scheduler which is a model file
able1.id, limitby=(0, 1))
>
> That sorts in reverse order based on ID and takes the first record.
> Alternatively, you could include a record creation timestamp and sort based
> on that.
>
> Anthony
>
> On Wednesday, April 29, 2015 at 9:31:50 AM UTC-4, Aydin S wrote:
>>
>&g
t;
> Anthony
>
> On Wednesday, April 29, 2015 at 2:38:05 PM UTC-4, Aydin S wrote:
>>
>> Thanks Anthony, This works fine, I also added the field name because I
>> want to get only the value of X, so I used:
>> db(db.Table1).select(db.Table1.X, orderby=~db.Table1.i
I double checked my scheduler and found out a problem and fixed; right now
it is working as expected. Thanks for the help and guidance.
On Wednesday, 29 April 2015 17:19:44 UTC-4, Aydin S wrote:
>
> Yes, I got it, thanks. There is one problem regarding scheduler though.
> In my con
When I try to create a new model in web2py for scheduller I get an error.
The model is as follows
`def f():
a = 2
return ()
from gluon.scheduler import Scheduler scheduler =
Scheduler(db,dict(our_function=f))
I get the following error:
`
Traceback (most recent call last):
File "/h
I want to initialize a few things on a linux machine running web2py server.
Meaning that a init.py file to be run in the boot, things initilized in
init.py will be used in web2py environment, can scheduler do it? If so, I
should set the number of repeats to 1?
--
Resources:
- http://web2py.c
Wednesday, May 20, 2015 at 12:28:37 PM UTC-7, Aydin S wrote:
>>
>> I want to initialize a few things on a linux machine running web2py
>> server. Meaning that a init.py file to be run in the boot, things
>> initilized in init.py will be used in web2py environment, can sch
grate=False)
>
> On Wed, May 20, 2015 at 9:25 PM, Aydin S >
> wrote:
>
>> When I try to create a new model in web2py for scheduller I get an error.
>> The model is as follows
>>
>> `def f():
>> a = 2
>> return ()
>>
>> from
Thanks, yes the web2py is started from /etc/init.d
I wonder if I do that the imported pins will be in the web2py environment?
On Wednesday, 20 May 2015 17:50:11 UTC-4, Dave S wrote:
>
>
>
> On Wednesday, May 20, 2015 at 1:56:50 PM UTC-7, Aydin S wrote:
>>
>> I'm t
I'm trying to set a pin to high (for instance) in a periodic way using
web2py in an embedded linux.
I set the GPIO to output for example :
GPIO.setup(pin 20, output)
and then
if x>y
GPIO.setup(pin 20, high)
and run the scheduler every 10 second
The problem with this is that every 10 second when
I'm trying to create a second model and use scheduler to run it
periodically, but an error happens that the table exist already. I use this
at the end of the model:
from gluon.scheduler import Scheduler
Scheduler(db,dict(function=f))
And the error is correct because the first model that has the
Is there a way to create interrupts in the web2py environment?
--
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 s
I'm trying to run two different function with two different periodic times.
I think what you mean is that I still can do it using
from gluon.scheduler import Scheduler
Scheduler(db,dict(function1=f1,function2=f2))
and then in the schedule use function1 and function2 to create two
different peri
Thanks for the guidance, it worked after correcting the format I was
creating new tasks.
On Sunday, 5 July 2015 15:08:43 UTC-4, Anthony wrote:
>
> On Sunday, July 5, 2015 at 11:15:56 AM UTC-4, Aydin S wrote:
>>
>> I'm trying to run two different function with two differen
I am trying to learn from "my tiny website" app and use the slide show that
it is used there in the "images/images.html" view.
I created a new view like default/mynewpage.html and copied
"images/images.html" view into it; when I ran it there was an error "
"images" is not defined.
I did some de
48 matches
Mail list logo