This morning I tested the code above, it works.
A couple of things aren't clear to me.
In my model I also have a widget which reads like:
db.event.plaats.widget=lambda self,value:INPUT
(_type='text',_id='place',_class='ac_input',_name='plaats',value=str
(value),requires=self.requires)
The wid
now it works well, how can i get the successfully send message
in the form like if form.accepts ... (in my case response.flash)?
def einladen():
if auth.is_logged_in():
email_empfaenger=db(db.projectmember.id==request.args
(0)).select()[0]
empfaengermail=email_empfaenger.membe
The following view used to generate a multi-select box instead of a
dropdown, and was working in the previous version I was using (1.62.3)
but not on versions I upgraded to: 1.64.2 or 1.64.3.
msg_form=form_factory(
SQLField('Tag', default = request.vars.Tag, requires=IS_IN_DB
(db,'labels.id','%(
but the adress isn`t incorrect.
this is my controller:
def einladen():
if auth.is_logged_in():
email_empfaenger=db(db.projectmember.id==request.args
(0)).select()[0]
empfaengermail=email_empfaenger.memberemail
subject='Einladung als Projektteilnehmer von '
emai
Uploading to trunk now. Let me know if I did it right. Thanks Jose.
Massimo
On Jun 23, 12:10 am, mdipierro wrote:
> Thank you. will post this in trunk tomorrow.
>
> Massimo
>
> On Jun 22, 10:10 pm, Jose wrote:
>
> > elif self._uri[:11] == 'firebird://':
> > self._dbname = 'firebird
works for me. Can you post an example, what you expect and what you
get?
Massimo
On Jun 22, 10:27 pm, Nik wrote:
> Multiple select not working. Being redendered as drop-down boxes.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
Thank you. will post this in trunk tomorrow.
Massimo
On Jun 22, 10:10 pm, Jose wrote:
> elif self._uri[:11] == 'firebird://':
> self._dbname = 'firebird'
> m = \
> re.compile('^(?P[^:@]+)(\:(?P[...@]*))?@(?
> P[^\:/]+)(\:(?P[0-9]+))?/(?P.+)(\?set_encoding
which python version are you running?
On Jun 22, 10:14 pm, weheh wrote:
> Massimo, not a huge rush for me since I already migrated my data one
> table at a time using csv. But still an extremely important capability
> for those with large DBs that need to migrate to a new db engine.
--~--~--
Multiple select not working. Being redendered as drop-down boxes.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubsc
Massimo, not a huge rush for me since I already migrated my data one
table at a time using csv. But still an extremely important capability
for those with large DBs that need to migrate to a new db engine.
--~--~-~--~~~---~--~~
You received this message because you
elif self._uri[:11] == 'firebird://':
self._dbname = 'firebird'
m = \
re.compile('^(?P[^:@]+)(\:(?P[...@]*))?@(?
P[^\:/]+)(\:(?P[0-9]+))?/(?P.+)(\?set_encoding=(?
P\w+))?$'
).match(self._uri[11:])
if not m:
interesting. Let me look into the other engines.
On Jun 22, 9:14 pm, Jose wrote:
> On 22 jun, 20:58, mdipierro wrote:
>
>
>
> > It is not possible. We cannot ask the SQL engine to run a function
> > (date+timedelta) that is only defined in the client (*).
> > The only two ways to do it are:
>
> alias must be defined in alias.conf
>
Excuses,
aliases.conf
jose
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsu
My "regexfu" is pretty bad, but I'll try.
On Tue, Jun 23, 2009 at 9:38 AM, mdipierro wrote:
>
> Can you help me debug why? Perhaps there is a typo in the regex?
>
> Massimo
>
> On Jun 22, 8:23 pm, Alexei Vinidiktov
> wrote:
>> Thanks, Massimo!
>>
>> The auth.settings.password_field='password2' t
On 22 jun, 20:58, mdipierro wrote:
> It is not possible. We cannot ask the SQL engine to run a function
> (date+timedelta) that is only defined in the client (*).
> The only two ways to do it are:
>
> 1) the function only need to act on constant data (i.e. the right hand
> side) and we support
On 22 jun, 22:23, Alexei Vinidiktov
wrote:
> Thanks, Massimo!
>
> The auth.settings.password_field='password2' thing did the trick!
>
> I'm afraid the '?set_encoding=None' thing doesn't work.
>
> As I said earlier I tried using the string that you suggested:
>
> db = SQLDB('firebird://sysdba:pa
Can you help me debug why? Perhaps there is a typo in the regex?
Massimo
On Jun 22, 8:23 pm, Alexei Vinidiktov
wrote:
> Thanks, Massimo!
>
> The auth.settings.password_field='password2' thing did the trick!
>
> I'm afraid the '?set_encoding=None' thing doesn't work.
>
> As I said earlier I trie
Thanks, Massimo!
The auth.settings.password_field='password2' thing did the trick!
I'm afraid the '?set_encoding=None' thing doesn't work.
As I said earlier I tried using the string that you suggested:
db = SQLDB('firebird://sysdba:passw...@localhost/employee.fdb?
set_encoding=None')
but I go
You can force rereading of modules with the python "reload" command.
I do not know if auto-upgrade can take of this. I doubt it will
automatically restart the server.
massimo
On Jun 22, 7:09 pm, Richard wrote:
> My Apache server need to be restarted to reread some updated files
> (such as impo
My Apache server need to be restarted to reread some updated files
(such as imported modules from the controller). Will the auto upgrade
take care of this?
On Jun 20, 11:13 am, mdipierro wrote:
> By the end of july there will be auto upgrade. ;-)
>
> On Jun 19, 6:43 pm, Eddie Eyles wrote:
>
>
Well done fpp and Attila.
http://wiki.maemo.org/Maemo_Summit_2009/Submissions
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.co
very useful!
On Jun 22, 2:02 am, mdipierro wrote:
> yes you can migrate an entire database from the shell with one
> command:
>
> 1) have a model that connects to the sqliite db
> 2) python web2py -S yourapp -M
> 3) in the shell type
>
> db.export_to_csv_file(open('somefile.csv','wb'))
>
> 4
It is not possible. We cannot ask the SQL engine to run a function
(date+timedelta) that is only defined in the client (*).
The only two ways to do it are:
1) the function only need to act on constant data (i.e. the right hand
side) and we support that already
2) fetch all the data and apply the
It says the format of the destination address is (addresses are)
incorrect.
On Jun 22, 4:06 pm, pk wrote:
> hi massimo,
>
> i got follow ticket:
> Traceback (most recent call last):
> File "gluon/restricted.py", line 107, in restricted
> File "/Applications/web2py/web2py1.64.3/web2py.app/Con
On 22 jun, 20:27, mdipierro wrote:
> Not possible. You can only do
>
> query=(db.my_table.start_date>=current_date - datetime.timedelta
> (days=30) )
>
> the left hand side of a "left op right" query has to be a field, not
> an expression. The right hand side can be an expression but you can
hi massimo,
i got follow ticket:
Traceback (most recent call last):
File "gluon/restricted.py", line 107, in restricted
File "/Applications/web2py/web2py1.64.3/web2py.app/Contents/
Resources/applications/2busy/controllers/invite.py", line 17, in
File "gluon/globals.py", line 100, in
Fil
?set_encoding=None
should have the effect of not running "SET NAMES"
The other problem you have is that "password' cannot be used a field
name by auth because it is a reserved in firebird.
auth.settings.password_field='password2'
before auth.define_tables()
Massimo
On Jun 22, 9:42 am, A
Not possible. You can only do
query=(db.my_table.start_date>=current_date - datetime.timedelta
(days=30) )
the left hand side of a "left op right" query has to be a field, not
an expression. The right hand side can be an expression but you cannot
mix python functions and sql functions.
Mas
Hello
How do I solve this query?
db.define_table('my_table',
SQLField('start_date', 'date'),
SQLField('ndays', 'integer'),
...
)
def my_function():
import datetime
current_date = datetime.date.today()
#Option 1
query=(db.my_table.start_date + db.my_table.ndays >= c
thanks massimo, your the best
On 22 Jun., 21:15, pk wrote:
> i know, but in my project, there will often merge controller and view.
> but have you an idea to solve my problem?
>
> On 22 Jun., 20:45, Speedbird wrote:
>
> > Is there a reason why you can't put that code in yout controller?,
> > it
i know, but in my project, there will often merge controller and view.
but have you an idea to solve my problem?
On 22 Jun., 20:45, Speedbird wrote:
> Is there a reason why you can't put that code in yout controller?,
> it'd be much easier and you'll separate obvious logic from the
> presentatio
Nothing prevents from putting that code in the view. The problem is
that the code contains an error. My guess is that you want
{{db(db.projekte.id==projekte.id).update(closed=True)}}
or
{{projekte.update_record(closed=True)}}
or
{{db.projekte[projekte.id]=dict(closed=True)}}
(I am summing
So if your model is basically:
db.define_table('user', SQLField('name'))
db.define_table('tag, SQLField('name'))
db.define_table('user_tags',
SQLField('user_id','reference user'),
SQLField('tag_id','reference tag'))
then
usertags=db(db.user_tags.user_id==theuserid).select('user_tags.tag')
db.define_table('user',SQLField('name'))
db.define)table('tag',SQLField('name'),SQLField('user_id',db.user))
user_id=db.user.insert(name='Jason')
db.tag.insert(name='web2py',user_id=user_id)
db.tag.insert(name='python',user_id=user_id)
db.user.insert(name='Massimo')
# inner join
for row in db(db
I should be able to di it tomorrow if no major obstacles.
Massimo
On Jun 22, 12:01 pm, Ted G wrote:
> Hi Massimo,
>
> I've been watching trunk. Have you had any luck with this?
>
> Ted
>
> On Jun 18, 8:31 pm, mdipierro wrote:
>
> > not easy to do now, but easy to add. I will add this to trunk
It would still break the process of distinutin only bytecode compiled
views.
On Jun 22, 10:58 am, DenesL wrote:
> True.
> Compile-all-except-views option for those that need dynamic views?
>
> On Jun 22, 10:21 am, mdipierro wrote:
>
> > You are right.
> > The only problem I see is that it would
Ok, do you have any when I can join again? And I really didn't do anything
stupid in no-one IRC.
2009/6/22 ceej
>
> Nothing to do with you, so don't worry :)
>
> On Jun 22, 1:27 pm, Pynthon Pynthon wrote:
> > Need I to mail Mibbit? But I didn't do anything in the IRC? Also not in
> > other IRC.
Is there a reason why you can't put that code in yout controller?,
it'd be much easier and you'll separate obvious logic from the
presentation.
Regards,
Julio
On Jun 22, 10:05 am, pk wrote:
> hi together,
> i need help
>
> how can i update in the view a table entry, in my case the row called
>
Nothing to do with you, so don't worry :)
On Jun 22, 1:27 pm, Pynthon Pynthon wrote:
> Need I to mail Mibbit? But I didn't do anything in the IRC? Also not in
> other IRC...
>
> 2009/6/22 ceej
>
>
>
> > Mibbit the web client it uses has been banned from the IRC server,
> > 1000's of people use
btw, Hans' suggestion is better than mine. If you're running on GAE,
then you should follow the best practices for that platform. In this
case, the concept is to make your datastore read operations as
lightweight/simple as possible - at the expense of more complicated
write operations and increase
Need I to mail Mibbit? But I didn't do anything in the IRC? Also not in
other IRC...
2009/6/22 ceej
>
> Mibbit the web client it uses has been banned from the IRC server,
> 1000's of people use it. I'll contact http://www.mibbit.com
>
> On Jun 22, 12:26 pm, Pynthon Pynthon wrote:
> > Hello
> >
Here's a suggestion - there might be better ways to get where you want
to go, of course. This tries to minimize the changes to your existing
code.
Since you can't work with more than one table at a time with GAE, you
could change your GAE 'cats' query to work with only one table, then
perform a l
Chris
> It is better to store times as 'times' in the database rather than
> muck about with times in string format. A lot better.
Hence my remark: I wonder whether request.now.hour is able to return
the hours in a different format. Else, I guess I have to write a
custom function to get the hour
Mibbit the web client it uses has been banned from the IRC server,
1000's of people use it. I'll contact http://www.mibbit.com
On Jun 22, 12:26 pm, Pynthon Pynthon wrote:
> Hello
>
> When I want to enter the chat it returns "Terminated". What is the problem?
>
> Thanks,
> Pynthon
--~--~-
Hi, in GAE it's better to denormalize, so place the post_category
fields directly as a fields on the the posts db, and write the values
when the post is made.
This way you only have to work wth the post table and there is no need
to perform a join.
On Mon, Jun 22, 2009 at 6:20 PM, ProfessionalIT
Hi, in GAE it's better to denormalize, so place the post_category
fields directly as a fields on the the posts db, and write the values
when the post is made.
This way you only have to work wth the post table and there is no need
to perform a join.
On Mon, Jun 22, 2009 at 6:20 PM, ProfessionalIT
FYI
http://www.domassistant.com/slickspeed/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group,
I have 3 tables:
1 for tags
1 for users
and one to stick them together based on there ID's
How do I view all tags that a user has?
I have the book, but I just don't know where to look. Don't really know
the difference between an inner outer left join. :/
Regards,
Jason Brower
--~--~-~-
Hello
When I want to enter the chat it returns "Terminated". What is the problem?
Thanks,
Pynthon
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to we
hi together,
i need help
how can i update in the view a table entry, in my case the row called
'closed' (boolean)
in the view i know the project id and i like to set closed True in the
view
but my code gives me a ticket.
{{db(projekte.id).update(closed=True)}}
how can i solve this problem?
th
Hi Massimo,
I've been watching trunk. Have you had any luck with this?
Ted
On Jun 18, 8:31 pm, mdipierro wrote:
> not easy to do now, but easy to add. I will add this to trunk
> tomorrow.
>
> Massimo
>
> On Jun 18, 4:30 pm, Ted G wrote:
>
>
>
> > I have an application in which I need to have
Chris,
Your observation/technique I will use on one of my own projects with
some modifications. I take note of Annet's problem in that he is
migrating a existing DB so his dataset is already in string format. I
presume that is his motivation to continue doing so.
JohnMc
On Jun 22, 9:10 am, cjpa
hi,
Change your db design as to minimize the need for joins
i'm currently doing the join myself, using the output from 2 selects. This
works for me as the tables are small and I need some other info from these
(broad) selects as well.
Massimo, does the new dal also supports querying on the ro
Hans,
I Have this code:
def get_post_cats(post_id):
cats=db((db.posts.id == post_id) & (db.posts.post_category ==
db.categories.id)).select(db.categories.ALL)
items=[]
for cat in cats:
item="%(name)s" % {'app':request.application, 'cat':cat.category_name,
'name':cat.cat
This article is one of the best I've read about this subject:
http://arbingersys.blogspot.com/2008/04/google-app-engine-better-many-to-many_30.html.
But I'm not an expert. And I not sure this fits with web2py's db
model.
> I Know that the GAE don't support JOINS then how to simulate
--~--~--
True.
Compile-all-except-views option for those that need dynamic views?
On Jun 22, 10:21 am, mdipierro wrote:
> You are right.
> The only problem I see is that it would not work when the view gets
> bytecode compiled.
>
> On Jun 22, 8:18 am, DenesL wrote:
>
> > On Jun 22, 1:14 am, mdipierro
In the current release form.accepts validates the input against a copy
of the db field requires and that is OK most of the time but to cover
for cases like this one it would also need to check against the db
field requires, in case it was modified afterwards.
But this method implies complexity in
Hello,
How to simulate a JOIN in Google App Engine ?
I Know that the GAE don't support JOINS then how to simulate
this ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To pos
Thanks for your input, Jose.
As I said earlier, I had tried commenting the lines that add SET NAMES
in sql.py, and I got a different error message that I quoted in a
previous email. Part of the traceback was:
self._execute = lambda *a, **b: self._cursor.execute(*a, **b)
ProgrammingError: (-104,
I will look into this asap.
Massimo
On Jun 22, 1:15 am, weheh wrote:
> I downloaded the latest version. Now the error message is:
>
> Traceback (most recent call last):
> File "", line 1, in
> File "gluon/sql.py", line 1034, in import_from_csv_file
> ValueError: Mixing iteration and read m
Try:
time
program
level
location
{{oldday=None}}
{{for program in timetable:}}
{{if program.day!=oldday:}}
{{=program.day}}
{{oldday=program.day}}
{{pass}}
{{=program.time}}
Yes, this should be integrated or, better, rewritten, since the T2
pagination is broken.
Massimo
On Jun 22, 6:34 am, Francisco Gama wrote:
> Btw, are we going to see the search features of T2 (and eventually T3)
> integrated with web2py?
>
> Thanks
>
> On Jun 22, 12:19 pm, Trollkarlen wrote:
>
On 22 jun, 02:54, Alexei Vinidiktov
wrote:
> Hello,
>
> I'm trying to make a connection to a Firebird db file, but I keep
> getting this error:
>
> Traceback (most recent call last):
> File "/var/www/alvinru/data/www/bilingsoft.ru/gluon/restricted.py",
> line 98, in restricted
> exec ccode in
> One way of disabling the time picker is to remove the line
> try { $("input.time").clockpick({ starthour:0, endhour:23,
> showminutes:true, military:true}); } catch(e) {};
> from web2py_ajax.html in 'views'. Another way would be do use jquery
> to remove the clockpick class from the input fi
You are right.
The only problem I see is that it would not work when the view gets
bytecode compiled.
On Jun 22, 8:18 am, DenesL wrote:
> On Jun 22, 1:14 am, mdipierro wrote:
>
> > How would it be different from?
>
> > {{=XML(filelikeobject.read())}}
>
> An include happens before the parsing of
John,
I have replaced my code with the code you provided:
> if len(str(request.now.hour)) < 2 :
> hourminute= '0'+str(request.now.hour) + ':' + str
> (request.now.minute)
> else
> hourminute=str(request.now.hour) + ':' + str
> (request.now.minute)
> lack of '0' would giv
It is better to store times as 'times' in the database rather than
muck about with times in string format. A lot better.
I think this controller model / code will do what you want (note that
I didn't make a 'weekday' table and I force the current seconds to
zero to you get results that start duri
On Jun 22, 1:14 am, mdipierro wrote:
> How would it be different from?
>
> {{=XML(filelikeobject.read())}}
An include happens before the parsing of the view so you could have
template language code in the file-like object.
Pros/cons?
--~--~-~--~~~---~--~~
You rec
Have you tried changing --
hourminute=str(request.now.hour) + ':' + str(request.now.minute)
to
if len(str(request.now.hour)) < 2 :
hourminute= '0'+str(request.now.hour) + ':' + str
(request.now.minute)
else
hourminute=str(request.now.hour) + ':' + str
(request.now.minu
Thanks! I'm really eager try web2py (and Python). I can give it a
shot on Ubuntu 9.04 this weekend (if I meet my current project's
aggressive deadline).
On Jun 21, 11:08 am, mdipierro wrote:
> I am uploading a fix to this problem for authentication now. It will
> be in trunk in a couple of mi
Btw, are we going to see the search features of T2 (and eventually T3)
integrated with web2py?
Thanks
On Jun 22, 12:19 pm, Trollkarlen wrote:
> Oki, as I assumed.
>
> I really liked the generic comments from t2.
> But i found some trouble with it when there are multiple comments/
> forms on the
Oki, as I assumed.
I really liked the generic comments from t2.
But i found some trouble with it when there are multiple comments/
forms on the same page.
I have a list of objects that i want comments for and generate the
comments like this:
def controller:
items = db(db.images.id >0).select(
OK, I've just set up Firebird 2.1.2 on my Windows XP box with
kinterbasdb 3.3, and using it from web2py gives exactly the same error
messages as on the Linux box.
On Windows I can also successfully manipulate Firebird databases via
the command line Python interpreter.
What else can I do to narro
As stated above the flash file uploader dont send the session its a
bug in flash and with firefox.
http://bugs.adobe.com/jira/browse/FP-201%3Bjsessionid=CEBE32E5F80472837199BC420886771B
So the only way to get the already authenticated user to be
authenticated also in the ajax service routine is t
I think I spoke too soon. It may be configured correctly.
I have successfully retrieved data from the database using a select
command via command line Python like this:
import kinterbasdb
con = kinterbasdb.connect(
host='localhost', database='employee.fdb',
user='sysdba', password='pass
I think there's something wrong with my Firebird installation, it must
be incorrectly built or configured.
Even from the Python command line interpreter I keep getting similar
errors when executing sql commands...
On Mon, Jun 22, 2009 at 2:58 PM, Alexei
Vinidiktov wrote:
> I've also tried commen
In my model I defined:
db.define_table('timetable',
db.Field(...),
db.Field('day',db.day,default='',notnull=True),
db.Field('time',length=5,default='',notnull=True),
db.Field(...),
migrate='timetable.table')
In a view I would like to display today's upcoming programs, the
fu
So here is a short form of the solution for all the others :o)
You have to define a form the normal way, as a SQLForm or a normal
FORM...
If you want the form to be submitted via an ajax request you just use
the ajax function...
For validation the form in the function the ajax is calling you ha
78 matches
Mail list logo