[web2py] [OT] Stress testing a web2py deployment

2010-11-12 Thread Luther Goh Lu Feng
My colleague did a deployment of web2py using today using apache as a
reverse proxy. The demo setup performed quite badly. And was resolved
by using nginx in place of apache.

Quick question: is there a way to simulate a stress test to find the
upper limits of performance without using real users?


Re: [web2py] Re: PostgreSQL replication

2010-11-12 Thread Michele Comitini
This is probably what you need. What scared me away is that it is a
query based system, there are
some potential drawbacks depending on the type of query, but you have
advantages too, such as extreme parallel
execution, so I suggest to take a look!

http://wiki.postgresql.org/wiki/Pgpool-II

mic

2010/11/12 ron_m :
> Thanks for the pointers from both of you, I appreciate that. It would
> be best to have multiple master but that will be very difficult.
> Bucardo has multiple master but only for 2 masters once you get into
> the docs for it. The MySQL scheme I mentioned used primary key
> skipping on autonumbers so if the pool of replicas could reach 10 the
> autonumber increment was set to 10 then each machine got an offset to
> start with. It looks like PostgreSQL can do this as well with the
> sequences but appears to be a DDL setting and not a DB server config
> setting. I am new to PostgreSQL so I may not have found that aspect
> yet. By being careful with the app design I think I can get it down to
> one master which is more manageable and avoid key conflicts.
>
> Ron
>
> On Nov 11, 1:00 pm, Michele Comitini 
> wrote:
>> There are some good news for postgresql 9.0:
>>
>> http://www.postgresql.org/docs/9.0/interactive/warm-standby.html
>>
>> some of those features above are possible  on 8.4 with some difficult
>> configuration tricks, see wiki.postgresql.org.
>>
>> mic
>>
>> 2010/11/11 mdipierro :
>>
>> > Hi Ron,
>> > I do not much about this topic. Will single master be enough?
>> > You may want to look into these tools as well.
>>
>> >http://www.slony.info/
>> >http://www.sistemasagiles.com.ar/trac/wiki/PyReplicaEn
>> >https://public.commandprompt.com/projects/replicator
>>
>> > On Nov 11, 1:51 pm, ron_m  wrote:
>> >> Any of you have experience with Bucardo or pgpool-II as a replication
>> >> add-on?
>>
>> >> Some background:
>> >> I switched from MySQL to PostgreSQL very cleanly using web2py as the
>> >> vehicle. Sort description to document the process: Made a copy of the
>> >> app, removed the content of the databases directory, added the
>> >> prerequisite components (database and driver) to the system, created
>> >> an empty DB, changed the connection string in the model, started MySQL
>> >> verison of app in shell mode and ran all the data out to one CSV file
>> >> and finally started the PostgreSQL version up in shell mode and did an
>> >> import of the same CSV file followed by a db.commit(). After all that
>> >> the application worked except for one group by orderby query
>> >> PostgreSQL didn't like which was easy to fix and the change worked in
>> >> MySQL as well. This was a database with 28 tables linked with lots of
>> >> relations.
>>
>> >> My compliments to this great application server and infrastructure
>> >> surrounding it. Of the available migration tools I found out on the
>> >> net, most failed to work and would require extensive manual editing.
>>
>> >> The application will be installed in 10 locations scattered all over
>> >> Alaska. All the locations are connected by a WAN with IPSEC to form a
>> >> VPN so it looks like it is all in the same room except for network
>> >> performance.
>>
>> >> Each location must survive a network outage and continue to work, The
>> >> weather can be a problem up there.
>>
>> >> Any data tables that change rapidly are to remain local to each
>> >> location.
>>
>> >> About 2/3 of the database is configuration information which changes
>> >> very slowly. One table if this were running would have changed once in
>> >> 5 years. Some tables change more often as employees come and go or
>> >> equipment is added to a location. Config changes can be delayed by
>> >> downed connections so eventual consistency is okay.
>>
>> >> I need something automatic since the people using the system are not
>> >> technical and cannot be depended on to to a task.
>>
>> >> By restricting the application I could get the updates to one database
>> >> instance but then there is a time delay until the local copy is in
>> >> sync.
>>
>> >> I looked at MySQL Replication as described in the Linux Journal
>> >> article July 2010 where they do a ring which has each server to the
>> >> left in the ring is master to the slave to the right but I could see
>> >> with intermittent networks down due to bad weather this could be a
>> >> headache waiting to happen. Also the MySQL licensing has a degree of
>> >> uncertainty to it so I would rather stay away.
>>
>> >> I am aware of PostgreSQL-R which is in beta, The uuid and timestamps
>> >> available in web2py model help but then needs to be driven by cron in
>> >> a batch oriented update.
>>
>> >> Sometimes I look at the NoSQL databases like CouchDB or MongoDB but
>> >> then the foreign keys from the rapidly changing data is a problem. I
>> >> could bridge it using equipment hostname or something like that but
>> >> still I would rather stay inside one database.
>>
>> >> Hard problem to solve completely I think.
>>
>> >> Comments?
>>
>

[web2py] Re: How to switch back to English for the Admin interface?

2010-11-12 Thread Stefan Scholl
That's how I do it with multilingual sites: The browser language
determines the first page you reach. Every language has its own
directory in the URL. Then you can choose between the other languages
(not by country flag if I can prevent it ;-).

(All my web2py projects so far were monolingual. But I've done it in
Django and MODx, e.g.)

On 10 Nov., 22:04, guruyaya  wrote:
> I'm not sure how to attach files here, but I've created a patch that
> creates a dropdown with all possible languages on the admin. Anyone
> wants it?
>
> On Nov 10, 2:53 pm, Stefan Scholl  wrote:
>
>
>
>
>
>
>
> > I know, but I don't want to use one browser for development (English)
> > and one for the rest (German).
>
> > On 9 Nov., 14:28, mdipierro  wrote:
>
> > > wait. You should not need to delete files. The language is set by your
> > > browser.
>
> > > On Nov 9, 3:41 am, Stefan Scholl  wrote:
>
> > > > Oops, found it 5 minutes later.
>
> > > > In case somebody wants to switch back to English, too:
>
> > > > Delete (or rename) your language in applications/admin/languages


[web2py] Re: PostgreSQL replication

2010-11-12 Thread shem p
Maybe any of this would help: http://www.haroonidrees.com/2009/04/open-sour.html

On Nov 12, 2:07 pm, ron_m  wrote:
> Thanks for the pointers from both of you, I appreciate that. It would
> be best to have multiple master but that will be very difficult.
> Bucardo has multiple master but only for 2 masters once you get into
> the docs for it. The MySQL scheme I mentioned used primary key
> skipping on autonumbers so if the pool of replicas could reach 10 the
> autonumber increment was set to 10 then each machine got an offset to
> start with. It looks like PostgreSQL can do this as well with the
> sequences but appears to be a DDL setting and not a DB server config
> setting. I am new to PostgreSQL so I may not have found that aspect
> yet. By being careful with the app design I think I can get it down to
> one master which is more manageable and avoid key conflicts.
>
> Ron
>
> On Nov 11, 1:00 pm, Michele Comitini 
> wrote:
>
>
>
>
>
>
>
> > There are some good news for postgresql 9.0:
>
> >http://www.postgresql.org/docs/9.0/interactive/warm-standby.html
>
> > some of those features above are possible  on 8.4 with some difficult
> > configuration tricks, see wiki.postgresql.org.
>
> > mic
>
> > 2010/11/11 mdipierro :
>
> > > Hi Ron,
> > > I do not much about this topic. Will single master be enough?
> > > You may want to look into these tools as well.
>
> > >http://www.slony.info/
> > >http://www.sistemasagiles.com.ar/trac/wiki/PyReplicaEn
> > >https://public.commandprompt.com/projects/replicator
>
> > > On Nov 11, 1:51 pm, ron_m  wrote:
> > >> Any of you have experience with Bucardo or pgpool-II as a replication
> > >> add-on?
>
> > >> Some background:
> > >> I switched from MySQL to PostgreSQL very cleanly using web2py as the
> > >> vehicle. Sort description to document the process: Made a copy of the
> > >> app, removed the content of the databases directory, added the
> > >> prerequisite components (database and driver) to the system, created
> > >> an empty DB, changed the connection string in the model, started MySQL
> > >> verison of app in shell mode and ran all the data out to one CSV file
> > >> and finally started the PostgreSQL version up in shell mode and did an
> > >> import of the same CSV file followed by a db.commit(). After all that
> > >> the application worked except for one group by orderby query
> > >> PostgreSQL didn't like which was easy to fix and the change worked in
> > >> MySQL as well. This was a database with 28 tables linked with lots of
> > >> relations.
>
> > >> My compliments to this great application server and infrastructure
> > >> surrounding it. Of the available migration tools I found out on the
> > >> net, most failed to work and would require extensive manual editing.
>
> > >> The application will be installed in 10 locations scattered all over
> > >> Alaska. All the locations are connected by a WAN with IPSEC to form a
> > >> VPN so it looks like it is all in the same room except for network
> > >> performance.
>
> > >> Each location must survive a network outage and continue to work, The
> > >> weather can be a problem up there.
>
> > >> Any data tables that change rapidly are to remain local to each
> > >> location.
>
> > >> About 2/3 of the database is configuration information which changes
> > >> very slowly. One table if this were running would have changed once in
> > >> 5 years. Some tables change more often as employees come and go or
> > >> equipment is added to a location. Config changes can be delayed by
> > >> downed connections so eventual consistency is okay.
>
> > >> I need something automatic since the people using the system are not
> > >> technical and cannot be depended on to to a task.
>
> > >> By restricting the application I could get the updates to one database
> > >> instance but then there is a time delay until the local copy is in
> > >> sync.
>
> > >> I looked at MySQL Replication as described in the Linux Journal
> > >> article July 2010 where they do a ring which has each server to the
> > >> left in the ring is master to the slave to the right but I could see
> > >> with intermittent networks down due to bad weather this could be a
> > >> headache waiting to happen. Also the MySQL licensing has a degree of
> > >> uncertainty to it so I would rather stay away.
>
> > >> I am aware of PostgreSQL-R which is in beta, The uuid and timestamps
> > >> available in web2py model help but then needs to be driven by cron in
> > >> a batch oriented update.
>
> > >> Sometimes I look at the NoSQL databases like CouchDB or MongoDB but
> > >> then the foreign keys from the rapidly changing data is a problem. I
> > >> could bridge it using equipment hostname or something like that but
> > >> still I would rather stay inside one database.
>
> > >> Hard problem to solve completely I think.
>
> > >> Comments?
>
> > >> Thanks
>
> > >> Ron


[web2py] Re: web2py organization - important for consultants !!!

2010-11-12 Thread Paul Gerrard
Here are my comments on the Guidelines page. Some of these are
duplicates with other peoples' comments - but what the heck. ---> is
my suggestion


...Our choice of technologies is motivated but a belief in Rapid
Application Development(RAD)
--->by

...application. The occurrence of faled prototypes
   ->failed

... A system analyst should be endowed with decision
  ->systems--->granted

... It may compromise on aestetic issues and
 --->aesthetic

... evelopment, but, it is not as an
   -->remove comma

... executing the full project project.
  --->remove repeated 'project'.

... we dare to say so and start again.
  > add 'or withdraw from the
project'?

... The business model behind FOSS is that
  ---> define FOSS

Use Open Standards and Interoprability
   >Interoperability

... by the Europen Union in its European Interoperability Framework:
>add a link to the standard?

Use Industry Standard Tehcnologies
  >Technologies

... and it plays a singificantrole in the
   --->significant role

... therefore less wise-spread. This gives us an hedge vs our
competitors.
   --->widespread--->edge over our
competitors.

... Portability is crytical to maximize
   --->critical

... We build software is portable and can un efficienly on most
computing Clouds.
 --->add 'that'   --->run

... optimization may be specific of each individual cloud
technologies
 -->to

A more general point: There's no mention of Agile approaches - surely
we need to include that?

Question: Do you register an interest by using the 'Contact Us' page?
It's not clear, I'm afraid. I'm interested!


Re: [web2py] Re: web2py organization - important for consultants !!!

2010-11-12 Thread Albert Abril
http://experts4solutions.com/e4s/default/companies

Local conacts
--> Local contacts!

xD

On Fri, Nov 12, 2010 at 11:06 AM, Paul Gerrard
wrote:

> Here are my comments on the Guidelines page. Some of these are
> duplicates with other peoples' comments - but what the heck. ---> is
> my suggestion
>
>
> ...Our choice of technologies is motivated but a belief in Rapid
> Application Development(RAD)
>--->by
>
> ...application. The occurrence of faled prototypes
>   ->failed
>
> ... A system analyst should be endowed with decision
>  ->systems--->granted
>
> ... It may compromise on aestetic issues and
> --->aesthetic
>
> ... evelopment, but, it is not as an
>   -->remove comma
>
> ... executing the full project project.
>  --->remove repeated 'project'.
>
> ... we dare to say so and start again.
>  > add 'or withdraw from the
> project'?
>
> ... The business model behind FOSS is that
>  ---> define FOSS
>
> Use Open Standards and Interoprability
>   >Interoperability
>
> ... by the Europen Union in its European Interoperability Framework:
>>add a link to the standard?
>
> Use Industry Standard Tehcnologies
>  >Technologies
>
> ... and it plays a singificantrole in the
>   --->significant role
>
> ... therefore less wise-spread. This gives us an hedge vs our
> competitors.
>   --->widespread--->edge over our
> competitors.
>
> ... Portability is crytical to maximize
>   --->critical
>
> ... We build software is portable and can un efficienly on most
> computing Clouds.
> --->add 'that'   --->run
>
> ... optimization may be specific of each individual cloud
> technologies
> -->to
>
> A more general point: There's no mention of Agile approaches - surely
> we need to include that?
>
> Question: Do you register an interest by using the 'Contact Us' page?
> It's not clear, I'm afraid. I'm interested!


[web2py] ValueError: need more than 1 value to unpack

