Hello everyone, I have an existing table named db.news. I want to insert
multiple rows which are selected from the existing db.news to another
table. My code is like following:
news=db(db.news.id>=0).select(orderby=~db.news.release_time)[0:15]
db.news_temp.truncate()
db.news_temp.insert(news)
Thi
On Wednesday, March 9, 2016 at 11:32:46 PM UTC-5, Ron Chatterjee wrote:
>
> Later, I see. So, if I have to call a function within a function I need to
> define the other one in the model.
>
No, that's not the case. You said you need to use the function in multiple
controllers, so you cannot ther
for row in news:
db.news_temp.insert(**db.news_temp._filter_fields(row))
Anthony
On Thursday, March 10, 2016 at 5:37:36 AM UTC-5, Yibing Liu wrote:
>
> Hello everyone, I have an existing table named db.news. I want to insert
> multiple rows which are selected from the existing db.news to ano
Ive tried on a paid account and it works even with that error.
It might be the amount of processes limitation on free accounts.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/li
I was going to call the pagination from multiple controller. I have about
10 of them use pagination and tired of keep typing up the same over and
over again and clutter the page. Okay...so, these what I understood so far:
(1) I can make a call to pagination from multiple controller inside
defau
Does anyone know if there is a way to perform set difference (ie the
elements in set A that are not in set B) using database queries / DAL?
for example if you had some tables defined like this:
db.define_table('thing',
Field('name'))
db.define_table('owns',
Field('p
The basic concept of what you need is presented here :
https://groups.google.com/d/msg/web2py/oiyOIC0IH04/6-NvVOJECU8J
You just have to adapt it... Add more field and change field/table names,
etc.
But it does basically what you need...
Richard
On Wed, Mar 9, 2016 at 5:04 PM, Yoel Baez wrote:
given that scheduler auto imports definition, it doesn't know that you are
using a custom adapter.
On Thursday, March 10, 2016 at 3:02:54 PM UTC+1, Alfonso Serra wrote:
>
> Ive tried on a paid account and it works even with that error.
>
> It might be the amount of processes limitation on free ac
Maybe something like this? (not tested)
already_owns = db(db.owns.person == person_id)._select(db.owns.thing)
things_not_owned = db(~db.thing.id.belongs(already_owns)).select()
-Jim
On Thursday, March 10, 2016 at 8:49:32 AM UTC-6, Paul wrote:
>
> Does anyone know if there is a way to perform
IMHO you should read the manual. no rabbit holes included.
On Thursday, March 10, 2016 at 1:11:12 AM UTC+1, Shayn Raney wrote:
>
> This is some rabbit hole, looks like I need to do the following for some
> odd reason.
>
> db = DAL('sqlite://TestDB.sqlite', migrate_enabled=False)
>
>
>
> On Wed
works!
Thanks Jim!
On Thursday, March 10, 2016 at 9:55:33 AM UTC-5, Jim S wrote:
>
> Maybe something like this? (not tested)
>
> already_owns = db(db.owns.person == person_id)._select(db.owns.thing)
>
> things_not_owned = db(~db.thing.id.belongs(already_owns)).select()
>
>
> -Jim
>
> On Thursday
It turns out that the issue wasn't even related to IS_NOT_EMPTY()... Since
the field wasn't include it couldn't block the form to submit... Though I
may have the issue in other form where it is included..
What was the root cause of my issue was in fact (as far as I can
understand) that the id fiel
Hi Guys,
Trying to draw some graphs using pygal and below link:
http://www.web2pyslices.com/slice/show/1634/beauty-graphics-and-charts-with-pygal
It works fine, but my view display only graph, without anything else
included in the view e.g. headers, styling etc.
Controller:
def graph():
On Wednesday, March 9, 2016 at 6:06:45 PM UTC-5, Shayn Raney wrote:
>
> So I take it I need to redescribe the DB again using define_table()? Ok,
> it works! So strange. I'm use to web.py SQL actions.
>
The DAL models let you do a lot more via Python than you can do with
web.py, which is not
On Wednesday, March 9, 2016 at 7:11:12 PM UTC-5, Shayn Raney wrote:
>
> This is some rabbit hole, looks like I need to do the following for some
> odd reason.
>
> db = DAL('sqlite://TestDB.sqlite', migrate_enabled=False)
>
>
No, you shouldn't need to do that (unless you want to protect against
Thanks for the help. I'm still working on this - I will come back with some
code to show what worked for me - but just wanted to correct another typo
in my code.
The correct syntax for referencing other tables is not:
Field('project_id', 'references projects')
but:
Field('project_id', 'refere
Hello,
I'm trying to use a variable from a form in an onupdate function, but
because I've set it to writeable=False in the controller, it doesn't get
passed in form.vars. In more depth:
I've got a table for volunteers to post offers of help on a project. Those
have to be approved by an admin b
On Thursday, March 10, 2016 at 9:35:08 AM UTC-5, Ron Chatterjee wrote:
>
> I was going to call the pagination from multiple controller. I have about
> 10 of them use pagination and tired of keep typing up the same over and
> over again and clutter the page. Okay...so, these what I understood so f
Thanks.
On Thursday, March 10, 2016 at 2:13:21 PM UTC-5, Anthony wrote:
>
> On Thursday, March 10, 2016 at 9:35:08 AM UTC-5, Ron Chatterjee wrote:
>>
>> I was going to call the pagination from multiple controller. I have about
>> 10 of them use pagination and tired of keep typing up the same ove
You can't get it in you onupdate function?
You already retrieve auth_user row, so I guess instead of use form.vars
instance for this piece of information...
Though I am not sure what is exactly you problem...
Richard
On Thu, Mar 10, 2016 at 1:34 PM, David Orme wrote:
> Hello,
>
> I'm trying t
Not complete my sentence :
You already retrieve auth_user row, so I guess instead of use form.vars
instance for this piece of information you can get it from auth_user row...
On Thu, Mar 10, 2016 at 2:41 PM, Richard Vézina wrote:
> You can't get it in you onupdate function?
>
> You already ret
Here is another piece:
http://mdipierro.github.io/stupid.css/widgets/index.html
The work with web2py forms if you manually add the data-format and
data-range. For example
for e in form.elements('.datetime'):
e['_data-format'] = '{DD}/{MM}/{year} {hh}:{mm}:{ss}'
for e in form.elements('.do
That's the problem - the auth_user row _can't_ be retrieved because
form.vars.volunteer_id is None.
--
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 r
On Thursday, March 10, 2016 at 12:01:47 PM UTC-8, David Orme wrote:
>
> That's the problem - the auth_user row _can't_ be retrieved because
> form.vars.volunteer_id is None.
>
Is this one of the places you should set it in your controller before
calling form.process()?
In regular SQLFORM, tha
Ok, your form is not over auth_user... Sorry fast reading does that...
You can use session then...
session.volunteer_id = db.table(row_id).volunteer_id
Or
You can passe it as request vars :
URL(..., vars=dict(volunteer_id=db.table(row_id).volunteer_id))
Though, I am not sure you will be able
If you use session be aware that the value you put in session will remain
there for the duration of the session, so you need to carefully reset them
or init them in order to not create bug...
As Dave S mention SQLFORM() wouldn't maybe suffer from this issue as you
can do that :
form = SQLFORM(...
I had done this shown below
Field('dob','date',requires = IS_DATE_IN_RANGE(format=T('%Y-%m-%d'),
minimum=datetime.date(1980,1,1),
maximum=datetime.date(2030,12,31),
i am getting an error as-
I am once again in trouble. I have installed Sahana in dell poweredge R410
Rake server . with public IP. Sahana EDEN as server installation framework
is (Web2py webserver, PostgreSQL as the database, Cherokee. I have done
some customizations as well. Now I need to know that after 3 or 4 days i
Hi
I have a web2py app on GAE at the moment that takes some of its data by
parsing a hard coded string constant (at the moment, it has a half a dozen
rows each with half a dozen or so columns).
I plan to expand this to have dozens of rows and updated every couple of
months with 3 or 4 more. I
On Thursday, March 10, 2016 at 1:07:01 PM UTC-8, Snehal Ashtekar wrote:
>
> I had done this shown below
>
> Field('dob','date',requires = IS_DATE_IN_RANGE(format=T('%Y-%m-%d'),
>
> minimum=datetime.date(1980,1,1),
>
On Thursday, March 10, 2016 at 1:07:18 PM UTC-8, shoaib jan Jan wrote:
>
> I am once again in trouble. I have installed Sahana in dell poweredge
> R410 Rake server . with public IP. Sahana EDEN as server installation
> framework
> is (Web2py webserver, PostgreSQL as the database, Cherokee. I h
Hi!
1. it is not quite clear for me, what is the goal of client/property
fields? Are they search fields?
2. If you want user to fill/edit/del all these fields (without server
interaction) and submit result at once - it's impossible without having
some JS-coding
3. Your Bulk
If I want to remove the welcome app from my server, and have a bare
hostname URLto somewhere appropriate (rather than "invalid function"), I
should set up routes.py?
And in 2.13.4-stable, main.py L388 +/- is where the welcome app is made the
default?
/dps
--
Resources:
- http://web2py.com
-
it's nice I am impressed
Le jeudi 10 mars 2016 20:43:03 UTC+1, Massimo Di Pierro a écrit :
>
> Here is another piece:
>
> http://mdipierro.github.io/stupid.css/widgets/index.html
>
> The work with web2py forms if you manually add the data-format and
> data-range. For example
>
> for e in form.ele
Is there a way to show the smartgrid search bar without showing the
dropdown search box? I find the dropdown search can be confusing. Like the
grid with search and clear button but want to exclude the drop down menu
that comes in below with =,<,>, +And, Or...etc.
--
Resources:
- http://w
Massimo you need to detect mouseleave in the number slider widget.
Otherwise I can click with the mouse drag a little bit, then keeping the
left mouse button pressed leave the element and, finally, let the mouse
button go. Now if my mouse (which has no buttons pressed at this time) even
hovers
another piece: http://mdipierro.github.io/stupid.css/themes/dashboard.html
On Thursday, 10 March 2016 18:53:54 UTC-6, eric cuver wrote:
>
> it's nice I am impressed
>
> Le jeudi 10 mars 2016 20:43:03 UTC+1, Massimo Di Pierro a écrit :
>>
>> Here is another piece:
>>
>> http://mdipierro.github.io/
Yes, set routes.py in your web2py folder.
A very simple routes.py for you can just be:
routers = dict(
BASE=dict(
default_application='YourApplicationName',
),
)
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source
On Tuesday, March 8, 2016 at 4:01:00 PM UTC-8, Dave S wrote:
>
>
>
> On Tuesday, March 8, 2016 at 1:04:50 PM UTC-8, Massimo Di Pierro wrote:
>>
>> I would like to buy a .ham.burger
>> http://mdipierro.github.io/stupid.css/themes/hamburger.html
>>
>
> Oh, my!
>
I like the card divs you added (as
On Thursday, March 10, 2016 at 6:42:19 PM UTC-8, Leonel Câmara wrote:
>
> Yes, set routes.py in your web2py folder.
>
> A very simple routes.py for you can just be:
>
> routers = dict(
> BASE=dict(
> default_application='YourApplicationName',
> ),
> )
>
>
Thanks!
/dps
--
Res
Yes give it advanced_search=False as a kwarg.
You can then actually make the one input text box search pretty smart if
the default isn't good enough for you. You can set searchable to a function
where you build a nice query from the text with your knowledge of the
domain.
--
Resources:
-
how to store the data from html form into database?
--
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 t
42 matches
Mail list logo