Hi,
How can i make DAL create MyISAM tables instead of InnoDB when i enter the
appadmin interface?
Thanx.
--
Oguz Yarimtepe
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To uns
I am using the following code to generate csv file:
""
import gluon.contenttype
response.headers['Content-Type'] = \
gluon.contenttype.contenttype('.csv')
response.headers['Content-disposition'] = 'attachment;
filename=members_approaching_renewal_report.csv'\
#% tup
Hello,
I have db table: SQLFIELD( row_id, string), SQLFIELD(image, upload)
how do I make image name look like row_id + ".jpeg"?
I'm now using SQLFORM.
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to web..
I believe this code trap only links inside .ajax loaded page.
At least my plugin works well with this patch.
Thank you for checking this.
On 6 янв, 02:42, mdipierro wrote:
> This is useful but I am not convinced it should be the default.
> Perhaps we can capture only links of class "trapped".
--
aha! Good point. This is one of the problems we had to solve when
designing web2py.
When web2py creates a form, it stores two hidden fields into it:
_formname and _formkey. If a form is submitted it contains _formname.
accepts perform validation only in this case. If a field does not pass
validati
obviously if the there is no data form.accepts() returns false.
if form.accepts() #returns true or false wrote:
> I can not understand form.accepts(). I think it's because my intuitive
> understanding of web2py is wrong. Here's how I think it works:
>
> A simple controller function ( index() say)
I guess the book needs some cleanup in this respect.
I normally expire sessions in the model iteself. No cron and no
process.
On Jan 5, 10:08 pm, John Heenan wrote:
> I am a bit of a loss though as to why page 121 provides the following
> web2py specific web2py/applications/xxx/cron/crontab entr
You need both since there is a small (very small) probability that two
users in different threads pass validation of the same new value and
then both of them reach the db.
On Jan 5, 10:04 pm, Christopher Helck
wrote:
> Is it better to add validation at the DB level through Field level
> constrain
You are right. sqlite cannot drop columns and this means web2py cannot
change the contraint from unique=False to unique=False. Although it
will change the validator and it will enforce the contraint in forms.
On Jan 5, 9:43 pm, Christopher Helck
wrote:
> I'm able to reproduce the problem.
> 1. De
I can not understand form.accepts(). I think it's because my intuitive
understanding of web2py is wrong. Here's how I think it works:
A simple controller function ( index() say) can return a string in which
case web2py will simply serve it up as a web page.
The same function can return a dictionar
My home internet connection is unusable today. I even have difficulty
reading this posts. I look forward to try this tomorrow!
On Jan 5, 8:06 pm, Jon Romero wrote:
> You can see it live here (and you can download the
> source):http://fbconnect-demo.emotionull.com/
>
> I am uploading the source a
I am a bit of a loss though as to why page 121 provides the following
web2py specific web2py/applications/xxx/cron/crontab entry example for
expiring sessions:
@hourly root *applications/admin/cron/expire_sessions.py
AND why page 123 provides an example of how to run web2py crontabs
from /etc/cro
Download http://web2py-crm.appspot.com
It contains a plugin_tagging that is reusable. I have a new version in
the working with some minor improvements that you will be able to swap
when done.
Massimo
On Jan 5, 8:02 pm, s...@pobox.com wrote:
> In the reading and experimenting I've done so far I h
Is it better to add validation at the DB level through Field level
constraints like 'unique' or to validate at the form? When would it make
sense to validate at the DB level?
Thanks,
C. Helck
--
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To p
I'm able to reproduce the problem.
1. Delete all database files.
2. Create table 'foo' without the unique attribute and add the three rows.
No errors because there is no unique constraint.
3. Add 'unique=True' to table foo's definition and add the three rows. No
error. I guess Sqlite can't update e
80/20 gets in the way sometimes... 50/50 would be a better goal...
providing reasonable defaults, but also a reasonable way to customize
or rewrite base modules. I say 50/50 because there is NO way any
system can provide everything every developer may ever need. Though
django/werkzeug etc follow t
On Jan 5, 7:21 pm, s...@pobox.com wrote:
> Thadeus> Web2py models/controllers/views are EXECUTED not IMPORTED.
>
> Sorry, I've been using Python for 15 years but haven't seen this distinction
> before. What do you mean "executed not imported"? If I edit some file does
> web2py notice the ch
It was aimed at Massimo's comment...
> If you do collaborative delopment and two or more people are working
> on the same app, the web based editor will prevent conflict and
> provide merge capabilities.
Exactly why in any "real" programming environment, unless your project
is highly unorganized.
You can see it live here (and you can download the source):
http://fbconnect-demo.emotionull.com/
I am uploading the source also on github and I'll make also a blog
post about it (even though it's TRIVIAL to use fbconnect in web2py).
I have made a change in facebook.py (a new function called
"fac
Thadeus> This is exactly why Source Code Management systems were created.
It's not at all clear where this comment was directed. I know perfectly
well how to use revision control. My questions were directed at the
edit-test-debug cycle and how editing files interacts with a running copy of
In the reading and experimenting I've done so far I have been frankly amazed
and how quickly I could put together something quasi-operational - database
with a few tables, a couple entry forms, not a lick of HTML (:barf:). Kudos
on the effective implementation of the 80/20 rule.
Now I'm at a stag
Upon each request, web2py scans the filesystem, loading
model/controller/view python files into a list of filenames. When a
request comes in, it then uses exec to execute the python file in the
current globals() (which is why you don't have to import web2py
things). So if the class/function is alre
This is exactly why Source Code Management systems were created.
-Thadeus
On Tue, Jan 5, 2010 at 6:58 PM, mdipierro wrote:
> There is difference between editing a file via the web based IDE
> (admin) or via the file system. Web2py does not store any meta-data
> and editing does not trigger a
Thadeus> Web2py models/controllers/views are EXECUTED not IMPORTED.
Sorry, I've been using Python for 15 years but haven't seen this distinction
before. What do you mean "executed not imported"? If I edit some file does
web2py notice the change in timestamp then execfile(...) it or reload(.
Let me explain one of the problems from decoupling forms from their
HTML representation.
data has different representations depending on its status in the
system. For example in a submitted mime multipart form a file is a
FieldStorage object with a file and a filename attribute. A file in
Python i
There is difference between editing a file via the web based IDE
(admin) or via the file system. Web2py does not store any meta-data
and editing does not trigger any action. The file is reloaded and
executed at every request UNLESS the app is "compiled". In this case
you changes only take action if
Sorry. I am not sure I understand the question.
This is not a valid expression:
db.post.widget = lambda id: 'e'
Only fields have widgets, not tables. widgets for fields should be
HTML helpers.
Massimo
On Jan 5, 5:40 pm, pihentagy wrote:
> Hi!
>
> I also have a similar problem:
>
> Doing th
Web2py models/controllers/views are EXECUTED not IMPORTED.
Therefore, any changes made to files in these folders, are executed on
the next and subsequent requests.
You only need to flush/stop/start if you change say a MODULE (that is
imported) or similar.
You would never, and should never edit a
Thadeus> If your going to use an editor on your local computer why
Thadeus> are you going to even bother with using web2py to view the
Thadeus> files... If your already going to have
Thadeus> Explorer/Nautilus/ you can just
Thadeus> double click the files and edit them...
> db.post.widget = lambda id: 'e'
Tried also with db.post.represent.
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to
web2py+unsubscr...@g
Hi!
I also have a similar problem:
Doing the blog crash course:
db.define_table('post',
Field('title',length=256),
Field('body','text',requires=IS_NOT_EMPTY()),
Field('author',db.auth_user))
db.post.widget = lambda id: 'e'
db.post.title.represent = lambda title: B(title)
db.define_tab
We have looked at it... and I even said that Its All Text is the way
to go... and that we shouldn't worry about this for web2py, we have
lots of other things on our plates besides this, such as the new DAL,
figuring out a better plugin system, etc etc..
Its all text gives the functionality of the
I think what he really wants is the same thing I have been discussing
for quite a while :)
For now, sqlform.custom is the way to go
http://web2py.com/AlterEgo/default/show/205
-Thadeus
On Tue, Jan 5, 2010 at 4:25 PM, mdipierro wrote:
> I think this should do it:
>
> form=SQLFORM(...)
> for
Seriously, has anyone looked at the suggested "Its All Text" yet?
You configure a path to your editor of choice (for me its vim). It
injects a little icon into the bottom right corner of any textarea on
a webpage. When you click it, it launches your editor of choice (with
all its syntax highligh
I think this should do it:
form=SQLFORM(...)
form.components=[row[1][0] for row in form[0].components]
You can try variations
On Jan 5, 4:18 pm, Alexandre wrote:
> Hi,
>
> I would like to get SQLFORM without tables, just one field on top of the
> other, is that possible?
>
> It would be nice if
I am. I will probably apply all the patches tonight or tomorrow. I
also have Sphinx patch from Tim.
Massimo
On Jan 5, 3:45 pm, Thadeus Burgess wrote:
> Are you not receiving any of my attachments by email?
>
> -Thadeus
>
>
>
>
>
> On Tue, Jan 5, 2010 at 2:35 PM, mdipierro wrote:
> > waiting for
Hi,
I would like to get SQLFORM without tables, just one field on top of the
other, is that possible?
It would be nice if instead of a table, we could iterate through the fields
in SQLFORM, so that we could represent it anyway we would like.
Thanks,
Alexandre Rosenfeld
Eng Comp 06 - USP São Car
Yes
-Thadeus
On Tue, Jan 5, 2010 at 3:13 PM, mdipierro wrote:
> Thanks!
>
> Can I count on Thadeus to keep track and store plugins?
>
> Massimo
>
> On Jan 5, 2:49 pm, KMax wrote:
>> And finaly membership manager was done.
>> You could download it from following link (should be active for
>
Are you not receiving any of my attachments by email?
-Thadeus
On Tue, Jan 5, 2010 at 2:35 PM, mdipierro wrote:
> waiting for the patch by email
>
> On Jan 5, 12:13 pm, Thadeus Burgess wrote:
>> Ah duh, column names...
>>
>> Here would be a proper fix.
>>
>> colnames = kwargs.ge
> if you say "open a shell" they say "open
> what?".
Tell me about it... lol
Many of my coworkers can't even figure out how to save a file in the
correct folder...
They find it extremely difficult to go up two folders and down another
level using save as...
I find it... comical.
I was also surpr
Thanks!
Can I count on Thadeus to keep track and store plugins?
Massimo
On Jan 5, 2:49 pm, KMax wrote:
> And finaly membership manager was done.
> You could download it from following link (should be active for
> month)http://files.mail.ru/73S2GEorhttp://files.mail.ru/QXD2TK
> Just unpack (tar
Thanks again for the examples Massimo.
They help a lot.
On Jan 5, 12:24 pm, mdipierro wrote:
> You can do things like
>
> db.define_table('person',Field('name'),
> Field('friends',gae.ListProperty(int),readable=False,writable=False))
>
> now you can do:
>
> tim=db.person.insert(name='Tim',friends
I see!
Feels like GAE needs special attention in comparisons to other DB.
I ask myself if this is worth. I personally think so, and would like
to help more.
On Jan 5, 1:55 am, mdipierro wrote:
> There is one problem though. The delete cascade cannot be done in a
> trasaction so there is the possi
You can hack OpenShare (http://openshare.emotionull.com/). It's on
bitbucket, written on web2py, running on GAE.
On Jan 5, 10:36 pm, mdipierro wrote:
> do not assume we know exactly what ASP ad_rotator does. Make a wish
> about the functionlity you expect/need and somebody may want to write
> a p
And finaly membership manager was done.
You could download it from following link (should be active for month)
http://files.mail.ru/73S2GE or http://files.mail.ru/QXD2TK
Just unpack (tar.bz2 and rar variant provided) in to your application
( aware web2py_ajax.html will be overwriten)
Create at leas
You should leave that line as you did because it makes sure you do not
gen an empty flash on load.
This is useful but I am not convinced it should be the default.
Perhaps we can capture only links of class "trapped".
On Jan 5, 2:11 pm, KMax wrote:
> Hello
> I've done small modification to web2
all I ever needed was emacs and grep but you will be surprised of how
many students I see who, if you say "open a shell" they say "open
what?".
On Jan 5, 1:31 pm, Thadeus Burgess wrote:
> Here is my confusion
>
> If your going to use an editor on your local computer why are you
> going to
do not assume we know exactly what ASP ad_rotator does. Make a wish
about the functionlity you expect/need and somebody may want to write
a plugin for it.
On Jan 5, 11:24 am, "K.R.Arun" wrote:
> But how can I track user location, browser type etc., also Number of
> clicks on each link etc.
> That
waiting for the patch by email
On Jan 5, 12:13 pm, Thadeus Burgess wrote:
> Ah duh, column names...
>
> Here would be a proper fix.
>
> colnames = kwargs.get('colnames', self.colnames)
> # a proper csv starting with the column names
> writer.writerow(colnames)
>
> So
>
If you just install the GAE dev_appserver you should be able to import
google in web2py. Just make sure you run web2py from source using the
sane Python you used to install appserver
On Jan 5, 11:23 am, "K.R.Arun" wrote:
> What's are the steps I should taken care of to use google-appengine-
> py
Hello
I've done small modification to web2py_ajax.html (to function
web2py_trap_form precisely) to support not only forms but A links
also.
#function web2py_trap_form(action,target) {
# jQuery('#'+target+' form').each(function(i){
# var form=jQuery(this);
# jQuery(':submit,.submit',
well, I think there are so many solutions to do this, but I don't have
a perfect solution for this,
this simplest one might be limit only one process running for web2py,
like
WSGIDaemonProcess myweb2py processes=1
I know this is a silly solution,
or you have to hack relative source code not to us
Here is my confusion
If your going to use an editor on your local computer why are you
going to even bother with using web2py to view the files... If your
already going to have Explorer/Nautilus/ you
can just double click the files and edit them...
There would be no way for you to use an
Werner> It would be IMHO much nicer if there would be a web2py
Werner> configuration where everyone can select his/her preferred editor
Werner> and that would be launched when one clicks on the web2py edit
Werner> link.
That's pretty much what It's All Text does for you. When act
Hi Thadeus,
Thadeus Burgess wrote:
> There is no way for the browser to launch programs on the clients
> computer, this would be an inherit security vulnerability which is why
> browsers do not allow websites to do this.
>
> The only way is like a firefox plugin that performs this... but not
> ev
Thank you for this information, that makes sense! I started talking
to achipa.
My use for @reboot was to implement background processes to provide
similar functionality to GAE task/work queues (like in a producer-
consumer pattern). But perhaps there is a better way to spawn that
thread.
One pr
Ah duh, column names...
Here would be a proper fix.
colnames = kwargs.get('colnames', self.colnames)
# a proper csv starting with the column names
writer.writerow(colnames)
So
export_to_csv(..., colnames=['Field1', 'Field2', 'Field3',]
-Thadeus
On Tue, Jan 5, 2010
There is no way for the browser to launch programs on the clients
computer, this would be an inherit security vulnerability which is why
browsers do not allow websites to do this.
The only way is like a firefox plugin that performs this... but not
everyone uses firefox.
I only use the web2py admi
You will need to look at the headers for that information link
clicks on each link will need to use javascript, or a link redirects
itself to another function that rewrites the url to the correct link
registering the link as being clicked, like tinyurl but keeps track of
how many times it goes
no.
Well... the only way to verify, is if you have an AJAX callback to the
server if you receive the callback, they have javascript... if you
don't receive one... then they dont.
def receive_if_js():
session.has_javascript = True
def index():
if session.has_javascript:
...
{{
...
There is a way of using the represent attribute...
so export_to_csv(..., represent=True)
Will use the fields represent attribute
db.table.field.represent = lambda id:
-Thadeus
On Tue, Jan 5, 2010 at 10:39 AM, mdipierro wrote:
> as a short term trunk, you could just replace the f
Cool :)
I'm liking Postgres more and more.
-Thadeus
On Tue, Jan 5, 2010 at 8:31 AM, mdipierro wrote:
> in web2py you can do db().select(limitby=(a,b)) and this translates in
> fetching (b-a) records starting with the a-th.
> On postgresql this is implemented as LIMIT (b-a) SKIP a.
>
> Oracl
Is it possible to know whether client support Java Script or not from
the server side?
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to
we
But how can I track user location, browser type etc., also Number of
clicks on each link etc.
That's the complete solution and That's what I'm asking for.
On Jan 5, 9:14 pm, mdipierro wrote:
> You can use
> this:http://thecodecentral.com/2008/11/12/ctrotator-a-flexible-itemimage-r...
>
> There a
What's are the steps I should taken care of to use google-appengine-
python apis in web2py project.
I think adding google-appengine-python installation directory in
SYS.PATH will work, but don't know how to do it !! :(
Any help ??
--
You received this message because you are subscribed to the Go
mdipierro wrote:
Works for me but I first have to [toggle editor] then the [edit]
button appears.
Works for me too, but I have to "toggle editor" for every file I want to
edit before the "edit" button appears.
It would be IMHO much nicer if there would be a web2py configuration
where everyone
Oleg wrote:
Have you tried "It's All Text" Firefox extension?
https://addons.mozilla.org/en-US/firefox/addon/4125
Yes, but it is just a text editor, no syntax highlight etc etc. That is
what UliPad would bring to the party.
Werner
--
You received this message because you are subscribed to t
Thadeus Burgess wrote:
Currently I am trying out Wing IDE, and it is an awesome python
development environment.
I have also used web2py with Netbeans, Eclipse + PyDev, and recently I
have just been using Gedit for all of my code.
If I could afford Wing IDE I would use it explicitly.
You
as a short term trunk, you could just replace the first line in a the
csv file.
On Jan 5, 10:37 am, mdipierro wrote:
> Right now there is no way to customize the column names in
> export_to_csv_file.
> We could add it. do you call export_to_csv_file explicitly?
>
> On Jan 5, 10:23 am, Neveen Adel
Right now there is no way to customize the column names in
export_to_csv_file.
We could add it. do you call export_to_csv_file explicitly?
On Jan 5, 10:23 am, Neveen Adel wrote:
> I want to rename The column names to be readable to users and then i
> will generate the csv report by str(family_me
I want to rename The column names to be readable to users and then i
will generate the csv report by str(family_members) so i cant use
SQLTable.
And by using
db.member.name.label = name
db.member.member_id = member ID
the columns are displayed with their names e.g: member.name and
member.membe
You can use this:
http://thecodecentral.com/2008/11/12/ctrotator-a-flexible-itemimage-rotator-script-for-jquery
There are other jquery rotators.
Massimo
On Jan 5, 9:54 am, "K.R.Arun" wrote:
> Hi,
>
> Yesterday in my lecture class I studied about Ad Rotator component in
> ASP.
> Is there any sim
thanks
On Jan 5, 9:48 am, John Heenan wrote:
> On Jan 6, 1:40 am, John Heenan wrote:
>
>
>
> > Here is a hint for using the book listed command
> > nohup python web2py.py -S yourapp -R scripts/sessions2trash.py &
> > in /etc/rc.local, to enable automatic start of this script on boot.
>
> This hi
I have seen at AlterEgo about PyJamas and Web2Py integration.
But isn't that similar method enable as to do the same with plain GWT?
I prefer GWT because it is always ahead of PyJamas and offer many
never miss things, And I already have experience with it.
What are the things to be noticed while
Hi,
Yesterday in my lecture class I studied about Ad Rotator component in
ASP.
Is there any similar plug-ins for web2py (or any other python
framework.)
If there is one guide me, else Help me to write one, so we all get
benefited.
Arun
--
You received this message because you are subscribed to
On Jan 6, 1:40 am, John Heenan wrote:
>
> Here is a hint for using the book listed command
> nohup python web2py.py -S yourapp -R scripts/sessions2trash.py &
> in /etc/rc.local, to enable automatic start of this script on boot.
>
This hint is of course only relevant if you don't already use /etc/
hi,
Sorry for my own foolishness.
I done all those things in my previous post (that's still waiting for
moderation) but I missed one info from your previous post, "This is
because if you load a part of a page via ajax you do not want that
part of the page to {{extend 'layout.html'}}. "
And exact
Chapter 11 (on deployment recipes) of the Web2py book (2nd edition)
contains an errata on page 302.
This page lists the contents of file scripts/sessions2trash.py. Line
11 of the file is listed as
unlink(filename)
This line should be
os.unlink(filename)
This is also a bug in the web2py distribut
I tried Register
but nothing happened when I clicked the button.
Then I tried again by adding {{=LOAD
('default','register',ajax=True,ajax_trap=True)}} to the view I get
following result.
loading...
but if ajax=False then the register's view
I am sorry but I do not have enough information.
I suspect the error is due to try to unpicke something in an
environment when the class of one of the picked objects is not
defined.
Massimo
On Jan 5, 5:20 am, robsan wrote:
> BTW, my code runs well standalone. Only on web2py I get this error.
> C
The problem is here:
organization = db
(db.organization.id==session.organization_id).select()
session.organization = organization
you are storing a Rows object in the session and that should not be
done.
we manage to make it work (partially) without GAE but the retrieved
object is
Please do not override family_members.colnames. This was an internal
thing and its behavior changed in 1.72.*
Use db.table.field.label instead or SQLTABLE(rows,headers={})
depending on what you need.
On Jan 5, 4:12 am, Neveen Adel wrote:
> when i do the following code:
>
> family_members =db(db.
will look into this, thanks.
On Jan 5, 2:59 am, Michael Toomim wrote:
> This actually looks like a problem in interfacing web2py with the
> newest ipython, version .10. I am getting this error too.
>
> It happens while you're typing the python, before you execute it. For
> instance, type:
>
> I
In my example
click me
you are calling via ajax the action URL(r=request,f='callback'). If
the action has a view it will be used. Actually unless the action
itself returns a string, it must have a view, since the generic.html
view should not be used in this context. This is because if you load a
in web2py you can do db().select(limitby=(a,b)) and this translates in
fetching (b-a) records starting with the a-th.
On postgresql this is implemented as LIMIT (b-a) SKIP a.
Oracle does not support LIMIT and does not support SKIP/OFFSET
therefore this is implemented using three nested selects as
? what code.?
On Jan 4, 11:17 pm, mikech wrote:
> Version 1.74.4 (2009-12-23 10:12:11)
> in IE8 insists on putting displaying < > signs with the < ≷ -
> sort of confusing, though it shows ok later.
--
You received this message because you are subscribed to the Google Groups
"web2py-users" grou
You can do things like
db.define_table('person',Field('name'),
Field('friends',gae.ListProperty(int),readable=False,writable=False))
now you can do:
tim=db.person.insert(name='Tim',friends=[])
kim=db.person.insert(name='Kim',friends=[tim])
friends_of_tim=db(db.person.friends==tim).select()
Min
BTW, my code runs well standalone. Only on web2py I get this error.
Could it be a locking issue? I'm running web2py with passenger wsgi
and tried to kill the process but still get the error.
Any help would be appreciated...
Thanks,
Roberto
On Dec 30 2009, 4:52 pm, robsan wrote:
> Hi all,
>
> I'
I have a web2py app that runs well under web2py, as well as within the
GAE development server, however, after updating the app, and then
testing this on the production server here:
http://opensourcebroadcasting.appspot.com/pledgedrives/
When submitting one specific "session_organization_id_form"
when i do the following code:
family_members =db(db.member.id == membership_id).select
(db.member.name,db.member.id)
family_members.colnames = ('Name ','Membership ID')
It cause the following error
""
Traceback (most recent call last):
File "/home/abeer/Desktop/web2py/New_version/web2py_src/web
This actually looks like a problem in interfacing web2py with the
newest ipython, version .10. I am getting this error too.
It happens while you're typing the python, before you execute it. For
instance, type:
In [1]: for i in range(5):
and you will get the error printed to the screen before y
91 matches
Mail list logo