2010-11-12 Thread Kostas M
I am trying to reproduce the "What is going on with web2py?" video
(http://vimeo.com/13485916). At the 'friend' section, when I try to
enter a new friend eg. "Max" I am getting this error:

Traceback (most recent call last):
  File "C:\Temp\web2py\applications\myplayepedvm/models/
plugin_wiki.py", line 597, in render_widget
  File "C:\Temp\web2py\applications\myplayepedvm/models/
plugin_wiki.py", line 183, in create
  File "gluon/tools.py", line 2874, in create
  File "gluon/tools.py", line 2817, in update
  File "gluon/sqlhtml.py", line 987, in accepts
  File "gluon/html.py", line 1557, in accepts
  File "gluon/html.py", line 558, in _traverse
  File "gluon/html.py", line 558, in _traverse
  File "gluon/html.py", line 558, in _traverse
  File "gluon/html.py", line 558, in _traverse
  File "gluon/html.py", line 565, in _traverse
  File "gluon/html.py", line 1336, in _validate
  File "gluon/validators.py", line 490, in __call__
ValueError: need more than 1 value to unpack



meta-code is:
db.define_table('friend',Field('name',requires=IS_NOT_IN_DB(db,'friend_name')))

Home is:
# Test App
## Friends
``
name: create
table: friend
message: new friend
``:widget
Friends:
``
name: jqgrid
table: friend
col_width: 80
width: 700
height: 100
``:widget


[web2py] ReportLab and AppEngine

2010-11-12 Thread Tiago Rosa
Hi folks,

I need to generate PDF reports from my GAE-deployed application. The
question is: how? Obviously the example in the web2py book won't work
because AppEngine does not allow access to the filesystem. I've found
this is possible in Django because Django's HttpResponse is a file-
like object and ReportLab's API can act on that.

Is there a similar way to generate these reports with GAE?

Thanks in advance!

---
Tiago Rosa


[web2py] Creating debug.html

2010-11-12 Thread demetrio
Hi, I've realized that it might be helpful, to include a template
called "debug.html" with the same code found in "generic.html." but
without the {{extend}} statement. I am using in my development and
saves me some time to write several "BEAUTIFY" calls.

When I want to be in "development mode", I just write {{include
'debug.html'}} in my template.

The code would be:

{{=BEAUTIFY(response._vars)}}
admin
request
request{{=BEAUTIFY(request)}}

session
session{{=BEAUTIFY(session)}}

response
response{{=BEAUTIFY(response)}}
auth.user
auth.user{{=BEAUTIFY(auth.user)}}
jQuery('.hidden').hide();


I also added the variable auth.user to this code.

I hope you find this something useful.


[web2py] is it possible to delete from a rows object

2010-11-12 Thread apple
items=db(db.dataitems.templatename==session.templatename).select(db.dataitems.ALL)
item=filter(lambda item: item.id==r.itemid, items)[0]
item.delete_record()

This deletes the record from the database but not from the local Rows
object. If I try to delete the item it says the Rows object does not
support deletion. Is there a way to delete the row from my local Rows
object or do I need to reread the Rows from the database each time I
delete a row from the database.



[web2py] Re: Web2py Application Exhibition ( Version 2.0 )

2010-11-12 Thread selecta
How do I submit? Should I just send you (NetAdmin) the code by email?
I am working on the project constantly, will you accept updates after
the first submission? Or should I wait till the deadline and submit
what I got until then?

On Nov 11, 9:21 pm, GoldenTiger  wrote:
> I'll be there, actually I am devoting most of my time studying web2py.
> I hope to do a nice application.
> :)
>
> On 8 nov, 20:20, Mr admin  wrote:
>
>
>
> > Sure!
>
> > Plugins are just miniature applications right?  :-)
>
> > Mr.NetAdmin
>
> > On Mon, Nov 8, 2010 at 1:13 PM, mr.freeze  wrote:
> > > Can we submit be a plugin?
>
> > > On Nov 3, 3:18 pm, NetAdmin  wrote:
> > > > Web2py Application Exhibition Version 2.0
>
> > > > Do you have a Web2py app that you'd like to show the world?
> > > > If so, you may be interested in the Web2py Application Exhibition.
>
> > > > The WAE is a way to...
> > > > 1. Demonstrate what can be done with Web2py.
> > > > 2. Share and learn about useful web2py, python, Javascript, jQuery
> > > > etc. techniques.
> > > > 3. Earn some money toward that new  you've been craving.
>
> > > > Projects will be judged in the following areas.
>
> > > > Ease of use
> > > > Usefulness
> > > > Visual Appeal
>
> > > > The Rules
> > > > 1. Applications must be submitted no later than December 15, 2010
> > > > 2. Source must be included with your submissions.
> > > > 3. If the application is written by a team, Massimo can NOT be part of
> > > > the team.
> > > > 4. After a 2 week review period, on December 31, 2010, the winners
> > > > will
> > > > be announced on the web2py-users list.
> > > > 5. The 1st place winner will receive $100 US Dollars, 2nd place will
> > > > receive $50
> > > > 6. You must enjoy using Web2py!
> > > > 7. Previous winners must wait 365 days before being eligible to win
> > > > again.
>
> > > > Martin Mulone, the winner of the last Exhibition with his entry titled
> > > > "Instant Press", has volunteered to help tally your votes using an
> > > > application
> > > > he wrote. ( Using Web2py of course! )
>
> > > > Submissions must be mailed to mr.netad...@gmail.com
>
> > > > Good Luck!
>
> > > > Mr.NetAdmin at gmail.com


[web2py] Re: DAL() unusable ?

2010-11-12 Thread Mirek Zvolský
>> Thadeus Burgess
>> WRong. cr2 is a really really bad design.
>> Database 101, any many to many relationship must be defined through a link 
>> table.

I'm sorry, but you missunderstand the term "many to many relationship"
and the term "relation" at all.
Because, of course, "one relation" means exactly "one relation" = one
kind of relationship between two entities.
In other words "one relation" has exactly ONE meaning in the real
world, for which we create the model.

If we realy have ONE relation, which is "many to many", then there is
NO POSSIBILITY, how to design this using 2 tables, and 3-rd link table
(with foreign keys to both previous) must be added. - Please think
about this to understand the difference: We have here ONE relation
from the real world, which we realize with TWO relations of the data
model, because we have no other way how to do it.

That's not the case of
http://zvolsky.alwaysdata.net/crm2.jpg

Here we have 3 relations which describe 3 different relationships
(relationships of different reasons!) between real entities:
1) which person is an employee of which company,
2) which person has created the company record,
3) which person has created the person records,
all 3 relations are "1:m" relations.

To realize "1:m" relation there is no need to add a connecting table
and if you do so, that would be a realy very bad design !
And it's easy to say why in other words:
Because in case of real "m:m" relation there can be more as one
records in the added connecting table to describe relationship between
two entities.
But if you will add connecting table from your weak reasons, then you
will have always one(!) record in the connecting table.
So you will have no benefit when you add such table, but you receive
lot of additional problems to handle the more difficult model.

I hope I have exlained it well with my bad english.
I'm sorry that I speak a little hard, this is not from the reason that
previous are basic things in relational databases and in SQL language,
but reason is that there is a risk, that you will avoid Massimo to
make that great change.

Mirek


[web2py] Re: Web2py Application Exhibition ( Version 2.0 )

2010-11-12 Thread NetAdmin

You should wait for the the deadline, then submit by email.

Good Luck!

Mr.NetAdmin


[web2py] crud settings

2010-11-12 Thread leone
Hi,
peraphs a bias in

def mycontroller():
  crud.settings.update_next = URL(c=request,f='select')
  return dict(crud=crud.update(db.balance, request.args(0)))

that redirect to:

http://.../../,%20'wsgi':%20%20at%200x9f890d4>,%20'middleware':%20%20at%200x9f8910c>,%20'environ':%20{'wsgi.multiprocess':%20False,%20'HTTP_COOKIE':%20'rootCA=

Bye
leone


[web2py] Re: DAL() unusable ?

2010-11-12 Thread Mirek Zvolský
>> Mariano Reingart

Thanks for your response and practical experience with large system.

I think the problem is clear:
In current web2py philosophy the same data model becames valid or
invalid based on the order of table definition commands. And if a
model is complex, then there is no possibility how to make it valid/
acceptable for web2py.

So as long this situation will continue, so long there will be block
for more complex projects. The problem will come back again and again.
It will be nice, if Massimo(?) could redesign this soon in such way:
first create tables/fields in the db object, second turn on
constraints in cycle over all tables and over all their foreign keys.

Of course for large projects there will be a problem of too many
tables and slow execution, especially when structures changes.
>> Massimo Di Pierro:
>> there is a problem if too many tables are in scope. We need to create
>> a mechanisn for conditionally executing models based on the called
>> action. Perhaps give models a subfolder structure like in views.

Maybe this Massimo's idea is good. There should be always one model
(default=db.py) with full database definition, and just this model
would support structure migrations. In simple projects we could use
this model (same situation as today for all web2py projects), in large
projects subfolder models can be defined, which are smaller sub-sets
of the whole model - they would not support migration, but they just
will (together with controller) prepare data for specific view.

However, I don't know, if such system change in web2py would be good.
Because who need such something to speed up his model, he can test
request.controller and request.function in model and he can
conditional call what he need.


Re: [web2py] Re: web2py organization - important for consultants !!!

2010-11-12 Thread Kenneth Lundström
Very nice site, the disappearing lightbulb is nice. One bad thing with 
the disappearing lightbulb is if you reload the frontpage and scroll 
down immediately, after a couple of seconds the page shakes like an 
earthquake.


the Experts page looks a little bit odd, you have the texts Filter by 
country and Where are we? but then lots of space so All our experts is 
almost outside of window. Maybe the Google map could be visible all the 
time and before you select a country all experts could be seen on the map.


 If I select a country (in my case Finland) I get a Google map with the 
world but nothing on it. Would it be bether to only have relevant 
Countries in the dropdown list?


When I select an expert all other experts disappears and I have to go 
back to find next expert. Could all experts Expertieses be shown in the 
list with all experts.


The Projects page is empty, one thing I hate about websites is empty 
pages, why have a link in the menu if the page is empty. Maybe remove 
the Projects link until there is something. Or atleast write something 
there.



Kenneth




Not at all. It just happened that I have been monitoring today and I
know the people who filled the form, so I approved them. You
specifically have been a contributing member of this community for
some time. I will not be so prompt and may need to be reminded.

For now I will handle approval. When we reach a critical mass and I
start seeing people I do not recognize, we can together create a more
formal process for approval.

Massimo



On Nov 11, 4:06 pm, GoldenTiger  wrote:

I did login atwww.experts4solutions.comand now I appears at "our
experts", then anyone can be an expert?
Before appearing as expert, I want to make merit :)

On 11 nov, 22:21, José Ignacio Hurtado
wrote:


Sounds interesting.
2010/11/11 Branko Vukelic

On Thu, Nov 11, 2010 at 9:31 PM, VP  wrote:

I truly hope so.  Currently, the book and this mailing list are two
sources for learning about web2py.   I hope this new venture is not
diminishing future improvements of both of these.

Oh, that's just silly. I don't see how experts4solutions could affect
mailing list or book at all.
--
Branko Vukelić
bg.bra...@gmail.com
stu...@brankovukelic.com
Check out my blog:http://www.brankovukelic.com/
Check out my portfolio:http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca:http://identi.ca/foxbunny
Gimp Brushmakers Guild
http://bit.ly/gbg-group

--
Un saludo,
José Ignacio Hurtado López






Re: [web2py] Re: web2py organization - important for consultants !!!

2010-11-12 Thread Kenneth Lundström

One more thing,

I went through all experts but one experts Internal error


http://experts4solutions.com/e4s/default/expert/7


 Internal error

Ticket issued: 
e4s/81.17.193.228.2010-11-12.13-29-46.5651ebc2-31b8-43df-94f0-44b48c2d4647 




Kenneth


Not at all. It just happened that I have been monitoring today and I
know the people who filled the form, so I approved them. You
specifically have been a contributing member of this community for
some time. I will not be so prompt and may need to be reminded.

For now I will handle approval. When we reach a critical mass and I
start seeing people I do not recognize, we can together create a more
formal process for approval.

Massimo



On Nov 11, 4:06 pm, GoldenTiger  wrote:

I did login atwww.experts4solutions.comand now I appears at "our
experts", then anyone can be an expert?
Before appearing as expert, I want to make merit :)

On 11 nov, 22:21, José Ignacio Hurtado
wrote:


Sounds interesting.
2010/11/11 Branko Vukelic

On Thu, Nov 11, 2010 at 9:31 PM, VP  wrote:

I truly hope so.  Currently, the book and this mailing list are two
sources for learning about web2py.   I hope this new venture is not
diminishing future improvements of both of these.

Oh, that's just silly. I don't see how experts4solutions could affect
mailing list or book at all.
--
Branko Vukelić
bg.bra...@gmail.com
stu...@brankovukelic.com
Check out my blog:http://www.brankovukelic.com/
Check out my portfolio:http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca:http://identi.ca/foxbunny
Gimp Brushmakers Guild
http://bit.ly/gbg-group

--
Un saludo,
José Ignacio Hurtado López






Re: [web2py] Re: web2py organization - important for consultants !!!

2010-11-12 Thread Bruno Rocha
Note that profile page accepts MARKMIN for bio content:
http://experts4solutions.com/e4s/default/expert/2

This is usefull to include aditional information.


Would be very nice to have something like a badge to include in our blogs /
companies websites.


[web2py] Re: Stress testing a web2py deployment

2010-11-12 Thread mdipierro
Can you share some data?

On Nov 12, 2:01 am, Luther Goh Lu Feng  wrote:
> My colleague did a deployment of web2py using today using apache as a
> reverse proxy. The demo setup performed quite badly. And was resolved
> by using nginx in place of apache.
>
> Quick question: is there a way to simulate a stress test to find the
> upper limits of performance without using real users?


[web2py] Re: How to switch back to English for the Admin interface?

2010-11-12 Thread mdipierro
The admin (admin) has a selector at the bottom, it uses cookies to
keep the preferred selected language.

On Nov 12, 3:10 am, Stefan Scholl  wrote:
> That's how I do it with multilingual sites: The browser language
> determines the first page you reach. Every language has its own
> directory in the URL. Then you can choose between the other languages
> (not by country flag if I can prevent it ;-).
>
> (All my web2py projects so far were monolingual. But I've done it in
> Django and MODx, e.g.)
>
> On 10 Nov., 22:04, guruyaya  wrote:
>
> > I'm not sure how to attach files here, but I've created a patch that
> > creates a dropdown with all possible languages on the admin. Anyone
> > wants it?
>
> > On Nov 10, 2:53 pm, Stefan Scholl  wrote:
>
> > > I know, but I don't want to use one browser for development (English)
> > > and one for the rest (German).
>
> > > On 9 Nov., 14:28, mdipierro  wrote:
>
> > > > wait. You should not need to delete files. The language is set by your
> > > > browser.
>
> > > > On Nov 9, 3:41 am, Stefan Scholl  wrote:
>
> > > > > Oops, found it 5 minutes later.
>
> > > > > In case somebody wants to switch back to English, too:
>
> > > > > Delete (or rename) your language in applications/admin/languages
>
>


[web2py] Re: ValueError: need more than 1 value to unpack

2010-11-12 Thread mdipierro
IS_NOT_IN_DB(db,'friend_name')

should be

IS_NOT_IN_DB(db,'friend.name')

