I have an app working with sqlite. I tried changing to postgres and get
this error:
class 'psycopg2.ProgrammingError'(syntax error at or near user LINE 3:
user INTEGER REFERENCES auth_user(id) ON DELETE CASCADE, ^ )
This is the relevant table:
db.define_table('purchase',
Field
User is a reserved keyword in postgres, you need to rename field
Marin
On 31 Dec 2011 09:42, Plumo richar...@gmail.com wrote:
I have an app working with sqlite. I tried changing to postgres and get
this error:
class 'psycopg2.ProgrammingError'(syntax error at or near user LINE 3:
user INTEGER
ah thanks - that was it. I heard a year back the new DAL would take
care of these name conflicts.
On Sat, Dec 31, 2011 at 6:39 PM, Marin Pranjić marin.pran...@gmail.com wrote:
User is a reserved keyword in postgres, you need to rename field
Marin
On 31 Dec 2011 09:42, Plumo
I found when I use the compute field I get this error when inserting via
appadmin:
ProgrammingError: column update specified more than once
def now(record):
return datetime.datetime.now()
db.define_table('upload',
Field('data', 'upload', required=True),
Field('created',
On Saturday, December 31, 2011 7:33:30 AM UTC-5, Plumo wrote:
ah thanks - that was it. I heard a year back the new DAL would take
care of these name conflicts.
You have to set check_reserved:
http://web2py.com/books/default/chapter/29/6#Reserved-keywords
now=time.time()
sorts={
'hot':~db.news.hotness,
'score:~db.news.score,
'new':~db.news.post_time}
orderby=sorts[sort]
limitby=(50,101)
news = db(db.news.post_time(now-25922000.0)).select(limitby=limitby,
orderby=orderby)
Traceback (most recent call last):
File /Users/web2py/gluon/restricted.py,
On Dec 31, 2011, at 8:46 AM, sungchi wrote:
now=time.time()
sorts={
'hot':~db.news.hotness,
'score:~db.news.score,
'new':~db.news.post_time}
orderby=sorts[sort]
limitby=(50,101)
news = db(db.news.post_time(now-25922000.0)).select(limitby=limitby,
orderby=orderby)
Traceback (most
Not sure what the problem is but list:reference does work with mysql.
Are you sure the table does not exist already?
On Dec 30, 10:25 pm, Thomas Dall'Agnese thomas.dallagn...@gmail.com
wrote:
Hi,
After having errors in PostgreSQL, I moved to MySQL and also got errors.
With MySQL, I can't
Your code works for me. What version of web2py? Try it is a newly
createted application.
On Dec 31, 6:37 am, Plumo richar...@gmail.com wrote:
I found when I use the compute field I get this error when inserting via
appadmin:
ProgrammingError: column update specified more than once
def
i believe it is request.env.http_host will give you the domain name that
was used to access the site.
the appspot domain will never go away, and it will take some time to train
the google index to prefer your custom domain.
note that in your DNS you can redirect your naked domain to www so
Thanks Jonathan!
But, sort() function When using the limitby using the pagination
to be harder.
On 1월1일, 오전2시11분, Jonathan Lundell jlund...@pobox.com wrote:
On Dec 31, 2011, at 8:46 AM, sungchi wrote:
now=time.time()
sorts={
'hot':~db.news.hotness,
'score:~db.news.score,
On Dec 31, 2011, at 4:07 PM, sungchi wrote:
Thanks Jonathan!
But, sort() function When using the limitby using the pagination
to be harder.
True. What if you order by (post_time, score) in the request, and then re-sort
the result?
On 1월1일, 오전2시11분, Jonathan Lundell jlund...@pobox.com
Hi Massimo,
Happy New Year !
Yes, the table doesn't exist.
It was named comment and I even renamed it sub_comment to be sure there
are no conflicts.
If the table exists, the error message is table already exists.
I don't know what is error 150 but maybe the problem is due to DotCloud,
not
If I do that limitby range is only in the sort.
I want to sort on the entire range.
On 1월1일, 오전9시17분, Jonathan Lundell jlund...@pobox.com wrote:
On Dec 31, 2011, at 4:07 PM, sungchi wrote:
Thanks Jonathan!
But, sort() function When using the limitby using the pagination
to be harder.
On Dec 31, 2011, at 5:17 PM, sungchi wrote:
If I do that limitby range is only in the sort.
I want to sort on the entire range.
You're right. I can't think of a way to do it in one pass.
On 1월1일, 오전9시17분, Jonathan Lundell jlund...@pobox.com wrote:
On Dec 31, 2011, at 4:07 PM, sungchi
As an alternative,
news=db(db.news.post_time(now-2592000.0)).select()if
sort=='hot': news=news.sort(lambda row: ~row.hotness)
[limitby[0]:limitby[1]]if sort=='score':
news=news.sort(lambda row: ~row.score)[limitby[0]:limitby[1]]
However, this error has occurred. (hotness
On Dec 31, 2011, at 7:41 PM, sungchi wrote:
As an alternative,
news=db(db.news.post_time(now-2592000.0)).select()if
sort=='hot': news=news.sort(lambda row: ~row.hotness)
[limitby[0]:limitby[1]]if sort=='score':
news=news.sort(lambda row:
Thanks, Jonathan!
It works.
On 1월1일, 오후1시11분, Jonathan Lundell jlund...@pobox.com wrote:
On Dec 31, 2011, at 7:41 PM, sungchi wrote:
As an alternative,
news=db(db.news.post_time(now-2592000.0)).select()if
sort=='hot': news=news.sort(lambda row: ~row.hotness)
I want to have a comment for the email field of the register form. I
did so with:
db.auth_user.email.comment = 'custom comment'
But now that comment is showing across all auth forms (login, reset
password, etc.). I currently have the auth formstyles set to divs but
there is nothing to
Assuming you're using the standard user() function:
def user():
if request.args(0) == 'register':
db.auth_user.email.comment = 'custom comment'
return dict(form=auth())
So, the comment is only set when the 'register' action is requested.
Anthony
On Saturday, December 31, 2011
Anthony, its 2012!
Happy new year! :)
(Sorry for doing this here but he, Massimo and everyone that helps in
this group deserves it)
Javier
let us know if you find out more.
On Dec 31 2011, 7:07 pm, Thomas Dall'Agnese
thomas.dallagn...@gmail.com wrote:
Hi Massimo,
Happy New Year !
Yes, the table doesn't exist.
It was named comment and I even renamed it sub_comment to be sure there
are no conflicts.
If the table exists, the
Happy new year everybody!
23 matches
Mail list logo