import cPickle, os
def put_on_disk(file_name, data):
uploadfolder=os.path.join(request.folder, 'uploads')
fn = os.path.join(uploadfolder, file_name)
out_file = open(fn, 'w')
cPickle.dump(data, out_file)
out_file.close()
def get_from_disk(file_name):
I have decided to make rows a session variable but I am not sure if this is
a good idea!
def search():
form = SQLFORM.factory(
Field("start_date", type="date"),
Field("end_date", type="date"))
if form.process().accepted:
q = ((db.birthdays.bornday >= form.vars.start_date)
I figured it out, initially I was getting an error, it told me that I can
not split the date, then i did this:
def search():
form = SQLFORM.factory(
Field("start_date", type="date"),
Field("end_date", type="date"))
if form.process().accepted:
q = ((db.birthdays.bornday >=
Hi,
is your problem receiving no result or the wrong result? How is the table
definition of your birthday table and why is the birthday not just a field
a corresponding person table?
Best regards
Clemens
On Wednesday, February 19, 2020 at 10:49:11 PM UTC+1, mostwanted wrote:
>
> I'm trying to
I'm trying to use SQLFORM.factory to search by date but its failing, it is
somehow possible to that & i'm missing something?? If so where can i
rectify my code to give me results?
*MY FUNCTION*
def search():
form=SQLFORM.factory(Field('SEARCH', 'date')
if form.accepts(request):
t
It looks like table inheritance is affected by the same issue:
monster = db.Table(db, 'monster', Field('color'), Field('size'))
db.define_table('thing', Field('name'), monster)
The following traceback is the same as the error using
_enable_record_versioning() starting at *table = self.lazy_def
I have three applications all of which have mail functionality. Since this
gives a lot of dupliacte code I thought of moving all mail functionality
to its own mail application.
I have one masterapp controlpanel with the following code;
if not request.env.remote_addr in ['127.0.0.1', 'localhost']:
I made an app some time ago with Web2py/Vue is not being maintained
anymore, but maybe can help you.
https://github.com/robertop23/web2py_vuejs_vuetify
On Wed, Feb 19, 2020 at 4:18 PM Geordanis Baño Vega wrote:
>
> API with web2py and SPA|PWA with Vue, could be an option. Regards
>
> El mié., 19
I used this string to connect to postgresql database
db = DAL( "postgres://mauricewaka:b123test##@localhost:5432/mydb")
as well as this
db = DAL( "postgres://mauricewaka:b123##@localhost/test")
But got this error:
Traceback (most recent call last):
File "/home/maurice/py4web/py4web/core.py"
API with web2py and SPA|PWA with Vue, could be an option. Regards
El mié., 19 feb. 2020 a las 11:16, Andrew Rogers ()
escribió:
> I've been using Vue for just 30 mins and web2py for not much longer. I
> just wanted to get something really, really simple working. All i did was
> added this to inde
I've been using Vue for just 30 mins and web2py for not much longer. I just
wanted to get something really, really simple working. All i did was added
this to index.html. I am sure this is bad practice - just a first step to
trying to understand how things fit together. Thanks to Mirek's tip bel
Both do not work.
So I just got this:
import datetime as dt
default = dt.datetime.utcnow()
On Wed, Feb 19, 2020, 12:49 Alexander Hoch wrote:
> Try request.now with the function call (). only "default=request.now" and
> "update=request.now"
>
> Am Mi., 19. Feb. 2020 um 10:24 Uhr schrieb Mauri
Try request.now with the function call (). only "default=request.now" and
"update=request.now"
Am Mi., 19. Feb. 2020 um 10:24 Uhr schrieb Maurice Waka <
mauricew...@gmail.com>:
> Hello.
>
> I'm still stuck at this error:
>
> Field('modified_on', 'datetime', default=request.now(), update=request.n
Hello.
I'm still stuck at this error:
Field('modified_on', 'datetime', default=request.now(), update=request.now()),
File "/usr/local/lib/python3.6/dist-packages/bottle.py", line 1400, in
__getattr__
raise AttributeError('Attribute %r not defined.' % name)
AttributeError: Attribute 'now' n
14 matches
Mail list logo