On Nov 12, 5:29 am, Kostas M  wrote:
> I am trying to reproduce the "What is going on with web2py?" video
> (http://vimeo.com/13485916). At the 'friend' section, when I try to
> enter a new friend eg. "Max" I am getting this error:
>
> Traceback (most recent call last):
>   File "C:\Temp\web2py\applications\myplayepedvm/models/
> plugin_wiki.py", line 597, in render_widget
>   File "C:\Temp\web2py\applications\myplayepedvm/models/
> plugin_wiki.py", line 183, in create
>   File "gluon/tools.py", line 2874, in create
>   File "gluon/tools.py", line 2817, in update
>   File "gluon/sqlhtml.py", line 987, in accepts
>   File "gluon/html.py", line 1557, in accepts
>   File "gluon/html.py", line 558, in _traverse
>   File "gluon/html.py", line 558, in _traverse
>   File "gluon/html.py", line 558, in _traverse
>   File "gluon/html.py", line 558, in _traverse
>   File "gluon/html.py", line 565, in _traverse
>   File "gluon/html.py", line 1336, in _validate
>   File "gluon/validators.py", line 490, in __call__
> ValueError: need more than 1 value to unpack
>
> meta-code is:
> db.define_table('friend',Field('name',requires=IS_NOT_IN_DB(db,'friend_name')))
>
> Home is:
> # Test App
> ## Friends
> ``
> name: create
> table: friend
> message: new friend
> ``:widget
> Friends:
> ``
> name: jqgrid
> table: friend
> col_width: 80
> width: 700
> height: 100
> ``:widget


[web2py] Re: ReportLab and AppEngine

2010-11-12 Thread mdipierro
You can use pyfpdf or reportlab. I let Mariano explain how to use
pyfpdf.

To use reportlab just unzip the pure python implementation in web2py/
site-packages

import it in any of your actions.

call if from your controller actions and/or view.

(p.s. web2py actions also can return a file-like object but that is
beside the point, you can use cStringIO.StringIO)



On Nov 12, 5:59 am, Tiago Rosa  wrote:
> Hi folks,
>
> I need to generate PDF reports from my GAE-deployed application. The
> question is: how? Obviously the example in the web2py book won't work
> because AppEngine does not allow access to the filesystem. I've found
> this is possible in Django because Django's HttpResponse is a file-
> like object and ReportLab's API can act on that.
>
> Is there a similar way to generate these reports with GAE?
>
> Thanks in advance!
>
> ---
> Tiago Rosa


[web2py] Re: is it possible to delete from a rows object

2010-11-12 Thread mdipierro
http://www.web2py.com/book/default/chapter/06#find,-exclude,-sort

On Nov 12, 6:19 am, apple  wrote:
> items=db(db.dataitems.templatename==session.templatename).select(db.dataitems.ALL)
> item=filter(lambda item: item.id==r.itemid, items)[0]
> item.delete_record()
>
> This deletes the record from the database but not from the local Rows
> object. If I try to delete the item it says the Rows object does not
> support deletion. Is there a way to delete the row from my local Rows
> object or do I need to reread the Rows from the database each time I
> delete a row from the database.


[web2py] Re: crud settings

2010-11-12 Thread mdipierro
  crud.settings.update_next = URL(c=request,f='select')

should be

  crud.settings.update_next = URL(r=request,f='select')

or

  crud.settings.update_next = URL('select')


On Nov 12, 6:52 am, leone  wrote:
> Hi,
> peraphs a bias in
>
> def mycontroller():
>       crud.settings.update_next = URL(c=request,f='select')
>       return dict(crud=crud.update(db.balance, request.args(0)))
>
> that redirect to:
>
> http://.../../,%20'wsgi':%20%20at%200x9f890d4>,%20'middleware':%20%20at%200x9f8910c>,%20'environ':%20{'wsgi.multiprocess':%20False,%20'HTTP_COOKIE':%20'rootCA=
>
> Bye
> leone


[web2py] Re: how to use ExtendedLoginForm ?

2010-11-12 Thread Bruno Rocha
Well, ExtendedLoginForm is not working, but I am trying to fix it and send a
patch.

By now, I am using another solution, If someone else needs the same.

to have both auth modes [built-in and RPX] just like in:
http://natalanimal.com.br/init/default/user/login  and web2pyslices.com

At models after the definition of auth:

if request.vars._next:
url = "http://yourdomain.com.br/app/default/user/login?_next=%s"; %
request.vars._next
else:
url = "http://yourdomain.com.br/app/default/user/login";

rpxform = RPXAccount(request,
api_key='',
domain='',
url = url,
language="pt-BR",embed=True

)


In the controller:


def user():
rpx = ''
registerurl=URL('default','user',args='register')
if request.vars.token:
auth.settings.login_form = rpxform
return dict(form=auth())
if 'login' in request.args:
rpx = rpxform.login_form()
html = DIV(H1('Login'),
   rpx,BR(),BR(),
   H1(A('Click to register',_href=registerurl),BR(),' or sign-up
with your password:'),
   auth(),
  )
else:
html = auth()

return dict(form=html)





That is working very well now! thanks for Nathan Freeze who helps me a lot!

If I got success fixing ExtendLoginForm I will send a patch for this.


2010/11/12 Bruno Rocha 

> Hi, I am trying to have both default login form and RPX working.
>
> Looking for login_methods on gluon.contrib I found ExtendedLoginForm
>
>  """
>  ExtendedLoginForm is used to extend normal login form in web2py with one
> more login method.
>  So user can choose the built-in login or extended login methods.
>  """
>
>
> then in my model:
>
> 
>
> from gluon.contrib.login_methods.rpx_account import RPXAccount
> from gluon.contrib.login_methods.extended_login_form import
> ExtendedLoginForm
>
> rpxform = RPXAccount(request,
> api_key='thekey',
> domain='mydomain',
> url = "http://mydomain.com.br/%s/%s"; % (request.application,geturl()))
>
> extended_login_form = ExtendedLoginForm(request, auth, rpxform,
> signals=['token'])
>
> auth.settings.login_form = extended_login_form
>
>
> 
>
> I got this error:
>
> 
> Versionweb2py Version 1.87.3 (2010-10-13 19:44:46)
>
> raceback (most recent call last):
>
>   File "/home/rochacbruno/webapps/app2/web2py/gluon/restricted.py", line 188, 
> in restricted
>
> exec ccode in environment
>
>   File 
> "/home/rochacbruno/webapps/app2/web2py/applications/init/models/model.py" 
> , line 
> 61, in 
>
> extended_login_form = ExtendedLoginForm(request, auth, rpxform, 
> signals=['token'])
> TypeError: __init__() got multiple values for keyword argument 'signals'
>
>
>
>


-- 

http://rochacbruno.com.br


[web2py] Re: Authentication and multiple logon sessions

2010-11-12 Thread Paul Gerrard
Two machines with FF would be more reliable :O)

I have a related question. Is there are way of stopping a user account
being used by more than one person simultaneously? Is there anything
in Web2p to help with thsi or would I need to have some form of DB/
session solution?

Thanks.

On Nov 11, 5:23 pm, mdipierro  wrote:
> Short answer no.
>
> Yet I found this:http://www.fusioncube.net/index.php/multiple-sessions-firefox
>
> I did not try it.
>
> On Nov 11, 11:14 am, Alex  wrote:
>
>
>
>
>
>
>
> > Hello,
>
> > I have a question regarding how the authentication defines each unique
> > user session.  I am working on an app that uses the authentication and
> > was trying to test with multiple users logged onto my site.
>
> > My test is opening IE and logging onto the site as one user, then
> > opening a new IE instance (not new tab) and trying to log on as
> > another user.  The problem is, it seems that the application still
> > sees each session as 1 so once I log in on the second browser, it
> > changes the login of the first browser.
>
> > Is there a configuration so I can test this?
>
> > It works if I use IE as one session and Firefox as another, but was
> > just curious what may be causing this.
>
> > Thanks!


[web2py] web2py 1.89.1 is OUT

2010-11-12 Thread mdipierro
Please give it a try and report any bug.

1.89.1
- new admin layout (thanks Branko Vukelic)
- new admin search
- new admin language selector (thanks Yair)
- new Welcome app (thanks Martin Mulone)
- beter wizard
- admin support for DEMO_MODE=True
- admin exposes GAE deployment button (always)
- MENU support None links (thanks Michael Wolfe)
- web2py.py -J for running cron (thanks Jonathan Lundell)
- fixed ~db.table.id on GAE (thanks MicLee)
- service.jsonrpc supports service.JsonRpcException (thanks Matt)
- many small bug fixes.



[web2py] Re: web2py organization - important for consultants !!!

2010-11-12 Thread mdipierro
Thank you for all the reported corrections. I think I have
incorporated them all. Please check.
Branko is already at work for a better layout.

Massimo



On Nov 12, 4:06 am, Paul Gerrard  wrote:
> Here are my comments on the Guidelines page. Some of these are
> duplicates with other peoples' comments - but what the heck. ---> is
> my suggestion
>
> ...Our choice of technologies is motivated but a belief in Rapid
> Application Development(RAD)
>                                         --->by
>
> ...application. The occurrence of faled prototypes
>                                ->failed
>
> ... A system analyst should be endowed with decision
>       ->systems            --->granted
>
> ... It may compromise on aestetic issues and
>                          --->aesthetic
>
> ... evelopment, but, it is not as an
>                    -->remove comma
>
> ... executing the full project project.
>                               --->remove repeated 'project'.
>
> ... we dare to say so and start again.
>                                   > add 'or withdraw from the
> project'?
>
> ... The business model behind FOSS is that
>                               ---> define FOSS
>
> Use Open Standards and Interoprability
>                        >Interoperability
>
> ... by the Europen Union in its European Interoperability Framework:
>         >add a link to the standard?
>
> Use Industry Standard Tehcnologies
>                       >Technologies
>
> ... and it plays a singificantrole in the
>                    --->significant role
>
> ... therefore less wise-spread. This gives us an hedge vs our
> competitors.
>                    --->widespread                --->edge over our
> competitors.
>
> ... Portability is crytical to maximize
>                    --->critical
>
> ... We build software is portable and can un efficienly on most
> computing Clouds.
>                      --->add 'that'       --->run
>
> ... optimization may be specific of each individual cloud
> technologies
>                                  -->to
>
> A more general point: There's no mention of Agile approaches - surely
> we need to include that?
>
> Question: Do you register an interest by using the 'Contact Us' page?
> It's not clear, I'm afraid. I'm interested!


[web2py] Re: Authentication and multiple logon sessions

2010-11-12 Thread mdipierro
You can add field auth_user (client with default to request.client)
then in db.py

if auth.user and auth.user.client!=request.client:
session.flash="oops"
redirect(URL('user/logout'))


On Nov 12, 8:39 am, Paul Gerrard  wrote:
> Two machines with FF would be more reliable :O)
>
> I have a related question. Is there are way of stopping a user account
> being used by more than one person simultaneously? Is there anything
> in Web2p to help with thsi or would I need to have some form of DB/
> session solution?
>
> Thanks.
>
> On Nov 11, 5:23 pm, mdipierro  wrote:
>
> > Short answer no.
>
> > Yet I found 
> > this:http://www.fusioncube.net/index.php/multiple-sessions-firefox
>
> > I did not try it.
>
> > On Nov 11, 11:14 am, Alex  wrote:
>
> > > Hello,
>
> > > I have a question regarding how the authentication defines each unique
> > > user session.  I am working on an app that uses the authentication and
> > > was trying to test with multiple users logged onto my site.
>
> > > My test is opening IE and logging onto the site as one user, then
> > > opening a new IE instance (not new tab) and trying to log on as
> > > another user.  The problem is, it seems that the application still
> > > sees each session as 1 so once I log in on the second browser, it
> > > changes the login of the first browser.
>
> > > Is there a configuration so I can test this?
>
> > > It works if I use IE as one session and Firefox as another, but was
> > > just curious what may be causing this.
>
> > > Thanks!
>
>


[web2py] Re: web2py 1.89.1 is OUT

2010-11-12 Thread mdipierro
Congratulations to all those how contributed (whose names are in the
hg logs) because this is a beautiful version.

If your name is not mentioned in the who.html page and you think it
should be please assume this is an oversight on my site (I try to keep
track but I can do mistakes) so please do not be shy and email me.

Massimo

On Nov 12, 9:22 am, mdipierro  wrote:
> Please give it a try and report any bug.
>
> 1.89.1
> - new admin layout (thanks Branko Vukelic)
> - new admin search
> - new admin language selector (thanks Yair)
> - new Welcome app (thanks Martin Mulone)
> - beter wizard
> - admin support for DEMO_MODE=True
> - admin exposes GAE deployment button (always)
> - MENU support None links (thanks Michael Wolfe)
> - web2py.py -J for running cron (thanks Jonathan Lundell)
> - fixed ~db.table.id on GAE (thanks MicLee)
> - service.jsonrpc supports service.JsonRpcException (thanks Matt)
> - many small bug fixes.


[web2py] Re: Help with "No such file or directory" error

2010-11-12 Thread CesarBustios
Wow it worked that way! Thanks for your patience and time Mr. DiPierro

