Thanks!
It works now.
On Saturday, October 12, 2013 2:13:48 AM UTC-10, Niphlod wrote:
did you add a format= attribute for the referenced table ?
On Saturday, October 12, 2013 4:28:15 AM UTC+2, James Thompson wrote:
I tried it without the dotted notation, it gets rid of the error message,
Try to Ctrl+F5
воскресенье, 13 октября 2013 г., 12:54:58 UTC+6 пользователь mweissen
написал:
The file editor does not show any lines of text in Google Chrome (see the
attached screen shot)
I have:
- A new copy of 2.7.1, updated to 2.7.3
- Operating System: Windows 7
- Google
What about IronPython?
Web2py is supposed to work with that..
--
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
What about IronPython?
Web2py is supposed to work with that..
--
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
I have two forms in the Settings page: change password and change email. My
code in profile.py:
@auth.requires_login()
def settings():
#change user's password
change_password = auth.change_password(next=URL('profile', 'settings'))
change_password.update(_class='formstyle',
Hi,
under OSX 10.8.5, 2.7.3-stable+timestamp.2013.10.11.23.12.01 (Running on
Rocket 1.2.6, Python 2.7.2), when I compile an application, web2py throws
an error stating type 'exceptions.NameError'(name 'auth' is not defined)
if I remove the compiled application, it works without a problem. I
Or you can try it the long, round about way -
http://www.realpython.com/blog/python/web2py-migrating-from-sqlite-to-mysql/#.Ulm3xmTTXCU
Or an experiment after a script by Mariano Reingart:
https://groups.google.com/d/msg/web2py-developers/QxeJNByj6qc/cpBHsa1ymUkJ
--
Resources:
-
ok - that works!
2013/10/13 LightOfMooN vladsale...@yandex.ru
Try to Ctrl+F5
воскресенье, 13 октября 2013 г., 12:54:58 UTC+6 пользователь mweissen
написал:
The file editor does not show any lines of text in Google Chrome (see the
attached screen shot)
I have:
- A new copy of
Very cool, 10x! :)
However, I seem to have a problem getting the body of the request object
some of the times (I think when using ajax).
In cases in which the object is a true *cStringIO.SringO* object, the
*,getvalue()
*method works.
But sometimes it is some kind of file-wrapper thing, and it
I can compile any application without errors: does that happen also with
the welcome application?
Did you try under ubuntu without apache (i.e. using web2py.py -a password
to start the server on port 8000) ?
On Saturday, October 12, 2013 11:21:28 PM UTC+2, c...@cemeren.com wrote:
Hi,
under
It's as if someone messed around with the *__repr__()*s and* __str__()*s,
or rather didn't do so for some sub-class...
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list
To be clear - the file-wrapper is shown in the debugger as:
*_TemporaryFileWrapper: open file 'fdopen', mode 'w+b' at
0x06D5E0C0*
with a property:
*name = 'c:\\users\\arnon\\appdata\\local\\temp\\tmpaqdva6'*
What am I supposed to do with that?
--
Resources:
- http://web2py.com
-
I realized that I stated the problem a little bit vague by not writing
when I compile and run the app. I can compile the application but when I
run it it throws the error. I can run the app if I don't compile it. It
applies to Welcome app too. If I compile and run it, it throws the error
type
ok. it's a bug, thanks for reporting.
On Sunday, October 13, 2013 2:04:21 PM UTC+2, c...@cemeren.com wrote:
I realized that I stated the problem a little bit vague by not writing
when I compile and run the app. I can compile the application but when I
run it it throws the error. I can run
Hi,
I am trying to create a test for one of my modules.
This module depends on several global variables like Resonse and some
extra things i store in current from one of my Models. (current.myapp.*** ).
So to be able to run the test i need to execute some of the models like
this. (Is this the
I understand and it is a bug. Could you please open a ticket about this?
On Saturday, 12 October 2013 09:27:45 UTC-5, Adi wrote:
Thanks Massimo. I'm talking about the automatic search query above
smartgrid that gets created when boolean field is selected as a filter. It
gets created as
Hi guys,
I thought of using pythonanywhere for the next level of development, so
deployed my code there. I had been using sqlite as a test environment, and
wanted to move to the mysql database that pythonanywhere provides.
I created a new mysql database and then switched the DAL connection to:
If you look into gluon/tools.py
there is this line:
session.flash = self.messages.password_changed
So there is a flash after password changed. perhaps you redirect to a page
that overrides response.flash?
On Saturday, 12 October 2013 16:23:44 UTC-5, lesssugar wrote:
I'm using
We are working on this..
On Sunday, 13 October 2013 07:04:21 UTC-5, c...@cemeren.com wrote:
I realized that I stated the problem a little bit vague by not writing
when I compile and run the app. I can compile the application but when I
run it it throws the error. I can run the app if I
inspect databases/sql.log, there are the statements used to create the
table there
On Sunday, October 13, 2013 2:42:03 PM UTC+2, Ykä Marjanen wrote:
Hi guys,
I thought of using pythonanywhere for the next level of development, so
deployed my code there. I had been using sqlite as a test
I think that that's a problem on how by default web2py recognize a GAE
environment. If I'm right, you didn't change at all the db.py lines that do
something like this
if not request.env.web2py_runtime_gae:
## if NOT running on Google App Engine use SQLite or other DB
db =
Hello, is this tool
http://yeoman.io/
interesting for web2py development?
Is there something similar for python web development?
It has a lot of plugins
I see that it lints javascript
minimizes javasripts and css
compresses images
live reloads the browser
cross browser tests the app
creates a
Niphlod,
this is the log. The test table, that I created, passes fine, but the
campaign table doesn't say success. Is it about the FOREIGN KEY?
sql.log
timestamp: 2013-10-13T12:23:25.789598
CREATE TABLE tests(
id INTEGER PRIMARY KEY AUTOINCREMENT,
auth_table INTEGER REFERENCES
And the resulting ticket:
Error ticket for innopinion_01 Ticket ID
91.155.41.52.2013-10-13.12-54-52.7a8f0165-58f8-4ca8-960a-7fdcdc40d788
class '_mysql_exceptions.OperationalError' (1005, Can't create table
'ykamarjanen$dbname.campaign' (errno: 150)) Version web2py™ Version
opened: http://code.google.com/p/web2py/issues/detail?id=1718
On Sun, Oct 13, 2013 at 8:39 AM, Massimo Di Pierro
massimo.dipie...@gmail.com wrote:
I understand and it is a bug. Could you please open a ticket about this?
--
Resources:
- http://web2py.com
- http://web2py.com/book
That indeed had something to do with it.
After i changed it to this:
db = DAL('google:datastore')
session.connect(request, response, db=db)
I got this error:
Traceback (most recent call last):
File X:\GAE\***\tests\test_fragments.py, line 25, in setUp
You're right. When I changed the page to redirect after password change -
the Password changed flash shows up.
I don't quite understand what do you mean by overriding response.flash.
Does it mean you assume that the previous redirect-page had a flash
displayed onload?
On Sunday, October 13,
change_password = auth.change_password(next=URL('profile', 'settings'))
When the password change form is submitted, the above sets session.flash to
Password changed. and then redirects back to this same function. When the
redirect request comes in, the Auth code moves session.flash into
Anthony, it worked. I was staring at this code and didn't see it. Thanks a
lot.
On Sunday, October 13, 2013 3:44:39 PM UTC+2, Anthony wrote:
change_password = auth.change_password(next=URL('profile', 'settings'))
When the password change form is submitted, the above sets session.flash
to
there is no path2 field in the models you posted. are you sure that this is
the correct traceback ?
BTW, try to issue the create statement to the db to see what is the error,
eventually trimming out the column that are references to external tables.
On Sunday, October 13, 2013 3:00:57 PM UTC+2,
use javascript then all of those features (minus live-reload, just
because browser don't execute python code) are easily accompished by python
counterparts.
On Sunday, October 13, 2013 2:57:58 PM UTC+2, Ramos wrote:
Hello, is this tool
http://yeoman.io/
interesting for web2py
The redirecting page sets session.flash. After redirection this gets copied
into response.flash and displayed by the default layout, unless somewhere
in the logic there is something that sets session.flash=None before
redirection or response.flash=None after redirection. Double redirection
may
Thank you, Massimo, it's all clear now.
On Sunday, October 13, 2013 4:10:50 PM UTC+2, Massimo Di Pierro wrote:
The redirecting page sets session.flash. After redirection this gets
copied into response.flash and displayed by the default layout, unless
somewhere in the logic there is
Mind if you have a double redirect before redirection, you can tell web2py
to carry on any flash message:
session.flash = response.flash
Perhaps this should be done automatically by the redirect function.
On Sunday, 13 October 2013 09:12:42 UTC-5, lesssugar wrote:
Thank you, Massimo,
*Can you please post the code used to Attach Files?*
*And also the code used to Save-as-Draft to IMAP servers and/or Send via
SMTP.*
It will be really helpful, because I have been struggling to do the same.
The best way to understand and learn would be use the code in its entirety
as well
I ended up doing this as a proof of concept:
in *gluon.main.serve_controller()*
user = ''
sessionDict = dict(session)
if sessionDict.has_key('auth') and sessionDict['auth']:
authDict = dict(sessionDict['auth'])
if authDict.has_key('user') and authDict['user']:
There are some problems.
1)
If you notice there is no code in web2py that references auth, except in
the gluon/tools.py module and this module is not automatically imported in
the web2py environment. This is because I do not wish to couple auth to the
core of web2py. Users may want to build
Massimo:
Thanks for the tip.
How would you recommend I go about accomplishing this then?
Is there a better point-of-abstraction I can inject this into that would
work better?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source
We may convert to using redis for sessions, so I'll have to fix that.
But I would really rather be able to get the session user-name by whatever
means - My goal is to be able to filter logs in elasticsearch using kibana,
based on user - that would be most convenient for tech-support/debugging.
I
I checked every line of the table creation, and have found the following
issues:
1) When using a reference to another table ('reference participant'), that
table has to be created before the referenced table. This was not a problem
with sqlite.
2) When using unique=True (e.g.
The content and attachment fields would be no longer available. Users
have to implement their custom app code to fetch each part inspecting the
complete message structure
- Does this mean that *message.content* will not work in the future?
- Also, does it mean than the users will
*Can you please post the code used to Attach Files?*
*And also the code used to Save-as-Draft to IMAP servers and/or Send via
SMTP.*
The code from IVINH's app (posted at the google code issue 1707 page) is
more complicated. After recent changes to dal.py in trunk you should be
able to
*
EMAIL | IMAP + SMTP
*
*Compose Email | Save as Draft + Send via SMTP*
*
*
* *
Please look at the code below and give me some feedback on how to improve
it.
*ComposeMail()*
— Creates a form with Email fields
— If form accepted » Save as Draft in IMAP | Send via SMTP
I am not sure. Please open a ticket and I will look into this.
On Sunday, 13 October 2013 10:55:31 UTC-5, Arnon Marcus wrote:
Massimo:
Thanks for the tip.
How would you recommend I go about accomplishing this then?
Is there a better point-of-abstraction I can inject this into that would
I got everything working, when I moved the table order so that all tables
that are referenced later are at the beginning.
Additionally I had to declare the unique value after creating the table,
so:
Not working:
db.define_table('tablename',Field('name',unique=True)
Working:
I have an update regarding this question.
After i changed these lines, i'm getting a step further:
if not request.env.web2py_runtime_gae:
## if NOT running on Google App Engine use SQLite or other DB
db = DAL('sqlite://storage.sqlite',pool_size=1,check_reserved=['all'])
else:
##
- Does this mean that *message.content* will not work in the future?
This is because the current adapter uses an invalid field type for
attachment and content fields that can raise errors when used with other
core features. In order to keep those fields, they should have custom field
In the database abstraction layer, it would be useful to have support for
the SQL REPLACE INTO command. update_or_insert doesn't do quite the same
thing.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
-
Another glitch with legacy keyed tables is that text fields of type
'reference table.field' aren't encoded for SQL correctly (at least, not for
SQLite). They end up in the SQL as u'key', which creates a syntax error.
On Friday, October 1, 2010 7:19:47 AM UTC-4, Ivan Matveev wrote:
Hello
*To Alan E.*
*Q»* Will it break *backward compatibility*, then?
That will be bad.
Please implement the new feature in such a way that Emails can be retrieved
easily by *Message.Content[i]* for plaintext and html. And *
Message.Attachments[ii]* and
*Message.Attachments[ii].type* for
messageSent = imapdb(imapdb.Gmail_Sent_Mail.created ==
datetime.date.today()).select().first()
If you want to check that the message was stored at the imap service
folder, it would be better to save subject and sender to the session for
smaller query results, your query is retrieving any
Tim, Niphlod thank you for your answers. @Niphlod Luke means that's I'm a
skywalker ? I would like to !
Components are pretty useful, I've tried the documentation tutorial, that's
ok.
I'm still having some problems on this topic.
1/My left side bar is under the grid
2/I don't reach to give some
grid uses signed links by default (otherwise, you could access all data
just changing the url). Make sure that all links fiddling with grid own
links (such as lining directyl to the edit action of some record) are
signed.
Also, grid uses request.args to detect what you're trying to do, so if
AFAIK SQLite never had support for keyed tables in DAL.
On Sunday, October 13, 2013 7:12:51 PM UTC+2, Kevin Crowston wrote:
Another glitch with legacy keyed tables is that text fields of type
'reference table.field' aren't encoded for SQL correctly (at least, not for
SQLite). They end up in
mysql has a very known problem of not handling unique keys longer than 255
chars.
As specified in the book and as a best practice, ALWAYS specify a length
for 'string' fields. In the case of mysql, if those fields are unique, the
maximum length is 255.
On the other issue (creating the
support something that will work back to web2py 1.89.5 ? really ???
On Sunday, October 13, 2013 6:33:12 PM UTC+2, Massimo Di Pierro wrote:
I am not sure. Please open a ticket and I will look into this.
On Sunday, 13 October 2013 10:55:31 UTC-5, Arnon Marcus wrote:
Massimo:
Thanks for the
it's valid only for mysql and given that is a table method, it won't be
included in DAL so easily.
BTW, what is different ?
On Sunday, October 13, 2013 6:31:27 PM UTC+2, Kevin Crowston wrote:
In the database abstraction layer, it would be useful to have support for
the SQL REPLACE INTO
Hello,
I've explained badly. The problem is in the core of the project (Auth) not
in the welcome application, except share.js that has different
consideration because is in static folder.
share.js has written the word 'Share' in it, but if you change it (e.g. for
'Comparte'), then the
I have an existing web2py application to which i need to add several tables.
I defined the tables but they are not getting created in the Postgres
database.
I reread the book on migrating and ended up trying fake_migrate_all and now
have the .table files in the database directory but still no
just make sure that you don't have migrate=False anywhere (or
migrate_enabled=False in the DAL line).
fake_migrate (as the name stands) does a FAKE migration, meaning it won't
touch the db at all.
If your db is empty, just delete all the contents of your
appname/databases/ folder and you're
Thanks for the quick response. Here is a snipprt of my db.py
migrate_db = True
if not request.env.web2py_runtime_gae:
## if NOT running on Google App Engine use SQLite or other DB
#db = DAL('sqlite://storage.sqlite')
db = DAL('postgres://', migrate_enabled=migrate_db,
Try the following:
1. backup databases dir
2. remove all files from databases dir
3. db = DAL(, fake_migrate_all=True, migrate=False) ## no real
migrations on the database just recreating metadata in databases dir
4. python web2py.py -M -S yourapp
5. exit from python shell
6. add new tables in
More testing I can add a fiedl to one of the other existing tables which
contradicts the corruption theory a bit.
--
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
This worked perfectly. I am not sure why the sequence worked though. I
thought once I had the .table files created and if I then ran a migrate
they would be created in the database. but that obviously did not happen.
Do you have time to explain why this sequence worked? Thanks.
--
I didn't understood you were having problems on an existing filled
partially up database.
The code is fine as it is, except the ugly request.env.web2py_runtime_gae
(if you're not using GAE, you're just wasting CPU)
Just remove the file that is named
*blablablabla*_jurisdiction_terms.table
2013/10/13 david.waldrop david.wald...@gmail.com
This worked perfectly.
Good!
I am not sure why the sequence worked though. I thought once I had the
.table files created and if I then ran a migrate they would be created in
the database. but that obviously did not happen. Do you have
*
db = DAL('sqlite://storage.sqlite')
db.define_table(
'product_car',
Field('seller_id', db.auth_user, default=auth.user_id),
Field('name', requires = IS_NOT_EMPTY()),
Field('price', 'double', default=0.00),
Field('description','text'),
Field('image', 'upload',
*
Field('seller_id', db.auth_user, default=auth.user_id),
*
It looks like your create a reference to db.auth_user before that table has
been defined (i.e., before you have defined auth and called
auth.define_tables).
Anthony
--
Resources:
- http://web2py.com
-
yeomon itself creates the templates for different kind of project, and it
uses grunt, the task runner for javascript, and bower, a package manager
for javascript, css, and html stuffs. .
在 2013年10月13日星期日UTC+8下午8时57分58秒,Ramos写道:
Hello, is this tool
http://yeoman.io/
interesting for web2py
Thanks Anthony, it took me a like a week to wrap my head around that.
On Sunday, October 13, 2013 7:48:38 PM UTC-5, Anthony wrote:
*
Field('seller_id', db.auth_user, default=auth.user_id),
*
It looks like you are creating a reference to db.auth_user before that
table has been
Hi Alan,
Thank you very much. Now it work for me:
attach_send = Mail.Attachment(file)
tmp = attach_send['Content-Type'].split(';')
mime = tmp[0] if len(tmp)0 else 'text/plain'
payload = attach_send.get_payload()
attach_sent =
dict(filename=attach_send.my_filename,mime=mime,payload=payload,*
71 matches
Mail list logo