Hello,
I have a legacy MS SQL db with a User table with lots of old data:
db3.define_table('People',
Field('People_ID', 'id'),
Field('LastName', length=50),
Field('FirstName', length=50),
migrate = False
)
custom_auth_table = db3['People']
# tell Auth to use this table
I have a table in which users enter hexadecimal values to set colors and
background-colors. I'd like to validate the values the user enter,
requires=IS_HEX() would be ideal, but there is no such validator. I wonder
whether any one has done hexadecimal validation and could provide me with a
When I search for || It stops at the first | and crashes my browser.
Are you guys getting this too?
BR,
Jason
Hi Jason,
Are you guys getting this too?
Yes, it crashes Firefox and make Safari hang.
Annet
Dear ALL,
i am working with sqlite i have a table called Video like this :
db.define_table('Videos',
Field('Title'),
Field('Hits','integer',default=1),
Field('Arabic_Title'),
Field('Bits_on_The_Run_Script'),
I wonder if the following would be good:
A flag would be marked True if there has been an auto-migration.
Then you could check if a change has happened and fix items in your
database, but not need to search every time a page is run.
For example, if there are items that have a None and now need
I wrote the below line in routes.py. But I am getting a server response of
400 instead of 404.
INFO 2012-07-11 07:21:03,242 dev_appserver.py:2952] GET /staneja
HTTP/1.1 400 -
So I tried after changing 404 to 400 but it is still the same. No
redirection or request for the target URL is
Crashes in Waterfox and Chrome, seems to be a .js problem
On Wed, Jul 11, 2012 at 5:05 PM, Annet anneve...@googlemail.com wrote:
Hi Jason,
Are you guys getting this too?
Yes, it crashes Firefox and make Safari hang.
Annet
Hi All,
I'm looking for any easy way to backup small websites which use Sqlite. I
found an interesting suggestion from Massimo:
Put web2py in a dropbox folder! Once a day hg commit the entire folder.
That sounds good, but would it make a safe copy of the data?
In any case, does anyone
Than I'll go with routes.py. It's much easier than mod_rewrite and also
100% portable which is a killer feature.
Thanks for the responses.
2012. július 10., kedd 23:51:54 UTC+2 időpontban Athelionas a következőt
írta:
What is the preferred way of rewriting URLs?
Also, are there any
hello one and all,
i have web2py 1.99.7 under centos 6.2 with postgres 9.1. i am trying to
connect to postgres using the standard:
db = DAL('postgres://postgres:password@localhost/testbank')
but it does not connect properly. i added the self. under the dal.py
file to ensure that line looks
my install does recognize the pg8000 driver:
[root@q3200 web2py]# python web2py.py
web2py Web Framework
Created by Massimo Di Pierro, Copyright 2007-2011
Version 1.99.7 (2012-03-04 22:12:08) stable
Database drivers available: SQLite3, pymysql, pg8000, IMAP
Starting hardcron...
On 11 July 2012 05:27, MichaelF mjfs...@gmail.com wrote:
Didn't help. I now get the same error, this time in the function. Any idea
what the error message is trying to tell me?
Unfortunately I don't have time to try and work out your logic. The error
is telling you that the process could not
Don't you need a list field type for 'usuarios'?
On Tuesday, July 10, 2012 9:49:40 PM UTC+1, Fabiano Faver wrote:
controller:
def gerenciar_grupos():
form_not_usu = SQLFORM.factory(
Field('usuarios', requires=IS_IN_DB(db,
Should not this ...
video = db(db.Videos.Video_Type == XXX and db.Videos.Teacher ==
xx).select(db.Videos.ALL)
be rather like this? (see and vs. )
video = db(db.Videos.Video_Type == XXX db.Videos.Teacher ==
xx).select(db.Videos.ALL)
Hey Everyone,
I have a few questions about the contributors agreement. I've gotten to
that point where I would like to contribute where I can, but there are
somethings which are rattling around in my head.
When this agreement states 'I' or 'me' who or what is that exactly. The
reason I ask
and i did CREATE DATABASE testbank; under psql and it does exist as an
empty database at this point.
On 10 Jul 2012, at 11:21 PM, Annet wrote:
I have a table in which users enter hexadecimal values to set colors and
background-colors. I'd like to validate the values the user enter,
requires=IS_HEX() would be ideal, but there is no such validator. I wonder
whether any one has done
On 11 Jul 2012, at 1:19 AM, Athelionas wrote:
Than I'll go with routes.py. It's much easier than mod_rewrite and also 100%
portable which is a killer feature.
There's also no reason you can't use both. Go with routes.py and add an Apache
rewrite if you want to speed up static accesses. There
Do you have a longer traceback? It would help to know which line in
tools.py is causing the problem.
It is true that Auth assumes the id field for auth tables to be called id.
Perhaps this can be changed.
Massimo
On Wednesday, 11 July 2012 01:10:17 UTC-5, Jerry wrote:
Hello,
I have a
Dear David,
the '' is not supported when i use it i get this :
unsupported operand type(s) for : 'str' and 'Field'
On Wed, Jul 11, 2012 at 1:41 PM, David Marko dma...@tiscali.cz wrote:
Should not this ...
video = db(db.Videos.Video_Type == XXX and db.Videos.Teacher ==
On 11 Jul 2012, at 7:09 AM, hasan alnator wrote:
Dear David,
the '' is not supported when i use it i get this :
unsupported operand type(s) for : 'str' and 'Field'
video = db((db.Videos.Video_Type == XXX) (db.Videos.Teacher ==
xx)).select(db.Videos.ALL)
On Wed, Jul 11, 2012 at
Excellent idea. In trunk
db._migrated gives you a list of table that currently migrated.
On Wednesday, 11 July 2012 02:16:20 UTC-5, encompass wrote:
I wonder if the following would be good:
A flag would be marked True if there has been an auto-migration.
Then you could check if a change
Can I see your full routes?
On Wednesday, 11 July 2012 02:26:04 UTC-5, Sushant Taneja wrote:
I wrote the below line in routes.py. But I am getting a server response of
400 instead of 404.
INFO 2012-07-11 07:21:03,242 dev_appserver.py:2952] GET /staneja
HTTP/1.1 400 -
So I tried
ohh thank you Jonathan its working now , but can you tell me why ? i dont
understand
On Wed, Jul 11, 2012 at 5:14 PM, Jonathan Lundell jlund...@pobox.comwrote:
On 11 Jul 2012, at 7:09 AM, hasan alnator wrote:
Dear David,
the '' is not supported when i use it i get this :
unsupported
Yes, sure. I have attached my routes.py with this reply.
On Wednesday, July 11, 2012 7:49:12 PM UTC+5:30, Massimo Di Pierro wrote:
Can I see your full routes?
On Wednesday, 11 July 2012 02:26:04 UTC-5, Sushant Taneja wrote:
I wrote the below line in routes.py. But I am getting a server
I think it is a bug with jQuery.highlight. Definitively not a serverside
problem.
On Wednesday, 11 July 2012 01:54:25 UTC-5, encompass wrote:
When I search for || It stops at the first | and crashes my browser.
Are you guys getting this too?
BR,
Jason
On 11 Jul 2012, at 7:19 AM, hasan alnator wrote:
ohh thank you Jonathan its working now , but can you tell me why ? i dont
understand
web2py overloads to perform a logical-and role here, but it can't alter
Python's operator precedence. The operator has higher precedence than ==,
unlike
If you pay the $100, dropbox has a 6month restore. I do not know if it will
save all the versions of the file, or only some snapshot.
On Wednesday, 11 July 2012 03:16:29 UTC-5, villas wrote:
Hi All,
I'm looking for any easy way to backup small websites which use Sqlite. I
found an
Hi Massimo,
Traceback (most recent call last):
File \web2py\gluon\restricted.py, line 205, in restricted
exec ccode in environment
File /web2py/applications/pg/controllers/appadmin.py
http://192.168.37.50:8000/admin/default/edit/pg/controllers/appadmin.py, line
410, in module
File
There is a bug with the version of the web2py you are using update to a
newer version. There has been a few posts in this group about that.
The other solution is to install psycopg2 and use that driver.
On Wed, Jul 11, 2012 at 7:05 AM, Cliff Kachinske cjk...@gmail.com wrote:
Have you created a
On 11 Jul 2012, at 7:25 AM, Massimo Di Pierro wrote:
If you pay the $100, dropbox has a 6month restore. I do not know if it will
save all the versions of the file, or only some snapshot.
I wouldn't count on dropbox to safely back up a live sqlite database, for the
same reason you can't simply
On 11 Jul 2012, at 7:25 AM, Jonathan Lundell wrote:
On 11 Jul 2012, at 7:19 AM, hasan alnator wrote:
ohh thank you Jonathan its working now , but can you tell me why ? i dont
understand
web2py overloads to perform a logical-and role here, but it can't alter
Python's operator
That may be just the ticket. Especially if I modify the list to be a db
table that can be maintained by the site admin. I will give that a try and
see what I come up with :)
On Tuesday, July 10, 2012 6:15:23 PM UTC-4, Massimo Di Pierro wrote:
How about this:
AUTHORIZED_EMAILS =
Where ??
On Wed, Jul 11, 2012 at 6:00 PM, Jonathan Lundell jlund...@pobox.comwrote:
On 11 Jul 2012, at 7:25 AM, Jonathan Lundell wrote:
On 11 Jul 2012, at 7:19 AM, hasan alnator wrote:
ohh thank you Jonathan its working now , but can you tell me why ? i
dont understand
web2py
Hi all,
I have created a custom view for profile. However, I don't know where to
look to change the profile link (auth.navbar) to use my link.
Thanks.
On 11 Jul 2012, at 8:03 AM, hasan alnator wrote:
Where ??
In the DAL chapter, toward the end of the Logical operators section.
http://web2py.com/books/default/chapter/29/6#Logical-operators
On Wed, Jul 11, 2012 at 6:00 PM, Jonathan Lundell jlund...@pobox.com wrote:
On 11 Jul 2012, at 7:25
The navbar assumes all the Auth actions are handled by the same function,
with the action being specified via request.args[0]. If that's not your
setup, then you'll have to create a custom navbar, or manipulate the navbar
after it is generated.
Anthony
On Wednesday, July 11, 2012 11:15:21 AM
Okay; I understand. Let me explain using a simpler version, and also come
up with SQL that would do the equivalent.
Here's a simpler version. This example shows the problem, and simply uses a
grandparent table (A), a parent table (B), and a child table (C). That is,
C is a child of B, and B is
Thanks for the reply. That is my setup. The only edit I want is to change
the link on profile to point to my custom profile. Apart from that, I don't
want to edit any other function of the Auth system. Thanks. I kind a see
where it might be possible in gluon/tools.py, but I don't want to touch the
The contributor agreement serves two purposes:
1) states you can do anything you want with your contribution. The fact it
becomes part of web2py does not prevent you from selling or modifying or
reusing your contribution.
2) gives me legal rights to speak for web2py and - for example -
Are you sure you are sing web2py trunk? Earlier version do not support the
404-
On Wednesday, 11 July 2012 09:24:03 UTC-5, Sushant Taneja wrote:
Yes, sure. I have attached my routes.py with this reply.
On Wednesday, July 11, 2012 7:49:12 PM UTC+5:30, Massimo Di Pierro wrote:
Can I see
I guess this is the key line:
('/$anything','404-/devekayan/view/user/$anything')
That would require a controller file called view.py and a function def
user():
Not sure but I am sure this issue was fixed in trunk.
On Wednesday, 11 July 2012 03:40:55 UTC-5, lucas wrote:
hello one and all,
i have web2py 1.99.7 under centos 6.2 with postgres 9.1. i am trying to
connect to postgres using the standard:
db =
You are right.
On Wednesday, 11 July 2012 09:47:17 UTC-5, Jonathan Lundell wrote:
On 11 Jul 2012, at 7:25 AM, Massimo Di Pierro wrote:
If you pay the $100, dropbox has a 6month restore. I do not know if it
will save all the versions of the file, or only some snapshot.
I wouldn't count on
Oh... that might be the problem since I am not using the source from the
trunk. I am using the current stable version 1.99.7 available at :
http://www.web2py.com/examples/default/download
On Wednesday, July 11, 2012 10:12:28 PM UTC+5:30, Massimo Di Pierro wrote:
Are you sure you are sing
Yes, I have the controller with the name view.py and the function user
On Wednesday, July 11, 2012 10:14:17 PM UTC+5:30, pbreit wrote:
I guess this is the key line:
('/$anything','404-/devekayan/view/user/$anything')
That would require a controller file called view.py and a function def
Have you checked the Javascript console?
http://blogs.msdn.com/b/cbowen/archive/2011/06/24/internet-explorer-9-developer-tools-deep-dive-part-3-debugging-javascript.aspx
Just to clarify, are you saying your profile page has a custom URL (i.e.,
something other than /default/user/profile), or that it simply has a custom
view (i.e., you need to use a view other than the standard
/views/default/user.html view)? If the latter, there are two options.
First, rather
Hi,
I have a web2py app in 2 places:
- City location
- Rainforest location
The app is the same for both cases, however the city app is the main.
I need to synchronize the information entered in the location of the
jungle to the city but not bi-directionally due to low bandwidth, in
addition
the field is shown if I dont declare the type, however the checks are not
checked with default=True, like I wrote
Em quarta-feira, 11 de julho de 2012 07h35min46s UTC-3, villas escreveu:
Don't you need a list field type for 'usuarios'?
On Tuesday, July 10, 2012 9:49:40 PM UTC+1, Fabiano
I am trying to create a form to input data for a particular item. For
example, I would like to store the item's location, area, and owner.
An example is I have an owner, an area (Items location), and the item.
When I go to input a new item, I need to select the owner, then the
dropbox below
Thanks guys! I didn't even know there was a backup command. That, with
the dropbox, sounds perfect. Hope it all works with cron, I have to
investigate.
Best wishes, David
On Wednesday, July 11, 2012 3:47:17 PM UTC+1, Jonathan Lundell wrote:
On 11 Jul 2012, at 7:25 AM, Massimo Di Pierro
Thanks Massimo.
That prints out:
hihihi
If you change it to:
{{for d in data[:3]:
= hi\n
pass}}
It prints out (spacing gets messed up):
hi
hi
hi
Anyway, you probably aren't interested in a patch (see attached), but this
patch has been working pretty good for me
Perfect. Thank you very much. I wanted a custom view. I choose the latter
approach and it worked like a charm. I didn't realize it was that easy.
Thanks again.
On Wed, Jul 11, 2012 at 11:52 AM, Anthony abasta...@gmail.com wrote:
Just to clarify, are you saying your profile page has a custom
That's what I think maybe something broken temporarily.
Richard
On Tue, Jul 10, 2012 at 9:21 PM, Kevin Miller kevinvani...@gmail.comwrote:
I am using the Nightly Build as I need twitter bootstrap :-)
On Tue, Jul 10, 2012 at 11:41 AM, Richard Vézina
ml.richard.vez...@gmail.com wrote:
Ok,
I don't think there is something already written, however we could use some
more info about it
- how many data are we talking about ?
- what does it mean as soon as there is availability of connectivity ?
Given that, the approximate design for this kind of things is some form of
Fabiano,
I think there is an issue with widget=SQLFORM.widgets.checkboxes.widget do
you use it?
I try without widget=SQLFORM.widgets.checkboxes.widget and I can set
default=True and I get a checked box, but if I use it the box doesn't get
checked.
If you don't need the fancy feature of widget
Ok Fabiano, no issue with SQLFORM.widgets.checkboxes.widget...
I didn't know exactly how it works :)
In this thread look for Bruno's answers that how I figure out how to pass
the proper default to widget :
http://stackoverflow.com/questions/8146260/best-practice-for-populating-dropdown-based-on-other-dropdown-selection-in-web2p/8152910#8152910
On Wednesday, July 11, 2012 2:22:58 PM UTC-4, SeamusSeamus wrote:
I am trying to create a form to input data for a particular item. For
example, I would
What is it that isn't working in IE?
I'm fairly certain the hash part just bunks it up but I have no way of
confirming it. I've tried all the debugging tools I could find and either
I'm too stupid to figure out how to get them to work or I'm too stupid to
figure out what step I'm missing
hey wade,
yes, i have been banging my head on this one because i have had success
with web2py and postgresql for quite a while. my admin interface says that
my web2py is up to date and that is currently on version 1.99.7. so what
is the best method toi update my web2py? i am using centos
+1 for psycopg2. Works fine for me.
I missed that you weren't using it.
On Wednesday, July 11, 2012 4:40:56 PM UTC-4, lucas wrote:
hey wade,
yes, i have been banging my head on this one because i have had success
with web2py and postgresql for quite a while. my admin interface says
Until trunk is stable I suggest you just install psycopg2 and use that.
Once you install the python driver everything will just work without any
change to your code.
On Wed, Jul 11, 2012 at 1:45 PM, Cliff Kachinske cjk...@gmail.com wrote:
+1 for psycopg2. Works fine for me.
I missed that you
Hi,
I am trying to make the home page of the
http://111.111.111.11:8000/welcome/default/indexhttp://130.179.130.86:8000/welcome/default/index
which is the default page loaded when I type
http://111.111.111.11:8000http://130.179.130.86:8000/welcome/default/index,
to
Not a jquery guru...
What would happen if you changed the anchor tags to spans? If it works it
will also allow you to remove the event.preventDefault() call.
Also I would change this line of code:
$(a.reveal).click(function (event) {
to this:
$(.reveal).live('click',
web2py does not use a file called router.py. All rewrite code goes in
routes.py. You can use either the parameter-based system (router.example.py
is an example) *or* the pattern-based system (routes.example.py is an
example), but not both.
Anthony
On Wednesday, July 11, 2012 4:49:33 PM UTC-4,
Note, when you create or change routes.py, you need to reload it before it
will take effect (either restart the server or click the Reload routes
button in the admin interface).
Anthony
On Wednesday, July 11, 2012 5:14:20 PM UTC-4, Anthony wrote:
web2py does not use a file called router.py.
ok, i installed the rpm version of psycopg2 and web2py recognizes it when i
run python web2py.py. i then added a very simple application under the
admin interface and added only:
db = DAL('postgres:psycopg2://postgres:password@localhost/testbank')
to the db.py file. when i run the database
First you don't need to write you connection string like this:
db = DAL('postgres:psycopg2://postgres:password@localhost/testbank')
You can use this:
db = DAL('postgres://postgres:password@localhost/testbank')
I always set pg_hba.conf (this is on my development box not my live server)
# Database
Problem solved. My mistake was in thinking that the 'r' in the lambda
function referred to the C record. Of course it doesn't; we're trying to
INSERT a new C record. Instead, that 'r' refers to the parent B record. So
the lambda function should be:
lambda r : '%s' % (db.A[r.A_id].A_name)
On
Is it possible to rewrite a URL according to preferred language of browser?
I mean if the browser's preferred language is, for example, English then
rewrite example.com/app/controller/index to
example.com/app/en/controller/index. In routes.py I could set up languages
but if I set
Updated patch - I haven't been able to break it. I'm posting this in case
someone else finds it useful - it's a very small patch.
This basically looks for {{...}} and strips the white space around it (up
to an including a new line) ignoring everything else. The output from
render() now looks
Hello all. Today I discovered that all my web2py installations are allowing
any domain user to login as long as they don't enter a password. The root
of this is that the ldap_auth.py authentication will return True as long as
a user is in Active Directory. An incorrect password will not work,
There are two issue: 1) protocol for transferring data; 2) exporting and
importing from database.
rabbitmq etc. only address 1 and you do not need any. Web2py already has a web
server a many RPC systems you can use.
The real issue is 2. If your tables have a uuid field, db.export_to_csv_field
I did some digging and turned up this:
http://docs.oracle.com/javase/jndi/tutorial/ldap/security/simple.html
Which says a blank password causes the protocol to be changed to none.
More specifically http://tools.ietf.org/html/rfc4513#section-5.1.2 tells us
Clients SHOULD
disallow an empty
Hello,
I have a database design dilema. I want to do a e-learning system for a
course. The course soould have severeal lessons, each lesson can be of
different type.
Let's say we have following model:
#for definiton of each course
db.define_table('course',
Field('title', 'string'))
I don't understand a lot the pourpose of this selector
$(document.location.hash).removeClass(hidden);
If the element has the id attr as the same hash you should use
$(#+document.location.hash).removeClass(hidden);
Or if the hash is in the href attr you can use
I think the point of a template is that it {{.}} is turned into code but
stuff outside is left unchanged. I'd rather leave this as it is. But thanks
for brining this up.
On Wednesday, 11 July 2012 13:33:44 UTC-5, Rob wrote:
Thanks Massimo.
That prints out:
hihihi
If you change it
Thanks, in trunk. Any chance you could fix the indentation a little to
follow pep8
I did some of it but it needs more work. This is not your fault. The pep8
was badly broken in the original file.
Massimo
On Wednesday, 11 July 2012 17:45:04 UTC-5, Kory Prince wrote:
I did some digging and
Not in a single query using dal. And to tell you the truth I do not like
union too much. :-(
On Wednesday, 11 July 2012 17:47:06 UTC-5, Najtsirk wrote:
Hello,
I have a database design dilema. I want to do a e-learning system for a
course. The course soould have severeal lessons, each
Yeah...i noticed that from your previous answers :)
But...what my other options?
On Thursday, 12 July 2012 01:13:06 UTC+2, Massimo Di Pierro wrote:
Not in a single query using dal. And to tell you the truth I do not like
union too much. :-(
On Wednesday, 11 July 2012 17:47:06 UTC-5,
I was wondering how to run web2py on apache, and is there a step-by-step
guide somewhere online?
do you recommend finishing development before deploying the application on
apache? thanks!
--
☃ (\__/)
(='.'=)
()_()
- 温 良 恭 俭 让 仁 义 礼 智 信
- Through suffering to renown
Hey Massimo,
Just testing the water, as I was going to contribute to another project in
the past and fired a question like this and they didn't give me the
response that I wanted just fluffy bits in their answer. With you though,
straight to the point and you gave me exactly what I wanted.
Can i achieve that with joins?
On Thursday, 12 July 2012 01:20:50 UTC+2, Najtsirk wrote:
Yeah...i noticed that from your previous answers :)
But...what my other options?
On Thursday, 12 July 2012 01:13:06 UTC+2, Massimo Di Pierro wrote:
Not in a single query using dal. And to tell you the
You just run
this:
http://code.google.com/p/web2py/source/browse/scripts/setup-web2py-ubuntu.sh
On Wednesday, 11 July 2012 18:35:07 UTC-5, ivytony wrote:
I was wondering how to run web2py on apache, and is there a step-by-step
guide somewhere online?
do you recommend finishing development
Thank you. This issues comes up once in a while and I am learning myself
via interaction with users. The move from GPL to LGPL was proposed, for
example, by users.
Massimo
On Wednesday, 11 July 2012 18:53:05 UTC-5, Rhys wrote:
Hey Massimo,
Just testing the water, as I was going to
If you are new-ish to administering a web server, I like to advise first
running the commands manually. Even if you're fairly experienced, it's a
good idea to understand what is happening.
I don't see any reason to have more than one table course at this point.
Just add a course_type=video|text (I don't think you can name a field
type).
89 matches
Mail list logo