On 11 nov, 17:42, mdipierro  wrote:
> Now I get it
>
> source=os.path.join(request.folder,'uploads/Image.image.a278723.jpg')
> dest=os.path.join(request.folder,'uploads/advertisement.jpg')
> shutil.copy(source,dist)
>
> On Nov 11, 4:38 pm, CesarBustios  wrote:
>
>
>
>
>
>
>
> > shutil.copy("uploads/Image.image.a278723.jpg", "uploads/
> > advertisement.jpg")
>
> > I need the correct path, is it the whole path /home/cesar/web2py/
> > applications/bluetooth/uploads/image1.jpg
>
> > i tried different ways but im still getting that error.
>
> > On 11 nov, 17:36, CesarBustios  wrote:
>
> > > I have like 20 images in the uploads directory, they are all
> > > advertising images, if i want to send, say image1 first, i need to
> > > make a copy in the same directory with the name "advertisement", if i
> > > need to send imag16 i have to do the same thing and rename it to
> > > "advertisement". Im sending via bluetooth i just want to rename the
> > > images.
>
> > > On 11 nov, 17:25, mdipierro  wrote:
>
> > > > You call:
>
> > > > shutil.copy(path, destination)
>
> > > > if path and destination are the same value there is nothing to copy.
>
> > > > shutil.copy(path, destination)
>
> > > > path and destination must be different filenames.
>
> > > > On Nov 11, 4:12 pm, CesarBustios  wrote:
>
> > > > > path and destination are in fact the same directory (uploads) i'm just
> > > > > trying to make a copy.
>
> > > > > Thanks
>
> > > > > On 11 nov, 11:12, mdipierro  wrote:
>
> > > > > > what are path and destination?
>
> > > > > > On Nov 11, 9:20 am, CesarBustios  wrote:
>
> > > > > > > I'm using the whole path, i'm trying everything but i can't copy 
> > > > > > > the
> > > > > > > file. Any thoughts?
>
> > > > > > > On 10 nov, 20:18, CesarBustios  wrote:
>
> > > > > > > > Hi, i'm trying to make a copy of an image inside my "uploads" 
> > > > > > > > folder. I
> > > > > > > > ´m using the shutil module:
>
> > > > > > > > import shutil
> > > > > > > > shutil.copy(path, destination)
>
> > > > > > > > But i get "No such file or directory" error. Can anyone tell me 
> > > > > > > > the
> > > > > > > > correct path if my project is inside: 
> > > > > > > > /home/user/web2py/applications/
> > > > > > > > myproject/uploads/File.file.asdad89018239.128320.jpg
>
> > > > > > > > Thanks!- Ocultar texto de la cita -
>
> > > > > > - Mostrar texto de la cita -- Ocultar texto de la cita -
>
> > > > - Mostrar texto de la cita -- Ocultar texto de la cita -
>
> > > - Mostrar texto de la cita -


Re: [web2py] Re: How do I construct my query to handle a multiple select?

2010-11-12 Thread Lorin Rivers
Sorry I wasn't clear. 

I'm using a select multiple element in my form. When more than one (in my 
example, it's a MAC address) item is chosen, I need to return a result set for 
each choice and display them together.  

I could do it with a query like: "choice 1 OR choice 2" or I could do it  by 
combining the results of separate queries without the OR (there's also a date 
range but that's from a separate field and is hard-coded while I figure this 
other bit out).

I'm having trouble constructing the code to handle the multiple selections. The 
form returns the request.vars just fine, so that part of my code is working. I 
think I need to loop through the request.vars in my controller to build my 
query or queries but I can't figure out how. I tried using a loop from i to 
len(request.vars) but that didn't work.

On Nov 11, 2010, at 21:01, mdipierro  wrote:

> sorry I do not understand the question.
> 
> On Nov 11, 6:12 pm, Lorin Rivers  wrote:
>> I have a form using this:
>>   options=[str(my_macaddr[i].MacAddr) for i in range(len(my_macaddr))]
>>   form=FORM(SELECT(*options,_name='MacAddrSelect',_multiple='multiple'),INPUT
>>   (_type='submit'))
>> 
>>   records = db4((db4.data_table.MacAddr==request.vars.MacAddrSelect) & 
>> (db4.data_table.ReqTime>='2010-11-08T21:00') & 
>> (db4.data_table.ReqTime<='2010-11-08T22:00')).select(db4.data_table.MacAddr,db4.data_table.ReqTime,db4.data_table.Po)
>> 
>> How do I create a loop that will return records using more than one 
>> selection in my form?
>> --
>> Lorin Rivers
>> Mosasaur: Killer Technical Marketing 
>> 
>> 512/203.3198 (m)


Re: [web2py] Re: web2py 1.89.1 is OUT

2010-11-12 Thread Manu
It s absolutely beautiful on windows.

On Fri, Nov 12, 2010 at 4:46 PM, mdipierro  wrote:
> Congratulations to all those how contributed (whose names are in the
> hg logs) because this is a beautiful version.
>
> If your name is not mentioned in the who.html page and you think it
> should be please assume this is an oversight on my site (I try to keep
> track but I can do mistakes) so please do not be shy and email me.
>
> Massimo
>
> On Nov 12, 9:22 am, mdipierro  wrote:
>> Please give it a try and report any bug.
>>
>> 1.89.1
>> - new admin layout (thanks Branko Vukelic)
>> - new admin search
>> - new admin language selector (thanks Yair)
>> - new Welcome app (thanks Martin Mulone)
>> - beter wizard
>> - admin support for DEMO_MODE=True
>> - admin exposes GAE deployment button (always)
>> - MENU support None links (thanks Michael Wolfe)
>> - web2py.py -J for running cron (thanks Jonathan Lundell)
>> - fixed ~db.table.id on GAE (thanks MicLee)
>> - service.jsonrpc supports service.JsonRpcException (thanks Matt)
>> - many small bug fixes.
>


[web2py] Re: How do I construct my query to handle a multiple select?

2010-11-12 Thread mdipierro
  options=[str(my_macaddr[i].MacAddr) for i in range(len(my_macaddr))]
 
form=SQLFORM.factory(Field('macs',requires=IS_IN_SET(options,multiple='multiple')))
 
dbset=db4((db4.data_table.ReqTime>='2010-11-08T21:00')&(db4.data_table.ReqTime<='2010-11-08T22:00'))
  if form.accepts(request) and form.vars.macs:
 query = reduce(lambda a,b:a|b,[db4.data_table.MacAddr==x for x in
form.vars.macs])
 dbset=dbset(query)
  records =
dbset.select(db4.data_table.MacAddr,db4.data_table.ReqTime,db4.data_table.Po)



On Nov 12, 10:02 am, Lorin Rivers  wrote:
> Sorry I wasn't clear.
>
> I'm using a select multiple element in my form. When more than one (in my 
> example, it's a MAC address) item is chosen, I need to return a result set 
> for each choice and display them together.  
>
> I could do it with a query like: "choice 1 OR choice 2" or I could do it  by 
> combining the results of separate queries without the OR (there's also a date 
> range but that's from a separate field and is hard-coded while I figure this 
> other bit out).
>
> I'm having trouble constructing the code to handle the multiple selections. 
> The form returns the request.vars just fine, so that part of my code is 
> working. I think I need to loop through the request.vars in my controller to 
> build my query or queries but I can't figure out how. I tried using a loop 
> from i to len(request.vars) but that didn't work.
>
> On Nov 11, 2010, at 21:01, mdipierro  wrote:
>
> > sorry I do not understand the question.
>
> > On Nov 11, 6:12 pm, Lorin Rivers  wrote:
> >> I have a form using this:
> >>   options=[str(my_macaddr[i].MacAddr) for i in range(len(my_macaddr))]
> >>   
> >> form=FORM(SELECT(*options,_name='MacAddrSelect',_multiple='multiple'),INPUT
> >>   (_type='submit'))
>
> >>   records = db4((db4.data_table.MacAddr==request.vars.MacAddrSelect) & 
> >> (db4.data_table.ReqTime>='2010-11-08T21:00') & 
> >> (db4.data_table.ReqTime<='2010-11-08T22:00')).select(db4.data_table.MacAddr,db4.data_table.ReqTime,db4.data_table.Po)
>
> >> How do I create a loop that will return records using more than one 
> >> selection in my form?
> >> --
> >> Lorin Rivers
> >> Mosasaur: Killer Technical Marketing 
> >> 
> >> 512/203.3198 (m)
>
>


[web2py] many to many inline form

2010-11-12 Thread Joe Wakefield
So I'm trying to migrate an old rails app that broke a while back, and
I came across a rather difficult situation. I boiled the problem down
to this simplified mockup: http://yfrog.com/ghbeanjarsp

The real app has nothing to do with jelly beans, but this is the issue
at hand. Basically there are tables joined in a many to many
relationship, with an extra column for amount (because no bean is
unique). Creating/updating jars must be done inline with the rest of
the jar's form.

I was reading stuff about custom widgets, and that seemed a likely
direction. However, I'm hoping for a more direct suggestion on how you
guys would achieve this.


[web2py] Re: Can´t do redirect [SOLVED]

2010-11-12 Thread yamandu
I found I had put a import to redirect that was causing the crash.
Strange thing is that it looks like it was neeed in past (I don´t
remember why)
and now it crashes but removing ti everything is normal.

On Nov 11, 4:19 pm, yamandu  wrote:
> One thing that could have to do with this is that I downgrade Python
> recently from 2.5 to 2.5
>
> On Nov 9, 2:30 pm,yamandu wrote:
>
> > After upgraded I got exception when try toredirectusingredirect(URL()).
>
> > I used to do :
> > returnredirect(URL(r=request, f='modelo'))
>
> > but it works no more, gives me a ticket that don´t tells the error
> > just the line.
> > The folowing is an exerpt from the ticket thrown by the book example:
>
> > defredirect(location, how=303):
> >     location = location.replace('\r', '%0D').replace('\n', '%0A')
> >     raise HTTP(how,
> >                'You are being redirected here' %
> > location,
> > Location=location)
>
> >     * Location: undefined
> >     * location: '/welcome/default/index/1/2/3?a=b'
>
>


[web2py] Re: many to many inline form

2010-11-12 Thread mdipierro
We do not have a widget for that but it is time to make one. It is not
difficult.
If I have time I will do this over the week-end. Other users may have
already something working.

On Nov 12, 10:17 am, Joe Wakefield  wrote:
> So I'm trying to migrate an old rails app that broke a while back, and
> I came across a rather difficult situation. I boiled the problem down
> to this simplified mockup:http://yfrog.com/ghbeanjarsp
>
> The real app has nothing to do with jelly beans, but this is the issue
> at hand. Basically there are tables joined in a many to many
> relationship, with an extra column for amount (because no bean is
> unique). Creating/updating jars must be done inline with the rest of
> the jar's form.
>
> I was reading stuff about custom widgets, and that seemed a likely
> direction. However, I'm hoping for a more direct suggestion on how you
> guys would achieve this.


Re: [web2py] Re: Pagination [Web2py Utils] returns None

2010-11-12 Thread Andrew Evans
Hey Thadeus!

where would you like me to submit it? I can upload it here to this news
group. The only thing I changed was what you suggested ;) adding self.r.args
to the generate links function ;)


def generate_links(self):
self.backward = A('<< previous()', _href=URL(r=self.r,
args=self.r.args, vars={'p': self.current - self.display_count})) if
self.current else '<< previous(False)'
self.forward = A('next() >>', _href=URL(r=self.r, args=self.r.args,
vars={'p': self.current + self.display_count})) if self.total_results >
self.current + self.display_count else 'next(False) >>'
self.location = 'Showing %d to %d out of %d records' % (self.current
+ 1, self.current + self.num_results, self.total_results)
return (self.backward, self.forward, self.location)


Anyway I attached the paginate.py *cheers





On Thu, Nov 11, 2010 at 9:45 PM, Thadeus Burgess wrote:

> Mind sending me a patch?
>
> --
> Thadeus
>
>
>
>
>
> On Thu, Nov 11, 2010 at 6:02 PM, Andrew Evans  wrote:
>
>> hey thanks for the tips
>>
>> I have it working now
>>
>> *cheers
>>
>> Andrew
>>
>
>


paginate.py
Description: Binary data


[web2py] get representation to show up in command line

2010-11-12 Thread Richard Vézina
Hello,

I would know how I can get a print out of my field.represent=lambda
something in command line web2py environnement.

Hope I am clear.

For example if I do

print (db().select(db.TABLENAME.FIELDNAME))

I get the values of the field. In case I have create a representation of the
field can I get a print out in the command line environnement (ipython)??

Richard


[web2py] Re: get representation to show up in command line

2010-11-12 Thread mdipierro
this is not possible (because it is a DAL not an ORM)

You can do:

db.TABLENAME.FIELDNAME.represent=lambda value: value
for row in db().select(db.TABLENAME.FIELDNAME):
print db.TABLENAME.FIELDNAME.represent(row.FIELDNAME)

This would be the closest thing

On Nov 12, 10:27 am, Richard Vézina 
wrote:
> Hello,
>
> I would know how I can get a print out of my field.represent=lambda
> something in command line web2py environnement.
>
> Hope I am clear.
>
> For example if I do
>
> print (db().select(db.TABLENAME.FIELDNAME))
>
> I get the values of the field. In case I have create a representation of the
> field can I get a print out in the command line environnement (ipython)??
>
> Richard


Re: [web2py] Re: get representation to show up in command line

2010-11-12 Thread Richard Vézina
Ok thanks!

I wondering about an other thing :

I have this :

db['table1'].nottableidfield_id.represent=\
lambda nottableidfield_id: A("%(someotherfield)s"
%db.table1[nottableidfield_id],\

 
_href=URL(r=request,f='read',args='someothertable'+'/'+str(nottableidfield_id)))

And I get

format mapping error...

Why?

Richard



On Fri, Nov 12, 2010 at 11:37 AM, mdipierro  wrote:

> this is not possible (because it is a DAL not an ORM)
>
> You can do:
>
> db.TABLENAME.FIELDNAME.represent=lambda value: value
> for row in db().select(db.TABLENAME.FIELDNAME):
>print db.TABLENAME.FIELDNAME.represent(row.FIELDNAME)
>
> This would be the closest thing
>
> On Nov 12, 10:27 am, Richard Vézina 
> wrote:
> > Hello,
> >
> > I would know how I can get a print out of my field.represent=lambda
> > something in command line web2py environnement.
> >
> > Hope I am clear.
> >
> > For example if I do
> >
> > print (db().select(db.TABLENAME.FIELDNAME))
> >
> > I get the values of the field. In case I have create a representation of
> the
> > field can I get a print out in the command line environnement (ipython)??
> >
> > Richard
>


Re: [web2py] Re: get representation to show up in command line

2010-11-12 Thread Richard Vézina
Ok I think I found...

Is it because I am referring to the same table??

Richard

On Fri, Nov 12, 2010 at 11:43 AM, Richard Vézina <
ml.richard.vez...@gmail.com> wrote:

> Ok thanks!
>
> I wondering about an other thing :
>
> I have this :
>
> db['table1'].nottableidfield_id.represent=\
> lambda nottableidfield_id: A("%(someotherfield)s"
> %db.table1[nottableidfield_id],\
>
>  
> _href=URL(r=request,f='read',args='someothertable'+'/'+str(nottableidfield_id)))
>
> And I get
>
> format mapping error...
>
> Why?
>
> Richard
>
>
>
> On Fri, Nov 12, 2010 at 11:37 AM, mdipierro wrote:
>
>> this is not possible (because it is a DAL not an ORM)
>>
>> You can do:
>>
>> db.TABLENAME.FIELDNAME.represent=lambda value: value
>> for row in db().select(db.TABLENAME.FIELDNAME):
>>print db.TABLENAME.FIELDNAME.represent(row.FIELDNAME)
>>
>> This would be the closest thing
>>
>> On Nov 12, 10:27 am, Richard Vézina 
>> wrote:
>> > Hello,
>> >
>> > I would know how I can get a print out of my field.represent=lambda
>> > something in command line web2py environnement.
>> >
>> > Hope I am clear.
>> >
>> > For example if I do
>> >
>> > print (db().select(db.TABLENAME.FIELDNAME))
>> >
>> > I get the values of the field. In case I have create a representation of
>> the
>> > field can I get a print out in the command line environnement
>> (ipython)??
>> >
>> > Richard
>>
>
>


Re: [web2py] web2py 1.89.1 is OUT

2010-11-12 Thread appydev
Really beautiful!


Re: [web2py] Re: Pagination [Web2py Utils] returns None

2010-11-12 Thread Thadeus Burgess
Thanks. I uploaded a new version to pypi.

--
Thadeus




On Fri, Nov 12, 2010 at 10:27 AM, Andrew Evans  wrote:

> Hey Thadeus!
>
> where would you like me to submit it? I can upload it here to this news
> group. The only thing I changed was what you suggested ;) adding self.r.args
> to the generate links function ;)
>
>
> def generate_links(self):
> self.backward = A('<< previous()', _href=URL(r=self.r,
> args=self.r.args, vars={'p': self.current - self.display_count})) if
> self.current else '<< previous(False)'
> self.forward = A('next() >>', _href=URL(r=self.r, args=self.r.args,
> vars={'p': self.current + self.display_count})) if self.total_results >
> self.current + self.display_count else 'next(False) >>'
> self.location = 'Showing %d to %d out of %d records' %
> (self.current + 1, self.current + self.num_results, self.total_results)
> return (self.backward, self.forward, self.location)
>
>
> Anyway I attached the paginate.py *cheers
>
>
>
>
>
>
> On Thu, Nov 11, 2010 at 9:45 PM, Thadeus Burgess wrote:
>
>> Mind sending me a patch?
>>
>> --
>> Thadeus
>>
>>
>>
>>
>>
>> On Thu, Nov 11, 2010 at 6:02 PM, Andrew Evans wrote:
>>
>>> hey thanks for the tips
>>>
>>> I have it working now
>>>
>>> *cheers
>>>
>>> Andrew
>>>
>>
>>
>


Re: [web2py] Re: DAL() unusable ?

2010-11-12 Thread Thadeus Burgess
Right. I get it now.

Is there a reason for not sticking the record creation inside of its own
table?

--
Thadeus




2010/11/12 Mirek Zvolský 

> hich person is an employee of which company,
> 2) which person has created the company record,
> 3) which person has created the person records,
> all 3 relations are "1:m" relations.
>
> To realize "1:m" relation there is no need to add a connecting table
> and if you do so, that would be a realy very bad design !
> And it's easy to say why in other words:
> Because in case of real "m:m" relation there can be more as one
> records in the added connecting table to describe relationship between
> two entities.
> But if you will add connecting table from your weak reasons, then you
> will have always one(!) record in the connecting tab
>


Re: [web2py] Re: get representation to show up in command line

2010-11-12 Thread Richard Vézina
I got it. I had a type mutation.

Richard

On Fri, Nov 12, 2010 at 11:50 AM, Richard Vézina <
ml.richard.vez...@gmail.com> wrote:

> Ok I think I found...
>
> Is it because I am referring to the same table??
>
> Richard
>
>
> On Fri, Nov 12, 2010 at 11:43 AM, Richard Vézina <
> ml.richard.vez...@gmail.com> wrote:
>
>> Ok thanks!
>>
>> I wondering about an other thing :
>>
>> I have this :
>>
>> db['table1'].nottableidfield_id.represent=\
>> lambda nottableidfield_id: A("%(someotherfield)s"
>> %db.table1[nottableidfield_id],\
>>
>>  
>> _href=URL(r=request,f='read',args='someothertable'+'/'+str(nottableidfield_id)))
>>
>> And I get
>>
>> format mapping error...
>>
>> Why?
>>
>> Richard
>>
>>
>>
>> On Fri, Nov 12, 2010 at 11:37 AM, mdipierro wrote:
>>
>>> this is not possible (because it is a DAL not an ORM)
>>>
>>> You can do:
>>>
>>> db.TABLENAME.FIELDNAME.represent=lambda value: value
>>> for row in db().select(db.TABLENAME.FIELDNAME):
>>>print db.TABLENAME.FIELDNAME.represent(row.FIELDNAME)
>>>
>>> This would be the closest thing
>>>
>>> On Nov 12, 10:27 am, Richard Vézina 
>>> wrote:
>>> > Hello,
>>> >
>>> > I would know how I can get a print out of my field.represent=lambda
>>> > something in command line web2py environnement.
>>> >
>>> > Hope I am clear.
>>> >
>>> > For example if I do
>>> >
>>> > print (db().select(db.TABLENAME.FIELDNAME))
>>> >
>>> > I get the values of the field. In case I have create a representation
>>> of the
>>> > field can I get a print out in the command line environnement
>>> (ipython)??
>>> >
>>> > Richard
>>>
>>
>>
>


[web2py] User Login/Logout authentication event

2010-11-12 Thread Alex
Hello,

I have a question regarding authentication.  I would like to find a
way to do certain events (ie.  store stuff in the cache, update a last
login time in the DB, etc.) when a user logs in and logs out.

I'm currently just using the built in "auth" object and was wondering
if there was a simple way I could do this?  Would I need to override
something like the login/logout commands the auth exposes?  If so, is
there a reference on how to do this?

Thanks!


[web2py] Re: User Login/Logout authentication event

2010-11-12 Thread mdipierro
auth.settings.login_onaccept=lambda form: do_something(form)

same with logout, etc.

On Nov 12, 11:50 am, Alex  wrote:
> Hello,
>
> I have a question regarding authentication.  I would like to find a
> way to do certain events (ie.  store stuff in the cache, update a last
> login time in the DB, etc.) when a user logs in and logs out.
>
> I'm currently just using the built in "auth" object and was wondering
> if there was a simple way I could do this?  Would I need to override
> something like the login/logout commands the auth exposes?  If so, is
> there a reference on how to do this?
>
> Thanks!


[web2py] pt-br for admin

2010-11-12 Thread Bruno Rocha
Here is attached the pt-br.py file for translating /admin application into
portuguese.

I hope this can be useful for someone who speaks portuguese, and this needs
a review before being integrated into web2py /admin

any portuguese speakers could help reviewing the translation strings?

Note: Some string of admin aren't being translated, may be a missing T()

--

Anexo arquivo de tradução para a aplicação admin. precisa de um review antes
de incorporar o web2py

alguém que fala português poderia ajudar a revisar os textos traduzidos?

Nota: alguns textos do admin não estão sendo traduzidos, talvez falte um T()
em algum lugar

-


Bruno
# coding: utf8
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" é uma expressão opcional como "campo1=\'novo_valor\'". Não é permitido atualizar ou apagar resultados de um JOIN',
'%Y-%m-%d': '%d/%m/%Y',
'%Y-%m-%d %H:%M:%S': '%d/%m/%Y %H:%M:%S',
'%s rows deleted': '%s registros apagados',
'%s rows updated': '%s registros atualizados',
'(requires internet access)': '(requer acesso a internet)',
'(something like "it-it")': '(algo como "it-it")',
'A new version of web2py is available': 'Está disponível uma nova versão do web2py',
'A new version of web2py is available: %s': 'Está disponível uma nova versão do web2py: %s',
'ATTENTION: Login requires a secure (HTTPS) connection or running on localhost.': 'ATENÇÃO o login requer uma conexão segura (HTTPS) ou executar de localhost.',
'ATTENTION: TESTING IS NOT THREAD SAFE SO DO NOT PERFORM MULTIPLE TESTS CONCURRENTLY.': 'ATENÇÃO OS TESTES NÃO THREAD SAFE, NÃO EFETUE MÚLTIPLOS TESTES AO MESMO TEMPO.',
'ATTENTION: you cannot edit the running application!': 'ATENÇÃO: Não pode modificar a aplicação em execução!',
'About': 'Sobre',
'About application': 'Sobre a aplicação',
'Additional code for your application': 'Additional code for your application',
'Admin is disabled because insecure channel': 'Admin desabilitado pois o canal não é seguro',
'Admin is disabled because unsecure channel': 'Admin desabilitado pois o canal não é seguro',
'Admin language': 'Linguagem do Admin',
'Administrator Password:': 'Senha de administrador:',
'Application name:': 'Nome da aplicação:',
'Are you sure you want to delete file "%s"?': 'Tem certeza que deseja apagar o arquivo "%s"?',
'Are you sure you want to delete plugin "%s"?': 'Tem certeza que deseja apagar o plugin "%s"?',
'Are you sure you want to uninstall application "%s"': 'Tem certeza que deseja apagar a aplicação "%s"?',
'Are you sure you want to uninstall application "%s"?': 'Tem certeza que deseja apagar a aplicação "%s"?',
'Are you sure you want to upgrade web2py now?': 'Tem certeza que deseja atualizar o web2py agora?',
'Available databases and tables': 'Bancos de dados e tabelas disponíveis',
'Cannot be empty': 'Não pode ser vazio',
'Cannot compile: there are errors in your app.Debug it, correct errors and try again.': 'Não é possível compilar: Existem erros em sua aplicação.   Depure, corrija os errros e tente novamente',
'Cannot compile: there are errors in your app:': 'Não é possível compilar: Existem erros em sua aplicação',
'Change Password': 'Trocar Senha',
'Check to delete': 'Marque para apagar',
'Checking for upgrades...': 'Buscando atualizações...',
'Click row to expand traceback': 'Clique em uma coluna para expandir o log do erro',
'Client IP': 'IP do cliente',
'Controllers': 'Controladores',
'Count': 'Contagem',
'Create new application using the Wizard': 'Criar nova aplicação utilizando o assistente',
'Create new simple application': 'Crie uma nova aplicação',
'Current request': 'Requisição atual',
'Current response': 'Resposta atual',
'Current session': 'Sessão atual',
'DESIGN': 'Projeto',
'Date and Time': 'Data e Hora',
'Delete': 'Apague',
'Delete:': 'Apague:',
'Deploy on Google App Engine': 'Publicar no Google App Engine',
'Description': 'Descrição',
'Design for': 'Projeto de',
'Detailed traceback description': 'Detailed traceback description',
'E-mail': 'E-mail',
'EDIT': 'EDITAR',
'Edit Profile': 'Editar Perfil',
'Edit application': 'Editar aplicação',
'Edit current record': 'Editar o registro atual',
'Editing Language file': 'Editando arquivo de linguagem',
'Editing file': 'Editando arquivo',
'Editing file "%s"': 'Editando arquivo "%s"',
'Enterprise Web Framework': 'Framework web empresarial',
'Error': 'Erro',
'Error logs for "%(app)s"': 'Logs de erro para "%(app)s"',
'Error snapshot': 'Error snapshot',
'Error ticket': 'Error ticket',
'Exception instance attributes': 'Atributos da instancia de excessão',
'File': 'Arquivo',
'First name': 'Nome',
'Frames': 'Frames',
'Functions with no doctests will result in [passed] tests.': 'Funções sem doctests resultarão em testes [aceitos].',
'Group ID': 'ID do Grupo',
'Hello World': 'Olá Mundo',
'If the report above contains a ticket number it indicates a failure in executing the controller, before any attempt to execute the do

[web2py] Re: web2py 1.89.1 is OUT

2010-11-12 Thread DJ
Love the file search function! Nice work!

-S

On Nov 12, 12:09 pm, appydev  wrote:
> Really beautiful!


Re: [web2py] Re: web2py 1.89.1 is OUT

2010-11-12 Thread Bruno Rocha
Great!

each day I like web2py more!

2010/11/12 mdipierro 

> Congratulations to all those how contributed (whose names are in the
> hg logs) because this is a beautiful version.
>
> If your name is not mentioned in the who.html page and you think it
> should be please assume this is an oversight on my site (I try to keep
> track but I can do mistakes) so please do not be shy and email me.
>
> Massimo
>
> On Nov 12, 9:22 am, mdipierro  wrote:
> > Please give it a try and report any bug.
> >
> > 1.89.1
> > - new admin layout (thanks Branko Vukelic)
> > - new admin search
> > - new admin language selector (thanks Yair)
> > - new Welcome app (thanks Martin Mulone)
> > - beter wizard
> > - admin support for DEMO_MODE=True
> > - admin exposes GAE deployment button (always)
> > - MENU support None links (thanks Michael Wolfe)
> > - web2py.py -J for running cron (thanks Jonathan Lundell)
> > - fixed ~db.table.id on GAE (thanks MicLee)
> > - service.jsonrpc supports service.JsonRpcException (thanks Matt)
> > - many small bug fixes.
>



-- 

http://rochacbruno.com.br


[web2py] serving subdomain hosted outside web2py application

2010-11-12 Thread vaibhav
Hi,

I have a web2py application which have a link in it's index.html which
is something like this

http://blog.example.com";>blog

the application is itself hosted in http://example.com,

the subdomain is external application which maps to a blog hosted by
blogger.com, I figured there should be a simple way to handle this but
couldn't find a solution, could you help me out.

Thanks and regards
Vaibhav Mishra


[web2py] Re: DAL() unusable ?

2010-11-12 Thread Mirek Zvolský
> Is there a reason for not sticking the record creation inside of its own
> table?

Hi Tadeus,
This is just an example. I have used it to show Massimo and others,
that the simplest part of CRM application model, if you change
"created_by" from type "string" to type "reference..", then there is
no possibility of proper order of both tables in the model.

Of course, data can be arranged in lot of other ways.

If you think, that this example is wrong, maybe I should try find
other one? I will think about it. Problem is, that usually you find
such relation cycles in database schema, when the project is little
complex, lets say, if you work with 8, 10, 15 tables. Example from CRM
was pretty simple.

I just want to show, that I see the problem in the fact, that if you
change order of table definitions, you can make the same model legal
or illegal. I think this is really wrong.

If you think, that you can design every complex database model without
to have a circle of relations somewhere, I don't believe you are true.
If I'm true, web2py should be changed to obtain no error, when foreign
key is defined earlier as the target table.
If you are true, web2py should be changed to catch such error in the
model in all cases, not only if order of table definitions is
specific.
Mirek


Re: [web2py] Re: DAL() unusable ?

2010-11-12 Thread Mariano Reingart
2010/11/12 Mirek Zvolský :
>>> Mariano Reingart
>
> Thanks for your response and practical experience with large system.
>
> I think the problem is clear:
> In current web2py philosophy the same data model becames valid or
> invalid based on the order of table definition commands. And if a
> model is complex, then there is no possibility how to make it valid/
> acceptable for web2py.

Yes, you can make any model valid to web2py, as Massimo said, just
don't use reference, use 'integer' as field type and IS_IN_DB
validator to change widgets and do lookups.

Foreign key constraints can be created and will be enforced at
database level, so basic migration and most things in web2py should
work the same.

> So as long this situation will continue, so long there will be block
> for more complex projects. The problem will come back again and again.
> It will be nice, if Massimo(?) could redesign this soon in such way:
> first create tables/fields in the db object, second turn on
> constraints in cycle over all tables and over all their foreign keys.

Or, may be not, for complex project we may include separate scripts to
do migrations and fixtures.

> Of course for large projects there will be a problem of too many
> tables and slow execution, especially when structures changes.
>>> Massimo Di Pierro:
>>> there is a problem if too many tables are in scope. We need to create
>>> a mechanisn for conditionally executing models based on the called
>>> action. Perhaps give models a subfolder structure like in views.
>
> Maybe this Massimo's idea is good. There should be always one model
> (default=db.py) with full database definition, and just this model
> would support structure migrations. In simple projects we could use
> this model (same situation as today for all web2py projects), in large
> projects subfolder models can be defined, which are smaller sub-sets
> of the whole model - they would not support migration, but they just
> will (together with controller) prepare data for specific view.

I don't think so.
Subfolder will add more complexity, further directories scan (with
performance penalities), and will make references, migrations and
fixtures even harder, fragmentating the model, etc.

> However, I don't know, if such system change in web2py would be good.
> Because who need such something to speed up his model, he can test
> request.controller and request.function in model and he can
> conditional call what he need.

I agree with this, advanced project will find the way (as an example,
I did it for the ERP, redefining the definition order and solving
other minor issues)

I think web2py should remain easy for begginers and most use cases,
and should allow complex ones to be possible, as now.

Regards,

Mariano Reingart
http://www.sistemasagiles.com.ar
http://reingart.blogspot.com


Re: [web2py] Re: DAL() unusable ?

2010-11-12 Thread Branko Vukelic
2010/11/12 Mirek Zvolský :
> That's not the case of
> http://zvolsky.alwaysdata.net/crm2.jpg

DISCLAIMER: I'm not experienced with large-scale database designs.

Now that I've gotten that out of the way...

What's the meaning of 'created_by' in this set-up? If it's meant to be
taken as 'record created by user' than I don't see any reason why this
'user' must be in the 'person' table. Person as a concept is not the
same as the system user, and hence it's more logical to have a
separate table for system users that may or may not be a person in the
'person' sense, but is definitely a 'user' that can create records.

Person -> can belong to -> Company
Person -> is also a -> User
User -> can create a -> Person (that is not necessarily the same
person as the user)
User -> can create a -> Company

So we have this:

Person.created_by -> User.id (User that created this person)
Person.user_id -> User.id (in plain English: has an account on this system)
Company.created_by -> User.id

In other words, we make a distinction between a real-world person, and
a system account.

Note that I'm not talking about how DAL works. I'm talking about how
the data is modelled in this particular case.


-- 
Branko Vukelić

bg.bra...@gmail.com
stu...@brankovukelic.com

Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny

Gimp Brushmakers Guild
http://bit.ly/gbg-group


Re: [web2py] Re: web2py 1.89.1 is OUT

2010-11-12 Thread Albert Abril
new admin, new welcome, and gae deploy button are, wizard... each day
prettier and easier.
thanks to you, the community.

On Fri, Nov 12, 2010 at 7:04 PM, Bruno Rocha  wrote:

> Great!
>
> each day I like web2py more!
>
> 2010/11/12 mdipierro 
>
> Congratulations to all those how contributed (whose names are in the
>> hg logs) because this is a beautiful version.
>>
>> If your name is not mentioned in the who.html page and you think it
>> should be please assume this is an oversight on my site (I try to keep
>> track but I can do mistakes) so please do not be shy and email me.
>>
>> Massimo
>>
>> On Nov 12, 9:22 am, mdipierro  wrote:
>> > Please give it a try and report any bug.
>> >
>> > 1.89.1
>> > - new admin layout (thanks Branko Vukelic)
>> > - new admin search
>> > - new admin language selector (thanks Yair)
>> > - new Welcome app (thanks Martin Mulone)
>> > - beter wizard
>> > - admin support for DEMO_MODE=True
>> > - admin exposes GAE deployment button (always)
>> > - MENU support None links (thanks Michael Wolfe)
>> > - web2py.py -J for running cron (thanks Jonathan Lundell)
>> > - fixed ~db.table.id on GAE (thanks MicLee)
>> > - service.jsonrpc supports service.JsonRpcException (thanks Matt)
>> > - many small bug fixes.
>>
>
>
>
> --
>
> http://rochacbruno.com.br
>


Re: [web2py] Re: How do I construct my query to handle a multiple select?

2010-11-12 Thread Lorin Rivers
Massimo,

Thanks, that works great!

What do I do to get it to only run on submit instead of load?

BTW, one of the things that's most awesome about web2py is your activity on the 
list and how helpful you are. I for one really appreciate that!

On Nov 12, 2010, at 10:12 , mdipierro wrote:

>  options=[str(my_macaddr[i].MacAddr) for i in range(len(my_macaddr))]
> 
> form=SQLFORM.factory(Field('macs',requires=IS_IN_SET(options,multiple='multiple')))
> 
> dbset=db4((db4.data_table.ReqTime>='2010-11-08T21:00')&(db4.data_table.ReqTime<='2010-11-08T22:00'))
>  if form.accepts(request) and form.vars.macs:
> query = reduce(lambda a,b:a|b,[db4.data_table.MacAddr==x for x in
> form.vars.macs])
> dbset=dbset(query)
>  records =
> dbset.select(db4.data_table.MacAddr,db4.data_table.ReqTime,db4.data_table.Po)
> 

-- 
Lorin Rivers
Mosasaur: Killer Technical Marketing 

512/203.3198 (m)




[web2py] Re: web2py 1.89.1 is OUT

2010-11-12 Thread ra3don
This is a fantastic update. web2py has been improving very quickly.
Love the new web2py website, love the new admin look!

Great work everybody!

On Nov 12, 9:22 am, mdipierro  wrote:
> Please give it a try and report any bug.
>
> 1.89.1
> - new admin layout (thanks Branko Vukelic)
> - new admin search
> - new admin language selector (thanks Yair)
> - new Welcome app (thanks Martin Mulone)
> - beter wizard
> - admin support for DEMO_MODE=True
> - admin exposes GAE deployment button (always)
> - MENU support None links (thanks Michael Wolfe)
> - web2py.py -J for running cron (thanks Jonathan Lundell)
> - fixed ~db.table.id on GAE (thanks MicLee)
> - service.jsonrpc supports service.JsonRpcException (thanks Matt)
> - many small bug fixes.


[web2py] Re: Clockpick

2010-11-12 Thread villas
Hi All,

The latest upgrade seems to have broken Clockpick.  The times now
appear in the top teft corner of the screen instead of adjacent to the
input.  I've played around with it,  but I couldn't see what's wrong.
To test it,  just add a DB table to the Welcome app containing a time
field and then look at it in AppAdmin.

Finally, I know I've mentioned it before,  but could we please have
the latest version included in calendar.js.  Massimo believes he's
updated it (see above), but I believe we somehow have the old version
again in truck.

-D


[web2py] Welcome not translate any more...

2010-11-12 Thread Richard Vézina
Hello,

I observed that the "Welcome" in the navbar not translate anymore.

I try to solve by adding a T() at line 1051 of tool.py, but it didn't works.

Richard


[web2py] Re: Clockpick

2010-11-12 Thread winti
for me as well, since 1.89.1 clockpick appears as villas describes.

On Nov 12, 9:23 pm, villas  wrote:
> Hi All,
>
> The latest upgrade seems to have broken Clockpick.  The times now
> appear in the top teft corner of the screen instead of adjacent to the
> input.  I've played around with it,  but I couldn't see what's wrong.
> To test it,  just add a DB table to the Welcome app containing a time
> field and then look at it in AppAdmin.
>
> Finally, I know I've mentioned it before,  but could we please have
> the latest version included in calendar.js.  Massimo believes he's
> updated it (see above), but I believe we somehow have the old version
> again in truck.
>
> -D


[web2py] Field update attribute broken?

2010-11-12 Thread baloan
Hi,

I have defined a table:

username = auth.user and auth.user.username

db.define_table('email',
Field('email', 'string', length=40, notnull=False,
unique=True, represent=lambda s: s),
Field('active', 'boolean', default=True),
Field('expires', 'date', default=None,
represent=lambda s: s or 'Never'),
Field('create_user', 'string', default=username,
writable=False),
Field('create_date', 'datetime', default=request.now,
writable=False),
Field('change_user', 'string', update=username,
writable=False),
Field('change_date', 'datetime', update=request.now,
writable=False),
)

and get the following form on crud.create():

Email:  []
Active: [x]
Expires:[]
Create User:baloan
Create Date:2010-11-12 21:53:58
Change User:baloan
Change Date:2010-11-12 21:53:58
[Submit]

Though not specified by using 'default', change user/date is filled
with username and request.now. It doesn't change if I use
default=None.

Is there any way to leave Change User/Date empty with crud.create?
Maybe I have a database table synchronisation problem? Where is
default/update information kept?

Regards, Andreas


Re: [web2py] web2py 1.89.1 is OUT... update?

2010-11-12 Thread Andrew Thompson

On 11/12/2010 10:22 AM, mdipierro wrote:

Please give it a try and report any bug.

1.89.1
- new admin layout (thanks Branko Vukelic)
- new admin search
- new admin language selector (thanks Yair)
- new Welcome app (thanks Martin Mulone)


I've been recently just updating with the link in the admin console. 
Will this update the admin and welcome apps?


If not, how do I best migrate to the new version?

--
Andrew Thompson
http://aktzero.com/



[web2py] Re: web2py 1.89.1 is OUT

2010-11-12 Thread dspiteself
there was a problem loading my static files in the designer

I would push it but our project uses git here is a patch.
/***
fix web2py bug when static path matches

ex:
filepath =/test/dojox
path = /test/dojo

passes '/'.join(file_path).startswith('/'.join(path))
invalid index exception thrown by path.append(file_path[len(path)])
len(path):2
len(filepath):

***/




diff --git a/src/applications/admin/views/default/design.html b/src/
applications/admin/views/default/design.html
index f50093e..afbc996 100644
--- a/src/applications/admin/views/default/design.html
+++ b/src/applications/admin/views/default/design.html
@@ -203,8 +203,8 @@ for c in controllers: controller_functions
+=[c[:-3]+'/%s.html'%x for x in functi
   items=file.split('/')
   file_path=items[:-1]
   filename=items[-1]
-  while path!=file_path:
-  if '/'.join(file_path).startswith('/'.join(path)):
+  while path!=file_path:
+  if len(file_path)>= len(path) and all([ v==file_path[k] for
k,v in enumerate(path)]):
   path.append(file_path[len(path)])
   thispath='static__'+'__'.join(path)
 }}





On Nov 12, 9:22 am, mdipierro  wrote:
> Please give it a try and report any bug.
>
> 1.89.1
> - new admin layout (thanks Branko Vukelic)
> - new admin search
> - new admin language selector (thanks Yair)
> - new Welcome app (thanks Martin Mulone)
> - beter wizard
> - admin support for DEMO_MODE=True
> - admin exposes GAE deployment button (always)
> - MENU support None links (thanks Michael Wolfe)
> - web2py.py -J for running cron (thanks Jonathan Lundell)
> - fixed ~db.table.id on GAE (thanks MicLee)
> - service.jsonrpc supports service.JsonRpcException (thanks Matt)
> - many small bug fixes.


[web2py] Re: web2py 1.89.1 is OUT

2010-11-12 Thread Anthony
This looks great! Amazing work, everyone.

The language selection in admin isn't working for me in IE on Windows
(works fine in FF). When I select a language other than en, it does
reload the page, but the language remains in English (and en remains
selected in the drop-down).

Also, I'm still having this odd problem loading more than one web2py
app in separate browser tabs/windows. If I have an app loaded in one
tab, when I try to load another app in a separate tab, it will often
hang for a long time before loading (maybe a couple minutes), even
though the first app is fully loaded and not waiting for anything.
It's not a problem if I load multiple apps into the same tab one at a
time (each loads almost instantly). Mainly a problem in IE (I think I
noticed it once in FF, but it seems to happen very consistently in
IE). Anyone else ever see anything like this? (Note, this is not a new
issue -- was happening before this release.)

Thanks.

Anthony

On Nov 12, 10:22 am, mdipierro  wrote:
> Please give it a try and report any bug.
>
> 1.89.1
> - new admin layout (thanks Branko Vukelic)
> - new admin search
> - new admin language selector (thanks Yair)
> - new Welcome app (thanks Martin Mulone)
> - beter wizard
> - admin support for DEMO_MODE=True
> - admin exposes GAE deployment button (always)
> - MENU support None links (thanks Michael Wolfe)
> - web2py.py -J for running cron (thanks Jonathan Lundell)
> - fixed ~db.table.id on GAE (thanks MicLee)
> - service.jsonrpc supports service.JsonRpcException (thanks Matt)
> - many small bug fixes.


[web2py] postgresql error ... (relation "auth_user" already exists)

2010-11-12 Thread Carlos
Hi,

I'm getting the following error in my local installation with
postgresql when using auth.define_tables(migrate=True):

(relation "auth_user" already
exists)

web2py™ Version 1.89.1 (2010-11-12 15:14:36)
Python  Python 2.6.4: C:\Python26\python.exe

Traceback (most recent call last):
  File "C:\web2py\gluon\restricted.py", line 188, in restricted
exec ccode in environment
  File "C:/web2py/applications/test/models/model.py", line 38, in

auth.define_tables(migrate=True)
  File "C:\web2py\gluon\tools.py", line 1163, in define_tables
format='%(first_name)s %(last_name)s (%(id)s)')
  File "C:\web2py\gluon\sql.py", line 1371, in define_table
t._create(migrate=migrate, fake_migrate=fake_migrate)
  File "C:\web2py\gluon\sql.py", line 1823, in _create
self._db._execute(query)
  File "C:\web2py\gluon\sql.py", line 1026, in 
self._execute = lambda *a, **b: self._cursor.execute(*a, **b)
ProgrammingError: relation "auth_user" already exists

Any ideas what could be wrong?.

Thanks,

   Carlos


[web2py] Re: Pyodbc error with web2py under Apache and mod_wsgi

2010-11-12 Thread azarkowsky
A few more days of debug yielded a rather simple solution in the end.
Compiling pyodbc with mingw32 was actually the correct answer.  I had
tried building pyodbc on a different system and then just copying over
the *.pyd & *.egg-info.  That's not good enough.  You have to actually
install mingw on the system running web2py / mod_wsgi and then make
sure to reboot. I'm now up and running though and can get back to
writing Python code!

BTW, the new admin look in 1.89.1 is very nice!  Keep up the good
work!

--Adam

On Nov 10, 5:36 pm, azarkowsky  wrote:
> I just wanted to add that my new build of pyodbc using MinGW32 didn't
> seem to work either.  I removed pyodbc from my Python site-packages
> folder and after installing MingW and adding it to my PATH in the
> pyodbc source folder I ran 'python setup.py build -c mingw32' followed
> by 'python setup.py install'.  This seemed to yield the same result: I
> can import pyodbc fine as long as I'm not running through mod_wsgi.
>
> Dependency Walker states it is having trouble resolving several
> libraries (MSVCR90.DLL, GPSVC.DLL, IESHIMS.DLL & LINKINFO.DLL) when I
> open c:\python\lib\site-packages\PYODBC.PYD although I saw reference
> to Dependency Walker erroneously reporting missing DLLs due to
> something related to SideBySide Assembly.
>
> Since DLLs and pretty far out of my realm of expertise and web2py
> works quite well without mod_wsgi I may take another look at
> mod_proxy.  Is it OK to use the built-in Rocket web server in a
> production environment?  The only reference I saw to this in the
> web2py book was that it's just not terribly configurable.  Would there
> be any other reasons against it?
>
> Thanks,
> Adam
>
> On Nov 10, 1:37 pm, azarkowsky  wrote:
>
>
>
>
>
>
>
> > Hi Massimo,
>
> > Thanks for your prompt response.  That was my first thought as well.
> > The system I'm working on though is a pretty fresh build and searching
> > the file system for 'site-packages' I only find results (as expected)
> > within web2py and in my python installation folder, 'C:\python'.  So
> > unless modwsgi (or some other installed software) ships with a copy of
> > python I think it's using the correct version.
>
> > I see in the Apache error.log file when starting Apache the following
> > message:
> > [Tue Nov 09 18:25:58 2010] [notice] Apache/2.2.17 (Win32) mod_ssl/
> > 2.2.17 OpenSSL/0.9.8o mod_wsgi/3.3 Python/2.7 configured -- resuming
> > normal operations
>
> > Python 2.7 is what I installed, but I'm not sure how to have modwsgi
> > verify the path to the specific python interpreter that it's using.  I
> > added a few lines of debug in gluon.sql.py:
> > sys.path returns:
> > [Tue Nov 09 18:26:01 2010] [error] ['', 'C:web2pysite-
> > packages', 'C:web2py', 'C:Windowssystem32\\\
> > \python27.zip', 'C:PythonLib', 'C:PythonDLLs', 'C:\\\
> > \PythonLiblib-tk', 'C:Program Files (x86)Apache
> > Software FoundationApache2.2', 'C:Program Files (x86)\\\
> > \Apache Software FoundationApache2.2bin', 'C:Python', 'C:\\
> > \\Pythonlibsite-packages', '../gluon']
>
> > Also, I printed the stack trace after it throws the exception trying
> > to load pyodbc:
> > [Tue Nov 09 18:26:01 2010] [error] Traceback (most recent call last):
> > [Tue Nov 09 18:26:01 2010] [error]   File "C:\\web2py\\gluon\\sql.py",
> > line 95, in 
> > [Tue Nov 09 18:26:01 2010] [error]     import pyodbc
> > [Tue Nov 09 18:26:01 2010] [error] ImportError: DLL load failed: The
> > specified module could not be found.
>
> > I did find a post regarding DLLs failing to load under mod_wsgi
> > (http://groups.google.com/group/modwsgi/browse_thread/thread/
> > 013b4a5faa962d77/107d04edc473d732?#107d04edc473d732) where the
> > solution seemed to be using MinGWto compile psycopg2.  Since I used
> > the "Windows Installer" version of pyodbc, I may go back and try to
> > build pyodbc following these steps as well.
>
> > I'm also wondering if this could be related to either a windows or
> > Apache security issue since pyodbc works with web2py directly
> > (bypassing Apache/mod_wsgi).  I'll work on building a fresh pyodbc on
> > my system with MinGW, but if any of this additional info leads to any
> > other suggestions I'm all ears, since I'm largely guessing at this
> > point!  :)
>
> > Thanks,
> > Adam
>
> > On Nov 9, 10:35 pm, mdipierro  wrote:
>
> > > you may have different python versions installed. Check the one used
> > > by modwsgi
>
> > > On Nov 9, 3:02 pm, azarkowsky  wrote:
>
> > > > Hi,
>
> > > > I'm relatively new to web2py and am attempting to set up my production
> > > > environment for the first time.  I'm running Apache2.2 with mod_wsgi,
> > > > python 2.7, & web2py 1.88.2 on Win XP SP3.  If I run web2py without
> > > > Apache by running:  'python web2py.py -a "" -i 127.0.0.1 -p
> > > > 8000' I can access both my application and the admin interface without
> > > > any problems.  Once I try to access my site running be

[web2py] Re: How do I construct my query to handle a multiple select?

2010-11-12 Thread mdipierro
options=[str(my_macaddr[i].MacAddr) for i in range(len(my_macaddr))]
form=SQLFORM.factory(Field('macs',requires=IS_IN_SET(options,multiple='multiple')))
if form.accepts(request):
 
dbset=db4((db4.data_table.ReqTime>='2010-11-08T21:00')&(db4.data_table.ReqTime<='2010-11-08T22:00'))

 if form.vars.macs:
 query = reduce(lambda a,b:a|b,[db4.data_table.MacAddr==x for
x in
form.vars.macs])
 dbset=dbset(query)
 records =
dbset.select(db4.data_table.MacAddr,db4.data_table.ReqTime,db4.data_table.Po)
else: records=[]

On Nov 12, 1:43 pm, Lorin Rivers  wrote:
> Massimo,
>
> Thanks, that works great!
>
> What do I do to get it to only run on submit instead of load?
>
> BTW, one of the things that's most awesome about web2py is your activity on 
> the list and how helpful you are. I for one really appreciate that!
>
> On Nov 12, 2010, at 10:12 , mdipierro wrote:
>
> >  options=[str(my_macaddr[i].MacAddr) for i in range(len(my_macaddr))]
>
> > form=SQLFORM.factory(Field('macs',requires=IS_IN_SET(options,multiple='multiple')))
>
> > dbset=db4((db4.data_table.ReqTime>='2010-11-08T21:00')&(db4.data_table.ReqTime<='2010-11-08T22:00'))
> >  if form.accepts(request) and form.vars.macs:
> >     query = reduce(lambda a,b:a|b,[db4.data_table.MacAddr==x for x in
> > form.vars.macs])
> >     dbset=dbset(query)
> >  records =
> > dbset.select(db4.data_table.MacAddr,db4.data_table.ReqTime,db4.data_table.Po)
>
> --
> Lorin Rivers
> Mosasaur: Killer Technical Marketing 
> 
> 512/203.3198 (m)


[web2py] Re: Field update attribute broken?

2010-11-12 Thread mdipierro
In the latest version 1.89.1 ti does what you say if you set
default=None

On Nov 12, 3:10 pm, baloan  wrote:
> Hi,
>
> I have defined a table:
>
> username = auth.user and auth.user.username
>
> db.define_table('email',
>                 Field('email', 'string', length=40, notnull=False,
> unique=True, represent=lambda s: s),
>                 Field('active', 'boolean', default=True),
>                 Field('expires', 'date', default=None,
> represent=lambda s: s or 'Never'),
>                 Field('create_user', 'string', default=username,
> writable=False),
>                 Field('create_date', 'datetime', default=request.now,
> writable=False),
>                 Field('change_user', 'string', update=username,
> writable=False),
>                 Field('change_date', 'datetime', update=request.now,
> writable=False),
>                 )
>
> and get the following form on crud.create():
>
> Email:          []
> Active:                 [x]
> Expires:                []
> Create User:    baloan
> Create Date:    2010-11-12 21:53:58
> Change User:    baloan
> Change Date:    2010-11-12 21:53:58
> [Submit]
>
> Though not specified by using 'default', change user/date is filled
> with username and request.now. It doesn't change if I use
> default=None.
>
> Is there any way to leave Change User/Date empty with crud.create?
> Maybe I have a database table synchronisation problem? Where is
> default/update information kept?
>
> Regards, Andreas


[web2py] Re: web2py 1.89.1 is OUT... update?

2010-11-12 Thread mdipierro
yes

On Nov 12, 3:11 pm, Andrew Thompson  wrote:
> On 11/12/2010 10:22 AM, mdipierro wrote:
>
> > Please give it a try and report any bug.
>
> > 1.89.1
> > - new admin layout (thanks Branko Vukelic)
> > - new admin search
> > - new admin language selector (thanks Yair)
> > - new Welcome app (thanks Martin Mulone)
>
> I've been recently just updating with the link in the admin console.
> Will this update the admin and welcome apps?
>
> If not, how do I best migrate to the new version?
>
> --
> Andrew Thompsonhttp://aktzero.com/


[web2py] Re: User Login/Logout authentication event

2010-11-12 Thread Alex
Excellent!  Thanks!

On Nov 12, 11:51 am, mdipierro  wrote:
> auth.settings.login_onaccept=lambda form: do_something(form)
>
> same with logout, etc.
>
> On Nov 12, 11:50 am, Alex  wrote:
>
>
>
> > Hello,
>
> > I have a question regarding authentication.  I would like to find a
> > way to do certain events (ie.  store stuff in the cache, update a last
> > login time in the DB, etc.) when a user logs in and logs out.
>
> > I'm currently just using the built in "auth" object and was wondering
> > if there was a simple way I could do this?  Would I need to override
> > something like the login/logout commands the auth exposes?  If so, is
> > there a reference on how to do this?
>
> > Thanks!- Hide quoted text -
>
> - Show quoted text -


[web2py] Re: web2py 1.89.1 is OUT... update?

2010-11-12 Thread mdipierro
ps. may not work on windows

On Nov 12, 3:11 pm, Andrew Thompson  wrote:
> On 11/12/2010 10:22 AM, mdipierro wrote:
>
> > Please give it a try and report any bug.
>
> > 1.89.1
> > - new admin layout (thanks Branko Vukelic)
> > - new admin search
> > - new admin language selector (thanks Yair)
> > - new Welcome app (thanks Martin Mulone)
>
> I've been recently just updating with the link in the admin console.
> Will this update the admin and welcome apps?
>
> If not, how do I best migrate to the new version?
>
> --
> Andrew Thompsonhttp://aktzero.com/


[web2py] Cookie stealing attack

2010-11-12 Thread guruyaya
I've inspected web2py cookies, and I think I'm on to a problem.
Say, I'm going into a public internet cafe. I'm getting into a web2py
websute, that use the default auth. I'm looking at the cookie data,
saving it
then, I'm sitting in the next chair, and some other guy goes to the
same website, and logs in. At this point - the cookie didn't change.
And as we're both behind firewall, we also have the same IP,so I can
easly implant the logged in session, into my browser, and do horrible,
and unspeakable things on his behalf.
Is there a way to force new session, once a use is logged in? This
way, I can be sure no cookie is stolen.

Yair


[web2py] bug in the book or in the code? linkedin instruction

2010-11-12 Thread Kuba Kucharski
Hi, long time no see, guys

I did exact thing like in the book

from gluon.contrib.login_methods.linkedin_account import LinkedInAccount
auth.settings.login_form=LinkedInAccount(request,KEY,SECRET,RETURN_URL)
(yeap I had inserted key etc, and yes, I haven't sent it in my ticket
to all the public, I've obscured it;)

I am getting 'module' object has no attribute 'LinkedIn'


Traceback (most recent call last):
  File "/home/www-data/web2py/gluon/restricted.py", line 188, in restricted
exec ccode in environment
  File "/home/www-data/web2py/applications/opennect/models/db.py",
line 86, in 

auth.settings.login_form=LinkedInAccount(request,"ds8kktgqgQLHXxbAHew5owhRSHbGsdvek9tgfS28-XTGhi","WjhUsdTD4gq-efdsD59XcnVlIVAi_hHZd1CICfTqbdK3EiaTrUo","http://dev.xxx.com/";)
  File "/home/www-data/web2py/gluon/contrib/login_methods/linkedin_account.py",
line 33, in __init__
self.api = linkedin.LinkedIn(key,secret,return_url)
AttributeError: 'module' object has no attribute 'LinkedIn'


I tried from application shell
import linkedin
api = linkedin.LinkedIn(..)

and in console this part of the linkedin_account.py works

am I missing smth?
I've tested on 1.87.x and the newest stable
python-linkedin is 1.5
-- 
Kuba


[web2py] Error when using new wizard

2010-11-12 Thread Kenneth Lundström
Just installed the newest version of web2py (1.89.1) and tested the 
wizard to create a new appl.


I came to step 6 when I got a error.

Version
web2py™ Version 1.89.1 (2010-11-12 15:14:36)
Python
Traceback

Traceback (most recent call last):
File "/data/domains/web2py/gluon/restricted.py", line 188, in restricted
exec ccode in environment
File "/data/domains/web2py/applications/admin/controllers/wizard.py", 
line 571, in ?

File "/data/domains/web2py/gluon/globals.py", line 96, in 
self._caller = lambda f: f()
File "/data/domains/web2py/applications/admin/controllers/wizard.py", 
line 200, in step6

create(form.vars)
File "/data/domains/web2py/applications/admin/controllers/wizard.py", 
line 488, in create

file=open(meta,'wb')
IOError: [Errno 2] No such file or directory: 
'/data/domains/web2py/applications/admin/../Boatintra/wizard.metadata'


What more info do you need to find the error?


Kenneth



[web2py] Re: Cookie stealing attack

2010-11-12 Thread mdipierro
There are two things you can do.

1) session.secure() # will force session over https
2) call auth.logout() to delete all auth information from the session
(this will not change the session cookie)
3)
auth.settings.logout_onlogout=lambda user:
os.unlink(response.session_filename)

This will delete the session and will force a new session cookie next
request.

On Nov 12, 4:42 pm, guruyaya  wrote:
> I've inspected web2py cookies, and I think I'm on to a problem.
> Say, I'm going into a public internet cafe. I'm getting into a web2py
> websute, that use the default auth. I'm looking at the cookie data,
> saving it
> then, I'm sitting in the next chair, and some other guy goes to the
> same website, and logs in. At this point - the cookie didn't change.
> And as we're both behind firewall, we also have the same IP,so I can
> easly implant the logged in session, into my browser, and do horrible,
> and unspeakable things on his behalf.
> Is there a way to force new session, once a use is logged in? This
> way, I can be sure no cookie is stolen.
>
> Yair


[web2py] Re: Error when using new wizard

2010-11-12 Thread mdipierro
Can you check if this folder was created?

/data/domains/web2py/applications/Boatintra

if not it is a file permission issue. What os? was it a binary
distribution of web2py?



On Nov 12, 5:30 pm, Kenneth Lundström 
wrote:
> Just installed the newest version of web2py (1.89.1) and tested the
> wizard to create a new appl.
>
> I came to step 6 when I got a error.
>
> Version
> web2py Version 1.89.1 (2010-11-12 15:14:36)
> Python
> Traceback
>
> Traceback (most recent call last):
> File "/data/domains/web2py/gluon/restricted.py", line 188, in restricted
> exec ccode in environment
> File "/data/domains/web2py/applications/admin/controllers/wizard.py",
> line 571, in ?
> File "/data/domains/web2py/gluon/globals.py", line 96, in 
> self._caller = lambda f: f()
> File "/data/domains/web2py/applications/admin/controllers/wizard.py",
> line 200, in step6
> create(form.vars)
> File "/data/domains/web2py/applications/admin/controllers/wizard.py",
> line 488, in create
> file=open(meta,'wb')
> IOError: [Errno 2] No such file or directory:
> '/data/domains/web2py/applications/admin/../Boatintra/wizard.metadata'
>
> What more info do you need to find the error?
>
> Kenneth


Re: [web2py] Re: Error when using new wizard

2010-11-12 Thread Kenneth Lundström

> Can you check if this folder was created?
>  /data/domains/web2py/applications/Boatintra

No it was not created.

> if not it is a file permission issue. What os? was it a binary 
distribution of web2py?


Linux, source. All files permissions apache:web2py. I tried to change 
file permissions of the applications directory to 777 but no luck.



Kenneth




On Nov 12, 5:30 pm, Kenneth Lundström
wrote:

Just installed the newest version of web2py (1.89.1) and tested the
wizard to create a new appl.

I came to step 6 when I got a error.

Version
web2py Version 1.89.1 (2010-11-12 15:14:36)
Python
Traceback

Traceback (most recent call last):
File "/data/domains/web2py/gluon/restricted.py", line 188, in restricted
exec ccode in environment
File "/data/domains/web2py/applications/admin/controllers/wizard.py",
line 571, in ?
File "/data/domains/web2py/gluon/globals.py", line 96, in
self._caller = lambda f: f()
File "/data/domains/web2py/applications/admin/controllers/wizard.py",
line 200, in step6
create(form.vars)
File "/data/domains/web2py/applications/admin/controllers/wizard.py",
line 488, in create
file=open(meta,'wb')
IOError: [Errno 2] No such file or directory:
'/data/domains/web2py/applications/admin/../Boatintra/wizard.metadata'

What more info do you need to find the error?

Kenneth




[web2py] Re: Creating debug.html

2010-11-12 Thread cjrh
On Nov 12, 2:14 pm, demetrio  wrote:
> I hope you find this something useful.

Thank you.


[web2py] Translations within the URL method

2010-11-12 Thread Branko Vukelic
I'm using the URL method as a src attribute for an image like so:

IMG(_src=URL('static', 'images/someimage.jpg'))

This image contains some text that must be translated, so there could
be someimage_pt-br.jpg, someimage_sr-rs.jpg, etc. I thought this would
be a good idea:

IMG(_src=URL('static', T('images/someimage.jpg')))

But this doesn't work. Has anyone here attempted something like this?
Any good solutions?

-- 
Branko Vukelić

bg.bra...@gmail.com
stu...@brankovukelic.com

Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny

Gimp Brushmakers Guild
http://bit.ly/gbg-group


[web2py] Re: Translations within the URL method

2010-11-12 Thread Martin.Mulone
Did you try?

IMG(_src=URL('static', str(T('images/someimage.jpg'

On 12 nov, 20:59, Branko Vukelic  wrote:
> I'm using the URL method as a src attribute for an image like so:
>
> IMG(_src=URL('static', 'images/someimage.jpg'))
>
> This image contains some text that must be translated, so there could
> be someimage_pt-br.jpg, someimage_sr-rs.jpg, etc. I thought this would
> be a good idea:
>
> IMG(_src=URL('static', T('images/someimage.jpg')))
>
> But this doesn't work. Has anyone here attempted something like this?
> Any good solutions?
>
> --
> Branko Vukelić
>
> bg.bra...@gmail.com
> stu...@brankovukelic.com
>
> Check out my blog:http://www.brankovukelic.com/
> Check out my portfolio:http://www.flickr.com/photos/foxbunny/
> Registered Linux user #438078 (http://counter.li.org/)
> I hang out on identi.ca:http://identi.ca/foxbunny
>
> Gimp Brushmakers Guildhttp://bit.ly/gbg-group


Re: [web2py] Re: web2py 1.89.1 is OUT... update?

2010-11-12 Thread Andrew Thompson

On 11/12/2010 4:58 PM, mdipierro wrote:

ps. may not work on windows

I doubt this is what you meant, but I seem to have hit a snag with the 
upgrade.


web2py is running on ubuntu, but I'm managing it from chrome on win7. 
After upgrading, the redirect back failed. Attempting to reload the 
admin page gave me more failures.


If anyone wants to glance over the error files:

http://aktzero.com/static/scratch/___127.0.0.1.2010-11-12.19-03-03.214c98d0-8098-402f-b763-4343b57db743
http://aktzero.com/static/scratch/___127.0.0.1.2010-11-12.19-03-00.e4723686-3941-4b87-b311-ff93903df654
http://aktzero.com/static/scratch/___127.0.0.1.2010-11-12.19-04-02.80cd2b37-276d-4029-b138-f51cfe10ff1c
http://aktzero.com/static/scratch/___127.0.0.1.2010-11-12.19-02-57.431d91af-4e2f-465c-8e59-c5e5f0f2e444

Restarting the web2py process cleared it up, and it seems to be ok. I've 
got the new admin interface, and my small handfull of sites are still 
running.


--
Andrew Thompson
http://aktzero.com/



Re: [web2py] Re: Translations within the URL method

2010-11-12 Thread Branko Vukelic
Thanks, that seems to be working. :)

On Sat, Nov 13, 2010 at 1:15 AM, Martin.Mulone  wrote:
> Did you try?
>
> IMG(_src=URL('static', str(T('images/someimage.jpg'
>
> On 12 nov, 20:59, Branko Vukelic  wrote:
>> I'm using the URL method as a src attribute for an image like so:
>>
>> IMG(_src=URL('static', 'images/someimage.jpg'))
>>
>> This image contains some text that must be translated, so there could
>> be someimage_pt-br.jpg, someimage_sr-rs.jpg, etc. I thought this would
>> be a good idea:
>>
>> IMG(_src=URL('static', T('images/someimage.jpg')))
>>
>> But this doesn't work. Has anyone here attempted something like this?
>> Any good solutions?
>>
>> --
>> Branko Vukelić
>>
>> bg.bra...@gmail.com
>> stu...@brankovukelic.com
>>
>> Check out my blog:http://www.brankovukelic.com/
>> Check out my portfolio:http://www.flickr.com/photos/foxbunny/
>> Registered Linux user #438078 (http://counter.li.org/)
>> I hang out on identi.ca:http://identi.ca/foxbunny
>>
>> Gimp Brushmakers Guildhttp://bit.ly/gbg-group



-- 
Branko Vukelić

bg.bra...@gmail.com
stu...@brankovukelic.com

Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny

Gimp Brushmakers Guild
http://bit.ly/gbg-group


[web2py] Re: web2py 1.89.1 is OUT... update?

2010-11-12 Thread Anthony
I had the same exact experience on Windows (in IE). Here's the
traceback I got:

Traceback (most recent call last):
  File "C:\web2py\gluon\restricted.py", line 188, in restricted
exec ccode in environment
  File "C:\web2py\applications\admin/views\default/site.html", line
182, in 
AttributeError: 'translator' object has no attribute
'get_possible_languages'

Referring to:

  for language in T.get_possible_languages():

Like Andrew, everything was fine after restarting web2py.

Anthony


On Nov 12, 7:20 pm, Andrew Thompson  wrote:
> On 11/12/2010 4:58 PM, mdipierro wrote:> ps. may not work on windows
>
> I doubt this is what you meant, but I seem to have hit a snag with the
> upgrade.
>
> web2py is running on ubuntu, but I'm managing it from chrome on win7.
> After upgrading, the redirect back failed. Attempting to reload the
> admin page gave me more failures.
>
> If anyone wants to glance over the error files:
>
> http://aktzero.com/static/scratch/___127.0.0.1.2010-11-12.19-03-0...http://aktzero.com/static/scratch/___127.0.0.1.2010-11-12.19-03-0...http://aktzero.com/static/scratch/___127.0.0.1.2010-11-12.19-04-0...http://aktzero.com/static/scratch/___127.0.0.1.2010-11-12.19-02-5...
>
> Restarting the web2py process cleared it up, and it seems to be ok. I've
> got the new admin interface, and my small handfull of sites are still
> running.
>
> --
> Andrew Thompsonhttp://aktzero.com/


[web2py] Crud.select

2010-11-12 Thread mr.freeze
Should Crud.select honor record level auth permissions when returning
records? Right now it only filters by table.


[web2py] Re: web2py 1.89.1 is OUT

2010-11-12 Thread Brian M
Probably typo in wizard at step 2

The Instructions say:
If you need authentication remove the table "auth_user".
Shouldn't that be:
If you DO NOT need authentication remove the table "auth_user"

On Nov 12, 9:22 am, mdipierro  wrote:
> Please give it a try and report any bug.
>
> 1.89.1
> - new admin layout (thanks Branko Vukelic)
> - new admin search
> - new admin language selector (thanks Yair)
> - new Welcome app (thanks Martin Mulone)
> - beter wizard
> - admin support for DEMO_MODE=True
> - admin exposes GAE deployment button (always)
> - MENU support None links (thanks Michael Wolfe)
> - web2py.py -J for running cron (thanks Jonathan Lundell)
> - fixed ~db.table.id on GAE (thanks MicLee)
> - service.jsonrpc supports service.JsonRpcException (thanks Matt)
> - many small bug fixes.


[web2py] internal error trying to connect to a mssql db

2010-11-12 Thread Crim
so this is all the code i really have for this right now

db = DAL('mssql//s...@localhost/master')

just trying to connect to my localhost ms sql db that i set up using
the newest version of ms sql server 

im just trying to use the default account sa to connect ... which
doesnt require a password and i always get errors

now i have read and checked the web2py book and i cant figure out the
error and i was wondering if one of you kind gents could lend a hand.


[web2py] Use DAL() to connect to a local MS Sql db

2010-11-12 Thread Crim
Ok so i have been reading the web2py book and it says to use this sort
of command to connect

db = DAL('mssql://account_name:passwo...@localhost/master')   #
the databases name is master and i want to print the tables

print db.tables  #so i can check if its working

by looking at my properties window in my MS sql db i have my login-
name as: nameofpc\my_accoutname_for_my_pc
and when i set the server up it forced me to leave it blank which i
assume would be my normal password for my pc

its a localhost :p

anyways its not working and im not sure what to do or what im missing


The database is already populated with empty tables and rules.

Thanks for your help.




[web2py] Re: internal error trying to connect to a mssql db

2010-11-12 Thread mr.freeze
Can you post the traceback of the error?

On Nov 12, 5:27 pm, Crim  wrote:
> so this is all the code i really have for this right now
>
> db = DAL('mssql//s...@localhost/master')
>
> just trying to connect to my localhost ms sql db that i set up using
> the newest version of ms sql server 
>
> im just trying to use the default account sa to connect ... which
> doesnt require a password and i always get errors
>
> now i have read and checked the web2py book and i cant figure out the
> error and i was wondering if one of you kind gents could lend a hand.


[web2py] Re: internal error trying to connect to a mssql db

2010-11-12 Thread Crim
i wasnt able to figure out the meaning of the error...

On Nov 12, 10:32 pm, "mr.freeze"  wrote:
> Can you post the traceback of the error?
>
> On Nov 12, 5:27 pm, Crim  wrote:
>
>
>
>
>
>
>
> > so this is all the code i really have for this right now
>
> > db = DAL('mssql//s...@localhost/master')
>
> > just trying to connect to my localhost ms sql db that i set up using
> > the newest version of ms sql server 
>
> > im just trying to use the default account sa to connect ... which
> > doesnt require a password and i always get errors
>
> > now i have read and checked the web2py book and i cant figure out the
> > error and i was wondering if one of you kind gents could lend a hand.


[web2py] Re: internal error trying to connect to a mssql db

2010-11-12 Thread mdipierro
Can you post the exact error?
There is not nothing working with your URI string and the password is
indeed optional.

Massimo

On Nov 12, 10:36 pm, Crim  wrote:
> i wasnt able to figure out the meaning of the error...
>
> On Nov 12, 10:32 pm, "mr.freeze"  wrote:
>
> > Can you post the traceback of the error?
>
> > On Nov 12, 5:27 pm, Crim  wrote:
>
> > > so this is all the code i really have for this right now
>
> > > db = DAL('mssql//s...@localhost/master')
>
> > > just trying to connect to my localhost ms sql db that i set up using
> > > the newest version of ms sql server 
>
> > > im just trying to use the default account sa to connect ... which
> > > doesnt require a password and i always get errors
>
> > > now i have read and checked the web2py book and i cant figure out the
> > > error and i was wondering if one of you kind gents could lend a hand.
>
>


[web2py] Re: Error when using new wizard

2010-11-12 Thread mdipierro
What is your setup?  apache?mod_wsgi?

On Nov 12, 5:48 pm, Kenneth Lundström 
wrote:
>  > Can you check if this folder was created?
>  >  /data/domains/web2py/applications/Boatintra
>
> No it was not created.
>
>  > if not it is a file permission issue. What os? was it a binary
> distribution of web2py?
>
> Linux, source. All files permissions apache:web2py. I tried to change
> file permissions of the applications directory to 777 but no luck.
>
> Kenneth
>
>
>
> > On Nov 12, 5:30 pm, Kenneth Lundstr m
> > wrote:
> >> Just installed the newest version of web2py (1.89.1) and tested the
> >> wizard to create a new appl.
>
> >> I came to step 6 when I got a error.
>
> >> Version
> >> web2py Version 1.89.1 (2010-11-12 15:14:36)
> >> Python
> >> Traceback
>
> >> Traceback (most recent call last):
> >> File "/data/domains/web2py/gluon/restricted.py", line 188, in restricted
> >> exec ccode in environment
> >> File "/data/domains/web2py/applications/admin/controllers/wizard.py",
> >> line 571, in ?
> >> File "/data/domains/web2py/gluon/globals.py", line 96, in
> >> self._caller = lambda f: f()
> >> File "/data/domains/web2py/applications/admin/controllers/wizard.py",
> >> line 200, in step6
> >> create(form.vars)
> >> File "/data/domains/web2py/applications/admin/controllers/wizard.py",
> >> line 488, in create
> >> file=open(meta,'wb')
> >> IOError: [Errno 2] No such file or directory:
> >> '/data/domains/web2py/applications/admin/../Boatintra/wizard.metadata'
>
> >> What more info do you need to find the error?
>
> >> Kenneth
>
>


[web2py] Re: Crud.select

2010-11-12 Thread mdipierro
No it does not.

On Nov 12, 8:41 pm, "mr.freeze"  wrote:
> Should Crud.select honor record level auth permissions when returning
> records? Right now it only filters by table.


[web2py] Re: internal error trying to connect to a mssql db

2010-11-12 Thread mr.freeze
If that is the actual URI, then it is missing a colon after mssql.

On Nov 12, 10:40 pm, mdipierro  wrote:
> Can you post the exact error?
> There is not nothing working with your URI string and the password is
> indeed optional.
>
> Massimo
>
> On Nov 12, 10:36 pm, Crim  wrote:
>
> > i wasnt able to figure out the meaning of the error...
>
> > On Nov 12, 10:32 pm, "mr.freeze"  wrote:
>
> > > Can you post the traceback of the error?
>
> > > On Nov 12, 5:27 pm, Crim  wrote:
>
> > > > so this is all the code i really have for this right now
>
> > > > db = DAL('mssql//s...@localhost/master')
>
> > > > just trying to connect to my localhost ms sql db that i set up using
> > > > the newest version of ms sql server 
>
> > > > im just trying to use the default account sa to connect ... which
> > > > doesnt require a password and i always get errors
>
> > > > now i have read and checked the web2py book and i cant figure out the
> > > > error and i was wondering if one of you kind gents could lend a hand.
>
>


[web2py] Re: internal error trying to connect to a mssql db

2010-11-12 Thread Crim
it gives me this in the error snapshot:
(global name 'pyodbc' is not defined
(tried 5 times))

On Nov 12, 10:40 pm, mdipierro  wrote:
> Can you post the exact error?
> There is not nothing working with your URI string and the password is
> indeed optional.
>
> Massimo
>
> On Nov 12, 10:36 pm, Crim  wrote:
>
>
>
>
>
>
>
> > i wasnt able to figure out the meaning of the error...
>
> > On Nov 12, 10:32 pm, "mr.freeze"  wrote:
>
> > > Can you post the traceback of the error?
>
> > > On Nov 12, 5:27 pm, Crim  wrote:
>
> > > > so this is all the code i really have for this right now
>
> > > > db = DAL('mssql//s...@localhost/master')
>
> > > > just trying to connect to my localhost ms sql db that i set up using
> > > > the newest version of ms sql server 
>
> > > > im just trying to use the default account sa to connect ... which
> > > > doesnt require a password and i always get errors
>
> > > > now i have read and checked the web2py book and i cant figure out the
> > > > error and i was wondering if one of you kind gents could lend a hand.


[web2py] Re: internal error trying to connect to a mssql db

2010-11-12 Thread Crim
sry about that no i had fixed that part :(

On Nov 12, 10:42 pm, "mr.freeze"  wrote:
> If that is the actual URI, then it is missing a colon after mssql.
>
> On Nov 12, 10:40 pm, mdipierro  wrote:
>
>
>
>
>
>
>
> > Can you post the exact error?
> > There is not nothing working with your URI string and the password is
> > indeed optional.
>
> > Massimo
>
> > On Nov 12, 10:36 pm, Crim  wrote:
>
> > > i wasnt able to figure out the meaning of the error...
>
> > > On Nov 12, 10:32 pm, "mr.freeze"  wrote:
>
> > > > Can you post the traceback of the error?
>
> > > > On Nov 12, 5:27 pm, Crim  wrote:
>
> > > > > so this is all the code i really have for this right now
>
> > > > > db = DAL('mssql//s...@localhost/master')
>
> > > > > just trying to connect to my localhost ms sql db that i set up using
> > > > > the newest version of ms sql server 
>
> > > > > im just trying to use the default account sa to connect ... which
> > > > > doesnt require a password and i always get errors
>
> > > > > now i have read and checked the web2py book and i cant figure out the
> > > > > error and i was wondering if one of you kind gents could lend a hand.


[web2py] Re: web2py 1.89.1 is OUT... update?

2010-11-12 Thread mdipierro
The fact is after you upgrade you get the new admin which uses a new
API function. Unless you restart the server that API function is not
available. This is a one time event since we never made such a big
change in admin.

On Nov 12, 7:26 pm, Anthony  wrote:
> I had the same exact experience on Windows (in IE). Here's the
> traceback I got:
>
> Traceback (most recent call last):
>   File "C:\web2py\gluon\restricted.py", line 188, in restricted
>     exec ccode in environment
>   File "C:\web2py\applications\admin/views\default/site.html", line
> 182, in 
> AttributeError: 'translator' object has no attribute
> 'get_possible_languages'
>
> Referring to:
>
>   for language in T.get_possible_languages():
>
> Like Andrew, everything was fine after restarting web2py.
>
> Anthony
>
> On Nov 12, 7:20 pm, Andrew Thompson  wrote:
>
> > On 11/12/2010 4:58 PM, mdipierro wrote:> ps. may not work on windows
>
> > I doubt this is what you meant, but I seem to have hit a snag with the
> > upgrade.
>
> > web2py is running on ubuntu, but I'm managing it from chrome on win7.
> > After upgrading, the redirect back failed. Attempting to reload the
> > admin page gave me more failures.
>
> > If anyone wants to glance over the error files:
>
> >http://aktzero.com/static/scratch/___127.0.0.1.2010-11-12.19-03-0..
>
> > Restarting the web2py process cleared it up, and it seems to be ok. I've
> > got the new admin interface, and my small handfull of sites are still
> > running.
>
> > --
> > Andrew Thompsonhttp://aktzero.com/
>
>


[web2py] Re: internal error trying to connect to a mssql db

2010-11-12 Thread mr.freeze
Do you have the pyodbc driver installed? http://code.google.com/p/pyodbc/

On Nov 12, 10:43 pm, Crim  wrote:
> it gives me this in the error snapshot:
> (global name 'pyodbc' is not defined
> (tried 5 times))
>
> On Nov 12, 10:40 pm, mdipierro  wrote:
>
> > Can you post the exact error?
> > There is not nothing working with your URI string and the password is
> > indeed optional.
>
> > Massimo
>
> > On Nov 12, 10:36 pm, Crim  wrote:
>
> > > i wasnt able to figure out the meaning of the error...
>
> > > On Nov 12, 10:32 pm, "mr.freeze"  wrote:
>
> > > > Can you post the traceback of the error?
>
> > > > On Nov 12, 5:27 pm, Crim  wrote:
>
> > > > > so this is all the code i really have for this right now
>
> > > > > db = DAL('mssql//s...@localhost/master')
>
> > > > > just trying to connect to my localhost ms sql db that i set up using
> > > > > the newest version of ms sql server 
>
> > > > > im just trying to use the default account sa to connect ... which
> > > > > doesnt require a password and i always get errors
>
> > > > > now i have read and checked the web2py book and i cant figure out the
> > > > > error and i was wondering if one of you kind gents could lend a hand.
>
>


[web2py] Re: Crud.select

2010-11-12 Thread mr.freeze
I know. I'm asking if it should.  Would you take a patch?

On Nov 12, 10:42 pm, mdipierro  wrote:
> No it does not.
>
> On Nov 12, 8:41 pm, "mr.freeze"  wrote:
>
> > Should Crud.select honor record level auth permissions when returning
> > records? Right now it only filters by table.
>
>


[web2py] Re: internal error trying to connect to a mssql db

2010-11-12 Thread Crim
i do

if it makes a difference im on a 64bit system

On Nov 12, 10:46 pm, "mr.freeze"  wrote:
> Do you have the pyodbc driver installed?http://code.google.com/p/pyodbc/
>
> On Nov 12, 10:43 pm, Crim  wrote:
>
>
>
>
>
>
>
> > it gives me this in the error snapshot:
> > (global name 'pyodbc' is not defined
> > (tried 5 times))
>
> > On Nov 12, 10:40 pm, mdipierro  wrote:
>
> > > Can you post the exact error?
> > > There is not nothing working with your URI string and the password is
> > > indeed optional.
>
> > > Massimo
>
> > > On Nov 12, 10:36 pm, Crim  wrote:
>
> > > > i wasnt able to figure out the meaning of the error...
>
> > > > On Nov 12, 10:32 pm, "mr.freeze"  wrote:
>
> > > > > Can you post the traceback of the error?
>
> > > > > On Nov 12, 5:27 pm, Crim  wrote:
>
> > > > > > so this is all the code i really have for this right now
>
> > > > > > db = DAL('mssql//s...@localhost/master')
>
> > > > > > just trying to connect to my localhost ms sql db that i set up using
> > > > > > the newest version of ms sql server 
>
> > > > > > im just trying to use the default account sa to connect ... which
> > > > > > doesnt require a password and i always get errors
>
> > > > > > now i have read and checked the web2py book and i cant figure out 
> > > > > > the
> > > > > > error and i was wondering if one of you kind gents could lend a 
> > > > > > hand.


  1   2   >