Re: [web2py] A web2py BBS in c-hina has been launched, since in c-hina, this web2py group is forbidden.

2012-05-23 Thread Carlos Costa
好的。
Good.

2012/5/23 web2py_lover lia...@gmail.com:
 A web2py BBS in c-hina has been launched, since in c-hina, this web2py group
 is forbidden.

 http://web2py.sinaapp.com/





-- 
Carlos J. Costa
Cientista da Computação
Esp. Gestão em Telecom

EL MELECH NEEMAN!
אָמֵן


Re: [web2py] Re: 75€ BOUNTY - Massively Complicated Query Required

2012-05-18 Thread Carlos Costa
The answer?

2012/5/18 Jason Brower encomp...@gmail.com

  This bounty has, thankfully, been solved.  Thank you to all those that
 have participated!  It has saved me so much time!
 BR,
 Jason Brower


 On 05/17/2012 07:28 PM, Jason Brower wrote:

 I have the event management tool I have been working on for 2 years now
 and I have made some changes to the code that require my most complicated
 query to be rebuilt.
 After thinking about it for several hours I figure I should throw it at
 you guys to see what you can come up with.
 The winner of this query will get 75€ with paypal or other means after I
 have it implemented it in the code.
 I have the following model:
 model_diagram.png
 event_attender.py
 tag.py
 tag_link.py
 Description:
 I am building a list of connections based on relevance by tag.
 Tags have two states, looking for and attribute.
 Users attach themselves to these tags with the two attributes.
 I am looking for someone with this tag.
 and/or
 This tag is something about me that I want to offer.

 Now when they do this a list of users will show on the screen.
   ID Nickname Tags your looking for that they have Your Relevance
  Tags they are looking for that you have Their Relevance Total Relevance
 Image city  101 encompass Tag1, Tag2, Tag4 3 Tag4, Tag5, Tag 6 3 10
  http:// Oulu  102 encompass Tag1, Tag2, Tag4 3 Tag4, Tag 6 3 8
  http:// Oulu  150 encompass Tag1, Tag2, Tag4 3 Tag 6 3 7
  http:// Helsinki
 This is build with the following:
 UserA is the user logged in using the system
 If another user has a tag that UserA is looking for, then relevance is +2
 to UserA
 If another user is looking for something UserA has, then relevance is +1
 to UserA
 If another user lives in the same city as UserA and has something they are
 looking for or something to offer then relevance is +1
 Does this make sense? I just need to query that will happen.  I can handle
 the view just fine. Feel free to comment or ask questions.
 If you can think of a good way to connect people better with the data in
 the model diagram attached do tell.  I will give you another 25€ for that
 implementation as well. :)
 ---
 BR,
 Jason Brower





-- 
Carlos J. Costa
Cientista da Computação
Esp. Gestão em Telecom

EL MELECH NEEMAN!
אָמֵן


Re: [web2py] Re: 75€ BOUNTY - Massively Complicated Query Required

2012-05-17 Thread Carlos Costa
I found a way quite simple but It does not include the Relevance columns.

2012/5/17 Andrew awillima...@gmail.com

 If another user has a tag that UserA is looking for, then relevance is +2
 to UserA
 If another user is looking for something UserA has, then relevance is +1
 to UserA
 If another user lives in the same city as UserA and has something they are
 looking for or something to offer then relevance is +1

 So, is the third similar to the first, but with a city clause.   Sounds
 like it's a +2 if you have something UserA is looking for, but it's only +1
 if you live in the same city ?

 Andrew W



 On Friday, May 18, 2012 4:28:02 AM UTC+12, encompass wrote:

  I have the event management tool I have been working on for 2 years now
 and I have made some changes to the code that require my most complicated
 query to be rebuilt.
 After thinking about it for several hours I figure I should throw it at
 you guys to see what you can come up with.
 The winner of this query will get 75� with paypal or other means after
 I have it implemented it in the code.

 I have the following model:
 model_diagram.png
 event_attender.py
 tag.py
 tag_link.py
 Description:
 I am building a list of connections based on relevance by tag.
 Tags have two states, looking for and attribute.
 Users attach themselves to these tags with the two attributes.
 I am looking for someone with this tag.
 and/or
 This tag is something about me that I want to offer.

 Now when they do this a list of users will show on the screen.
   ID Nickname Tags your looking for that they have Your Relevance
  Tags they are looking for that you have Their Relevance Total Relevance
 Image city  101 encompass Tag1, Tag2, Tag4 3 Tag4, Tag5, Tag 6 3 10
  http:// Oulu  102 encompass Tag1, Tag2, Tag4 3 Tag4, Tag 6 3 8
  http:// Oulu  150 encompass Tag1, Tag2, Tag4 3 Tag 6 3 7
  http:// Helsinki
 This is build with the following:
 UserA is the user logged in using the system
 If another user has a tag that UserA is looking for, then relevance is +2
 to UserA
 If another user is looking for something UserA has, then relevance is +1
 to UserA
 If another user lives in the same city as UserA and has something they
 are looking for or something to offer then relevance is +1
 Does this make sense? I just need to query that will happen.� I can
 handle the view just fine. Feel free to comment or ask questions.
 If you can think of a good way to connect people better with the data in
 the model diagram attached do tell.� I will give you another 25� for
 that implementation as well. :)
 ---
 BR,
 Jason Brower




-- 
Carlos J. Costa
Cientista da Computação
Esp. Gestão em Telecom

EL MELECH NEEMAN!
אָמֵן


Re: [web2py] An insult to web2py ?

2012-05-05 Thread Carlos Costa
I read it like a manifest of preferences, not like argumentations.
Nothing to worry about.

Em 3 de maio de 2012 08:40, António Ramos ramstei...@gmail.com escreveu:
 a person just wrote this about web2py in a portuguese forum
 Anyone care to coment?


 Viva,

 Eu conheci primeiro o web2py e só uns meses depois o Django.
 Ao início achei bastante interessante (a ferramenta de admin, tutorial fácil
 de seguir, etc.). O que me fez saltar do web2py para o django e nunca voltar
 para trás foi, entre outros, o seguinte:

 - web2py não tem um ORM, tem uma api OO mas que segue o mesmo paradigma de
 SQL, No fundo, ao fazer .select() / .union() estamos a escrever SQL
 disfarçado. Um bom ORM permite não ter de escrever SQL em 90% dos casos,
 poupando trabalho.

 - Os objectos retornados pela camada de persistência do web2py não têm
 classes que façam sentido no domínio (Books, Persons, whatever seja o
 domínio), aquilo retorna umas instâncias de Record (ou lá o que é) que não
 são mais do que dicts. O mapeamento disso para instâncias de classes do
 domínio tem de ser feito à mão.

 - A ideia de poder meter python arbitrário no template parece gira mas
 facilmente descamba para ficheiros com python+html+javascript tudo
 entrelaçado e impossível de manter.

 - A magia da framework. Se bem me lembro os dados do request actual são
 postos em variáveis globais sem qualquer necessidade (podiam ser passados
 para a view, como no django).

 - Os models são executados ( exec() ) a cada pedido. Não há necessidade para
 este overhead.

 - Com tantos editores excelentes (emacs,vim,eclipse,vstudio,..),porquê usar
 um editor inferior no browser? Se gastarem tempo a trazer esse editor ao
 nível dos outros, perderam tempo que podia ter sido usado para melhorar
 outras partes da framework.

 - A qualidade do código é incomparável. Pequeno exemplo: Lembro-me que o
 núcleo da persistência do web2py na altura era um sql.py com algumas 3000
 linhas, todo martelado com ifs para emitir SQL cozido ou assado consoante a
 BD e, de ver o Massimo* argumentar na mailing list que não era crítico
 melhorar aquela parte.

 Para mim, o web2py é bom como uma ferramenta de aprendizagem, nada mais.

 Cumprimentos.



-- 
Carlos J. Costa
Cientista da Computação
Esp. Gestão em Telecom

EL MELECH NEEMAN!
אָמֵן


Re: [web2py] Re: An insult to web2py ?

2012-05-05 Thread Carlos Costa
I take this as opportunity to compliment the DAL.
I have never seen clever way to manipulate data in a relational database.
I am actually addicted to the way it works. I wish could work with
web2py as my primary job.

2012/5/5 Massimo Di Pierro massimo.dipie...@gmail.com:
 On Saturday, 5 May 2012 10:23:34 UTC-5, Tiago Almeida wrote:

 Hi,
 The issue about dal/orm, like Anthony said, there are tradeoffs to
 consider. In my opinion you loose too much not having an orm to gain very
 little with the dal. Let me continue my example.
 In the Deparment/Teacher hypothetical model, you also have assignment of
 Teachers to Departments. This assignment is very simple (for the sake of
 brevity) and has the start/end dates of the assignment and the function
 (just a string) of the Teacher in that Department.
 You now want, Given the ID of a department list all the assignments of all
 teachers along with their functions in a cool graphical timeline fashion.
 It's not about how you get the data. It's about the effort you have
 implementing this req. and how you organize your code. Do you?
 a) write your .selects() in the view function
 b) write a historical_assignments(dep_id) function somewhere that hides
 the DAL and call it from the view
 c) write a computed field on the department model
 d) write a method  historical_assignments() on the class Department

 To me, the d) option is by far the most elegant. I would have had the
 Department class created anyway, so it's a matter of sticking a method in
 there. If I am working with an ORM, by defining the classes, I automagically
 get the tables defined. Without it, I have to repeat myself, redefining the
 fields and the fields in the tables and their types, etc. etc. in the
 persistance layer.
 What if I didn't define those classes? Then I couldn't contain these kinds
 of business related operations into a single application layer and they
 would leak everywhere, for instance in to the views, being much harder to
 maintain.


 this is somewhat a religious matter. We do not like to pollute the namespace
 with one class per table. We do not even usually do Department =
 db.define_table(...). We just expose db and access department via
 db.department. Given this preference:

 db.departement.historical_assignments = Field.Lazy(lambda departement, date:
 db(db.teacher.departement)(db.teacher.asdatedate).select())

 seems simpler and clear than to define a class and a method. It does not
 pollute the namespace. In fact web2py does allow to create a VirtualField
 class and map that into table, so that records have fields corresponding to
 methods. We consider it a legacy feature because users prefer the new
 syntax.
 Yet this is kind of a religious issue.

 Regarding the higher  vs different abstraction. A perfect persistence
 layer (if there is such a thing) allows one to actually forget that you have
 a DB system. I honestly don't care, from the biz point of view, if things
 are stored in tables in a DB, xml files or sent via the wire to China. I
 only care that I create my Departments, .save() them and get them later as
 they were saved .get(id=dep_id).


 We do not want to forget that we have a DB system. One can only forget
 when one builds simple queries. Ifone can only do simple queries than one
 starts to think a relational database is not good enough. We want to make
 sure .select() maps in an SQL SELECT, .insert() into SQL INSERT, etc. We do
 not want to hide database access which can cause performance issues. This is
 a significative difference. We do no need .save() and .get() because they
 are kind of like .insert() and .select() but the mapping is not always as
 clear. Moreover is not very Object Oriented either.


 Do you lose anything with this abstraction? Yes, of course. If you hide
 that it's a DB you lose, for instance, DB triggers. It's the normal tradeoff
 in any abstraction. If you use TCP, you get delivery guarantees and peace of
 mind regarding all the dropped/corrupted packets nonsense while loosing,
 say, realtime guarantees. Should we stop using TCP because we loose this
 'realtimeness'? Of course not.
 Are there things that you can do with an orm that you can not with adal?
 No, it's quite the opposite. The dal exposes more details therefore allows
 you to do more. However, by exposing all these details, you get a tool that
 is harder to use (in the sense that you have to repeat yourself) for all the
 other scenarios where you don't need such details. Python is used because no
 one wants to deal with the nonsense of lower level languanges that arise
 from exposing too many details (manual memory management, target machine
 dependency, etc).
 Lastly, If I am working with an orm and need to implement a really complex
 query, nothing stops me from going deeper and use the dal or even writing
 SQL.


 This is what we do not like. The goal of the DAL is to try avoid this as
 much as possible, although it does not prevent it.



  look at
 the Django 

Re: [web2py] Re: CMS question

2012-05-04 Thread Carlos Costa
Sorry, I had not read all the messages neither tested it but I am
interested as I was think on a similar project.
Maybe I am going off topic but my idea was to use the hackasaurus.org
as an user interface editor. It looks fine.
But I am not aware of license issues or integrability.
Has anyone any idea on use it?

2012/5/4 Albert Abril albert.ab...@gmail.com:
 Same for me, but i didn't check the code yet (i'm at work).


 2012/5/4 Aurelijus Useckas aurelijus.usec...@gmail.com

 I'm sorry if my question is lame, but I seem to get this error on
 execution: define_tables() got an unexpected keyword argument 'signature'

 Maybe you could suugest what I'm doing wrong? Many thanx


 On Friday, May 4, 2012 7:11:20 AM UTC+3, Massimo Di Pierro wrote:

 This is what I have so far.

 https://github.com/mdipierro/w2cms

 requires beautifulsoup

 still requires some work, specifically testing and usability. In order to
 edit-in-place you must click on the text then edit it. If you cut and part a
 link to you a youtube page, it will embed the video. If you cut and paste a
 link to an image, it will embed the image. Same for audio, video, flickr
 pages, etc.

 The download of remote pages mostly works but if they use an old version
 of jQuery, it may break the page and the ability to edit it.

 If you edit raw html for a page and add a class editable to one or more
 elements, only those elements will be editable, not the entire page.

 It lack a way to create groups and join groups. It only creates a group
 per person (same name as username) and virtual group everybody.

 There are lots of small details which I have not explained because I am
 not sure myself this works as I want or that I know how I want it to work.





-- 
Carlos J. Costa
Cientista da Computação
Esp. Gestão em Telecom

EL MELECH NEEMAN!
אָמֵן


Re: [web2py] Looking for a good beginner's guide

2012-04-26 Thread Carlos Costa
I think web2py.com/book can be a good start.

2012/4/26 newbiedev mattyoungbloo...@gmail.com:
 I am a new to programming in general and am looking for an excellent
 beginner's guide to web2py. This is not just for learning the framework, but
 also learning web programming priciples, in general.  In other words, I'm
 not just looking for the how, but also the why.

 I have experience with HTML/CSS and some novice experience with Python.

 I've seen some examples from the Head First series for other languages and
 those are pretty close to what I'm looking for.  Does anyone have
 any recommendations?



-- 
Carlos J. Costa
Cientista da Computação
Esp. Gestão em Telecom

EL MELECH NEEMAN!
אָמֵן


Re: [web2py] Re: Free e-book abhout Rest API

2012-04-25 Thread Carlos Costa
So helpful. Thanks.

2012/4/25 Ross Peoples ross.peop...@gmail.com:
 Thanks for the link! I've been looking for good API design resources.



-- 
Carlos J. Costa
Cientista da Computação
Esp. Gestão em Telecom

EL MELECH NEEMAN!
אָמֵן


Re: [web2py] Re: Workflow engine for web2py

2012-04-16 Thread Carlos Costa
I think it is.
What are the advantages with this aproach?

Em 16 de abril de 2012 07:44, António Ramos ramstei...@gmail.com escreveu:
 I suggest a workflow as a service.
 I have a database where i define all workflows for all databases.

 I have something like this way in a Lotus Notes environment.
 I get away with it very nicely. :)
 If i keep control fields in my record
 like,
 readers
 authors
 step
 next step formula
 code to execute in this step
 etc

 then i just call the webservice and send my document as a paramenter and get
 a recalculated document.

 Is this feasible in web2py?

 thank you

 António



 2012/3/1 yamandu yamandu.co...@gmail.com

 Just one resource I found interesting: http://workflowpatterns.com/

 Em terça-feira, 7 de fevereiro de 2012 23h58min19s UTC-2, mart escreveu:

 Something to think about if effort is put on this (just a suggestion).
 You may want to consider the importance of 'roles' in an implemented
 wf engine, since user to role interaction should probably be key in a
 wf model (or at least as important as having the ability to move work
 items around).

 Just my 2 cents,
 Mart

 On Feb 7, 5:35 pm, Richard Vézina ml.richard.vez...@gmail.com wrote:
  From what I understand you can do just that, but without reinventing
  the
  wheel by designing and implementing your own solution.
 
  Richard
 
 
 
 
 
 
 
  On Tue, Feb 7, 2012 at 5:27 PM, Ross Peoples ross.peop...@gmail.com
  wrote:
   I don't know workflow engines in the general sense that well. I once
   created a full documentation management system where each document
   couple
   have a workflow assigned to it. The workflow (predefined, or created
   on-the-fly) would push the document around from person to person,
   ensuring
   that each person completed their step in the time allotted, otherwise
   an
   email would get sent to their manager.
 
   Would a workflow engine allow me to do the same thing, or is this a
   different type of workflow engine?





-- 
Carlos J. Costa
Cientista da Computação
Esp. Gestão em Telecom

EL MELECH NEEMAN!
אָמֵן


Re: [web2py] how to change a field type from string to decimal?

2012-04-12 Thread Carlos Costa
The database wont be recreated.
And you could change the field name temporally.

2012/4/12 Carlos carlosgali...@gmail.com:
 Hi,

 Is it possible (and how) to change a field type from string to decimal
 without recreating the table?.

 There are no records in the table yet, but I would like to know if there's a
 way to accomplish this from web2py (without recreating the database).

 The error I get:

 class 'psycopg2.ProgrammingError' column xfield__tmp is of type numeric
 but expression is of type character varying LINE 1: UPDATE xtable SET
 xfield__tmp=xfield; ^ HINT: You will need to rewrite or cast the
 expression.

 I'm using latest web2py trunk with postgresql.

 Thanks,

    Carlos




-- 
Carlos J. Costa
Cientista da Computação
Esp. Gestão em Telecom

EL MELECH NEEMAN!
אָמֵן


Re: [web2py] How to use XML data

2012-03-06 Thread Carlos Costa
As I can see, you got the XML and outputed it to the view.
I dont see what you want more. Tell us.

2012/3/6 Praveen Bhat praveenbha...@gmail.com:
 Hello,

 I have come to the point where the whole XML document is returned, as u can
 see in the attached file.

 I have used the following code:

 Controller:

 def index():
 import urllib2
 temp =
 urllib2.urlopen('http://free.worldweatheronline.com/feed/weather.ashx?q=udupiformat=xmlnum_of_days=2key=b019cd7d6a135850110711')
 tempdata = temp.read()
 parseddata = XML(tempdata).xml()
 return dict(parseddata = parseddata)

 View:


 {{ for parseddata in parseddata: }}

 l{{=XML(parseddata)}}/li

 {{pass}}

 I am missing something here. Could you please help.

 Regards


 On Monday, March 5, 2012 10:14:46 PM UTC+5:30, yamandu wrote:

 You can do something like in http://web2py.com/books/default/chapter/29/5
 :
 Parsing

 The TAG object is also an XML/HTML parser. It can read text and
 convert into a tree structure of helpers. This allows manipulation
 using the API above:
  html = 'h1Title/h1pthis is a spantest/span/p'
  parsed_html = TAG(html)
  parsed_html.element('span')[0]='TEST'
  print parsed_html
 h1Title/h1pthis is a spanTEST/span/p

 2012/3/5 Praveen Bhat praveenbha...@gmail.com:
  Hello,
 
  I am using http://worldweatheronline.com API to display weather info.
  The
  API returns the data in XML format.
 
  How can i render the same in a HTML page in Web2py.
 
  Link for accessing the API Data:
 
  Weather API
 
  I have done the same in PHP as following:
 
  ?
  $xml =
 
  simplexml_load_file('http://free.worldweatheronline.com/feed/weather.ashx?q=udupiformat=xmlnum_of_days=5key=b019cd7d6a135850110711');
  $current = $xml-xpath(/data/current_condition);
  ?
 
  div class=weather
  ph5Weather :/h5
  ?= $current[0]-temp_C ?deg; C,
  ?= $current[0]-weatherDesc ?/p
  /div
 
  How can I do the same in web2py?
 
 
  Regards,
  Praveen
 

 --
 Carlos J. Costa
 Cientista da Computação
 Esp. Gestão em Telecom

 EL MELECH NEEMAN!
 אָמֵן



-- 
Carlos J. Costa
Cientista da Computação
Esp. Gestão em Telecom

EL MELECH NEEMAN!
אָמֵן


Re: [web2py] view with 2 forms

2012-03-06 Thread Carlos Costa
You will need to pass the post ID in the url or var or something.
And I think you want to show comments related to the post not another posts.

comments = db(db.comment.id=request.args(0)).select()

Pass this to the view.

2012/3/6 Ale alessandro.agu...@gmail.com:
 Good morning everyone. I am making a simple application, but I'm running
 into some doubt. I wanted to do something like thefacebook posts .. Where I
 have a site that I put a post, listed below are all posts with the option
 to comment on them. So far so good .. But how to write the data's
 comment in a post post correct? Attached I am sending the screen of my
 application, I think it is easier to visualize
 what I wanted. Transmission also Model / View / Controller. If you can help
 me will be grateful.

 I'd have to get the id of the post via ajax?

 My model:

 Post = db.define_table('post',
     Field('title'),
     Field('post'),
     format=%(title)s
     )

 Comment = db.define_table('comment',
     Field('post', 'reference post'),
     Field('comment')
     )

 My Controller

 def index():
     form = SQLFORM(Post,
                     formstyle=divs,
                     submit_button=Postar).process()

     form2 = SQLFORM.factory(
                     Field('comment', requires=IS_NOT_EMPTY()),
                     formstyle=divs,
                     submit_button=Comentar)
     if form2.process().accepted:
         print request.vars
         print request.args
         response.flash = 'form accepted'
     elif form2.errors:
         response.flash = 'form has errors'
     else:
         response.flash = 'please fill out the form'


     posts = db().select(Post.ALL)
     return dict(form=form, form2=form2, posts=posts)


 my view:

 div class=post
     {{=form.custom.begin}}
         pTitle/p
         {{=form.custom.widget.title}}
         pPost/p
         {{=form.custom.widget.post}}
         {{=form.custom.submit}}
     {{=form.custom.end}}
 /div
 div class=posts
     {{for post in posts:}}
         li class=posts id=post_{{=post.id}}
             p{{=post.post}}/p
             p{{=post.id}}
             div class=comment
                 {{=form2.custom.begin}}
                     {{=form2.custom.widget.comment}}
                     {{=form2.custom.submit}}
                 {{=form2.custom.end}}
             /div
         /li
     {{pass}}
 /div



-- 
Carlos J. Costa
Cientista da Computação
Esp. Gestão em Telecom

EL MELECH NEEMAN!
אָמֵן


Re: [web2py] fit image to shape

2012-03-06 Thread Carlos Costa
You will need an extra library to accomplish this, like PIL
http://www.pythonware.com/products/pil/

2012/3/6 mwk mwkant...@gmail.com:
 I would like to have an uploaded image displayed inside a specific
 shape.  For instance, I would like to have an uploaded image fill a
 circle or fill an octagon shape, or other shape.  How can I accomplish
 that with We2py?

 Thanks
 Mark



-- 
Carlos J. Costa
Cientista da Computação
Esp. Gestão em Telecom

EL MELECH NEEMAN!
אָמֵן


Re: [web2py] Update query failing on GAE

2012-03-06 Thread Carlos Costa
Looks its a timeout.
Maybe I am wrong but you can state an update too many records. GAE has
time limitations, I dont know how much because I dont use it anymore.
Search for the GAE docs on these limitations.

2012/3/6 Sushant Taneja sushant.tanej...@gmail.com:
 Hi All,

 I am building a invite module.
 In the controller, I have the following code :

 try:
  some initial stuff

    try:

        ... some stuff

        update_request_query = (db.INVITE_SIGNUP.email_id ==
 request_email_id)

  db(update_request_query).update(activation_key=key,activation_url=activation_url)

         ... some other stuff

    except (Timeout,TransactionFailedError,InternalError), derr:
                     logger.warn('Datastore exception for ID: '+
 request_email_id +': '+ str(derr))
 except (Error, Exception), ex:
             logger.error('Fatal Error: '+ request_email_id +': '+ str(ex))

 The problem is that the update statement is not working on GAE. The fields
 which need to be updated are NULL and no error is thrown.
 From my observation, this is happening once a day approx around the time
 when daily quota is reset.

 Am I doing something wrong here ?

 Thanks,
 Sushant





-- 
Carlos J. Costa
Cientista da Computação
Esp. Gestão em Telecom

EL MELECH NEEMAN!
אָמֵן


Re: [web2py] Update query failing on GAE

2012-03-06 Thread Carlos Costa
I dont know, but have you examined the GAE log?

2012/3/6 Sushant Taneja sushant.tanej...@gmail.com:
 Hi,

 I thought the same but as you can see I have handled the Timeout exception
 in the code.
 If its the Timeout then why I am unable to catch the exception ?

 On Tuesday, March 6, 2012 7:30:38 PM UTC+5:30, yamandu wrote:

 Looks its a timeout.
 Maybe I am wrong but you can state an update too many records. GAE has
 time limitations, I dont know how much because I dont use it anymore.
 Search for the GAE docs on these limitations.

 2012/3/6 Sushant Taneja sushant.tanej...@gmail.com:
  Hi All,
 
  I am building a invite module.
  In the controller, I have the following code :
 
  try:
   some initial stuff
 
     try:
 
         ... some stuff
 
         update_request_query = (db.INVITE_SIGNUP.email_id ==
  request_email_id)
 
 
   db(update_request_query).update(activation_key=key,activation_url=activation_url)
 
          ... some other stuff
 
     except (Timeout,TransactionFailedError,InternalError), derr:
                      logger.warn('Datastore exception for ID: '+
  request_email_id +': '+ str(derr))
  except (Error, Exception), ex:
              logger.error('Fatal Error: '+ request_email_id +': '+
  str(ex))
 
  The problem is that the update statement is not working on GAE. The
  fields
  which need to be updated are NULL and no error is thrown.
  From my observation, this is happening once a day approx around the time
  when daily quota is reset.
 
  Am I doing something wrong here ?
 
  Thanks,
  Sushant
 
 

 --
 Carlos J. Costa
 Cientista da Computação
 Esp. Gestão em Telecom

 EL MELECH NEEMAN!
 אָמֵן



-- 
Carlos J. Costa
Cientista da Computação
Esp. Gestão em Telecom

EL MELECH NEEMAN!
אָמֵן


Re: [web2py] How to use XML data

2012-03-05 Thread Carlos Costa
You can do something like in http://web2py.com/books/default/chapter/29/5 :
Parsing

The TAG object is also an XML/HTML parser. It can read text and
convert into a tree structure of helpers. This allows manipulation
using the API above:
 html = 'h1Title/h1pthis is a spantest/span/p'
 parsed_html = TAG(html)
 parsed_html.element('span')[0]='TEST'
 print parsed_html
h1Title/h1pthis is a spanTEST/span/p

2012/3/5 Praveen Bhat praveenbha...@gmail.com:
 Hello,

 I am using http://worldweatheronline.com API to display weather info. The
 API returns the data in XML format.

 How can i render the same in a HTML page in Web2py.

 Link for accessing the API Data:

 Weather API

 I have done the same in PHP as following:

 ?
 $xml =
 simplexml_load_file('http://free.worldweatheronline.com/feed/weather.ashx?q=udupiformat=xmlnum_of_days=5key=b019cd7d6a135850110711');
 $current = $xml-xpath(/data/current_condition);
 ?

 div class=weather
 ph5Weather :/h5
 ?= $current[0]-temp_C ?deg; C,
 ?= $current[0]-weatherDesc ?/p
 /div

 How can I do the same in web2py?


 Regards,
 Praveen




-- 
Carlos J. Costa
Cientista da Computação
Esp. Gestão em Telecom

EL MELECH NEEMAN!
אָמֵן


Re: [web2py] Weird behavior of decimal stored in session.

2012-03-05 Thread Carlos Costa
I dont know why but you can fix it explicitly using Decimal.
http://docs.python.org/library/decimal.html#module-decimal

2012/3/5 Francisco betancourt.franci...@gmail.com:
 Hi everyone. I just came across a weird behavior and I'm wondering if it's
 some kind of bug or just my fault.

 I have a model for a product like this:

 db.define_table('products',
     Field('name',length=128, notnull=True),
     Field('sale_price',type='decimal(14,4)',default=0, notnull=True))

 Now when the user adds a product to the cart I'm storing the row for the
 product in a dictionary in the session like this:

 session.cart[product.id] = product

 finally the view that displays it lets you pick among several payment
 options and based on the option it multiplies the price by another number
 like this:

 {{=session.cart[id].sale_price * session.payment_factor}}

 Both sale price and payment factor are store in DB as decimal(14,4). The
 first time the code is run the view executes correctly. But when you add
 another product to the cart, or modify any other thing that requires a
 reload or repost of the page I get an error like this:

 TypeError: unsupported operand type(s) for *: 'float' and 'Decimal'


 So what is happening is that after the first time my variable which is store
 in the session and that should be treated like a Decimal is being returned
 as a float. This is happening in the development environment with SQLite, I
 have not tested this yet under MySQL. I think it is caused by the fact that
 SQLite stores decimals as float, buy I wonder why does the first time it is
 transformed to Decimal, and then just used as a float? And I wonder if I
 must manually converted them to Decimal every time I use this variables.

 Hope someone can help.



-- 
Carlos J. Costa
Cientista da Computação
Esp. Gestão em Telecom

EL MELECH NEEMAN!
אָמֵן


Re: [web2py] Re: I would like to learn Web2py but where do I start?

2012-02-24 Thread Carlos Costa
Massimo is a nice guy!

2012/2/24 newbie ericgushi...@gmail.com:
 Thank you all so much for your responses and recommendations.  I will
 give those a try.  Massimo, keep up the great work and thank you for
 taking the time to help.  I look forward to the video tutorial.

 On Feb 23, 10:20 pm, pbreit pbreitenb...@gmail.com wrote:
 W3schools is perfectly fine. That fools thing is a little overblown.



-- 
Carlos J. Costa
Cientista da Computação
Esp. Gestão em Telecom

EL MELECH NEEMAN!
אָמֵן


Re: [web2py] how to display data

2012-02-08 Thread Carlos Costa
First select the data you want to display

#select all records with all fields
articles = db(db.articles).select()

Second, pass it to the view
return dict(articles=articles)

Third, render it in the view inde.html
{{=articles}}

Note: this is the most basic data displaying with Web2py, you will
need to increment funcionality and design.



2012/2/8 Praveen Bhat praveenbha...@gmail.com:
 Hello,

 I have 2 controllers Index and articles, how do I display data from defined
 in articles in Index controller?


 Regards,
 Praveen



-- 
Carlos J. Costa
Cientista da Computação
Esp. Gestão em Telecom

EL MELECH NEEMAN!
אָמֵן


Re: [web2py] Re: lungo.js

2012-02-05 Thread Carlos Costa
+1

2012/2/5 Oli oliver.fr...@gmx.net:
 we should have a mobile solution for web2py out of the box. Would this be
 possible?



-- 
Carlos J. Costa
Cientista da Computação
Esp. Gestão em Telecom

EL MELECH NEEMAN!
אָמֵן


Re: [web2py] newbie : Accessing specific form elements' values from a controller.

2012-02-04 Thread Carlos Costa
I think you can do like this:

if request.vars:
   use request.vars.varname to access values
else:
  return .

Since you point your form to the right actions the all the vars will
be there when you submit.
When you dont submit they will not be there.

2012/2/4 Salvation timsina.an...@gmail.com:
 Hi!
    I have a html form in my default view. I don't want to create form
 elements from my controller, but use pure HTML where possible. How can
 I
 1. Access the form elements, and their values into my controller, say
 default.py. (something like GetElementById )
 2. Detect if the form has been submitted, so that I can use the values
 I Accessed.

 I went through many questions here, but couldn't work it out.

 My View:

 form id=mainForm class=well form-search
     legendSearch Videos/legend
         span class=input
              input type=text size=45 name=search_keyword
 id=searchKeyword class=xlarge
         /span

         span class=formactions
                  button class=btn primary type=submitSearch/
 button
          /span
 /form

 My Controller:

 def index():
 #    is form submitted ?
 #    if Yes
 #        Access the form
 #        get the value inside the searchKeyword text box
 #        Use it elsewhere
 #    else
 #        display the form and wait

 I have a feeling that this is not the correct approach. Please feel
 free to point me in the right direction.

 Thank You.



-- 
Carlos J. Costa
Cientista da Computação
Esp. Gestão em Telecom

EL MELECH NEEMAN!
אָמֵן


Re: [web2py] newbie question about relationships in model

2012-02-04 Thread Carlos Costa
Is t_winery being created after this line?

2012/2/4 air_cooled jam...@billson.com:
 I've created a model in the GAE SQL tool - which was great, except it
 didn't work in web2py.  I just got errors.

 So I created a model from the wizard to get going, but I've got some
 strange behaviour around relationships.

 I have a table 'labels' which is linked to a number of other tables.
 A couple of these links work as you'd expect - in the edit screen you
 see a drop list of the 'name' field from the relate table.  For some
 reason I can't fathom ONE of these tables ('winery') shows a text
 field into which the ID of the related record has to be added.  That
 related table 'winery' is similar to the others that do work 'variety'
 and 'retailcategory', and has a 'name' field with the same data type
 as the others.  These relationships are modelled:

    Field('f_retailcategory', type='reference t_retailcategory',
          label=T('Retailcategory')),
    Field('f_winery', type='reference t_winery',
          label=T('Winery')),
 On searching the syntax is suggested as:

    Field('f_winery_id', db.winery),

 or


    Field('f_winery_id', db.t_winery)

 However adding these lines just causes it to blow up and show the
 error:
 type 'exceptions.KeyError' 'winery'

 This is all a bit arcane.  I can't understand why the GAE stuff
 does'nt work after fixing all the parsing errors.
 I've used PHP Cake a bit, so I get the concepts, but at this stage it
 seems the documentation != practice.

 Any tips?
 thanks






-- 
Carlos J. Costa
Cientista da Computação
Esp. Gestão em Telecom

EL MELECH NEEMAN!
אָמֵן


Re: [web2py] Re: Deploying on windows - login works locally but not remotely

2012-02-02 Thread Carlos Costa
I think their purpose is for prototyping.

2012/2/2 Jim Steil j...@qlf.com:
 You are good!

 Is this done because of a security concern?  Would 'best practice' dictate
 that I not use the generic views.

     -Jim


 On 2/2/2012 12:14 PM, Anthony wrote:

 Do you have an actual /views/default/user.html view, or are you relying on
 generic.html to show the login form? If the latter, not that by default, the
 'welcome' app only enables generic views for local requests.

 Anthony

 On Thursday, February 2, 2012 1:04:43 PM UTC-5, Jim S wrote:

 Hi

 I have an app that I'm deploying on a different windows box on our
 internal network.  I can connect to the app from a browser on that server
 without any problems.  I can login with no problems and do what I want.

 When I go to a remote machine to connect to it, I can connect just fine
 and navigate around until I hit a page that requires me to login.  Instead
 of getting the login page, I get:

 invalid view (default/user.html)

 Works fine if I'm browsing from the local machine, but fails on any remote
 machine.

 Thoughts?

     -Jim





-- 
Carlos J. Costa
Cientista da Computação
Esp. Gestão em Telecom

EL MELECH NEEMAN!
אָמֵן


Re: [web2py] Error writing an auth_event

2012-02-02 Thread Carlos Costa
Hard to guess withou the model, but looks like its related to the
membership.

2012/2/2 pbreit pbreitenb...@gmail.com

 My code is erroring and it looks like the culprit is the logging of an
 auth_event. It's happening on a lightly customized auth_user Profile update.



 Traceback (most recent call last):
   File /opt/web2py/gluon/restricted.py, line 204, in restricted
 exec ccode in environment
   File /opt/web2py/applications/init/controllers/default.py 
 https://pricetack.com/admin/edit/init/controllers/default.py, line 133, in 
 module
   File /opt/web2py/gluon/globals.py, line 172, in lambda
 self._caller = lambda f: f()
   File /opt/web2py/applications/init/controllers/default.py 
 https://pricetack.com/admin/edit/init/controllers/default.py, line 85, in 
 user
 form = auth()
   File /opt/web2py/gluon/tools.py, line 1159, in __call__
 return getattr(self,args[0])()
   File /opt/web2py/gluon/tools.py, line 2431, in profile
 onvalidation=onvalidation, hideerror=self.settings.hideerror):
   File /opt/web2py/gluon/sqlhtml.py, line 1088, in accepts
 hideerror=hideerror,
   File /opt/web2py/gluon/html.py, line 1807, in accepts
 status = self._traverse(status,hideerror)
   File /opt/web2py/gluon/html.py, line 749, in _traverse
 newstatus = c._traverse(status,hideerror) and newstatus
   File /opt/web2py/gluon/html.py, line 749, in _traverse
 newstatus = c._traverse(status,hideerror) and newstatus
   File /opt/web2py/gluon/html.py, line 749, in _traverse
 newstatus = c._traverse(status,hideerror) and newstatus
   File /opt/web2py/gluon/html.py, line 749, in _traverse
 newstatus = c._traverse(status,hideerror) and newstatus
   File /opt/web2py/gluon/html.py, line 756, in _traverse
 newstatus = self._validate()
   File /opt/web2py/gluon/html.py, line 1572, in _validate
 (value, errors) = validator(value)
   File /opt/web2py/gluon/validators.py, line 549, in __call__
 elif str(rows[0]._id) != str(self.record_id):
   File /opt/web2py/gluon/dal.py, line 5459, in __getattr__
 return self[key]
   File /opt/web2py/gluon/dal.py, line 5450, in __getitem__
 return dict.__getitem__(self, key)
 KeyError: '_id'



 Function argument list

 (self=Row {'auth_event': gluon.dal.Set object at 0x2...embership':
 gluon.dal.Set object at 0x2207210}, key='_id')
 Code listing

 5445.
 5446.
 5447.
 5448.
 5449.
 5450.

 5451.
 5452.
 5453.
 5454.

 elif m:
 try:
 return dict.__getitem__(self, m.group(1))[m.group(2)]
 except (KeyError,TypeError):
 key = m.group(2)
 return dict.__getitem__(self, key)


 def __call__(self,key):
 return self.__getitem__(key)

 VariablesselfRow {'auth_event': gluon.dal.Set object at
 0x2...embership': gluon.dal.Set object at 0x2207210}dict.__getitem__method
 '__getitem__' of 'dict' objectsbuiltindicttype 'dict'key'_id'




-- 
Carlos J. Costa
Cientista da Computação
Esp. Gestão em Telecom

EL MELECH NEEMAN!
אָמֵן


Re: [web2py] Error writing an auth_event

2012-02-02 Thread Carlos Costa
Looking the code above, elif is hit when len(rows) = 0.
So I am stuck here, how could it retrive any value if the lenght is zero?
Must look this whole code to understand it.

2012/2/2 pbreit pbreitenb...@gmail.com

 I'm not really using memberships and I have auto group creation turned off:

 auth.settings.create_user_groups = False

 It works OK in my dev environment so it has something to do with my
 production data.

 One thing I noticed is that it looks like it might be trying to validate
 NOT_IN_DB. Since it's a Profile update, it should certainly account for the
 current auth_user's email already being in the DB.



 *File /opt/web2py/gluon/validators.py in __call__ at line 549* code
 arguments variables
 Function argument list

 (self=gluon.validators.IS_NOT_IN_DB object, value='pb@com')
 Code listing

 544.
 545.
 546.
 547.
 548.
 549.

 550.
 551.
 552.
 553.

 if len(rows)  0:
 if isinstance(self.record_id, dict):
 for f in self.record_id:
 if str(getattr(rows[0], f)) != str(self.record_id[f]):
 return (value, translate(self.error_message))

 elif str(rows[0]._id) != str(self.record_id):

 return (value, translate(self.error_message))
 return (value, None)




-- 
Carlos J. Costa
Cientista da Computação
Esp. Gestão em Telecom

EL MELECH NEEMAN!
אָמֵן


Re: [web2py] Re: Language File is Reseted when Server is Reseted

2010-11-08 Thread Carlos Costa
Yes.

2010/11/8 mdipierro mdipie...@cs.depaul.edu:
 Do you have the Mark Hammond wein32 extensions?

 On Nov 8, 12:00 pm, yamandu yamandu.co...@gmail.com wrote:
 Both!

 On Nov 8, 2:53 pm, mdipierro mdipie...@cs.depaul.edu wrote:

  Which problem returned? The cache problem or the language problem?

  1.86.2  or 1.88.3?

  On Nov 8, 10:47 am,yamanduyamandu.co...@gmail.com wrote:

   OMG! The problem returned.
   And said this too:
   ERROR:root:Syntax error in C:\..\applications\anima/languages/pt-br.py

   On Nov 6, 10:07 am, Carlos Costa yamandu.co...@gmail.com wrote:

I think It´s fine for now. At least it will be more clear to the
developer until discover the cause.

2010/11/6 mdipierro mdipie...@cs.depaul.edu:

 yes but once and only once, when an upgrade corrupts a cache file.

 On Nov 5, 10:01 pm, Carlos Costa yamandu.co...@gmail.com wrote:
 The ticket is good idea but it will pop to the user?

 2010/11/6 mdipierro mdipie...@cs.depaul.edu:

  Perhaps we can generate a ticket and then delete the file, so the
  ticket happens once.

  On Nov 5, 9:55 pm, mdipierro mdipie...@cs.depaul.edu wrote:
  It stores the cache.disk (in principle it can be deleted without 
  data
  loss). The problem is that if the failure is caused by some other
  serious problem, deleting automatically, will hide a problem with
  cache.disk.

  On Nov 5, 9:52 pm, Carlos Costa yamandu.co...@gmail.com wrote:

   Well, I don´t know exactly. What´s this file exactly for?

   2010/11/5 mdipierro mdipie...@cs.depaul.edu:

perhaps when this occurs should delete the file 
automatically? Pros?
Cons?

On Nov 5, 4:35 pm, Carlos Costa yamandu.co...@gmail.com 
wrote:
Looks like it fixed.
So simple!
Thanks!

2010/11/5 mdipierro mdipie...@cs.depaul.edu:

 delete it

 C:\...\applications\welcome/cache/cache.shelve

 do you still have the problem?

 On Nov 5, 1:53 pm,yamanduyamandu.co...@gmail.com wrote:
 I´ve installedwin32extensions.

 Now I get:
 ERROR:web2py.cache:corrupted file: 
 C:\...\applications\welcome/cache/
 cache.shelve
 everytime!

 On Oct 6, 6:54 pm, mdipierro mdipie...@cs.depaul.edu 
 wrote:

  Yes it is somewhere in the manual.

  On Oct 6, 3:41 pm, Carlos Costa 
  yamandu.co...@gmail.com wrote:

   Things make more sense now.
   I always got the message Cron disable because no 
   file locking.
   I had to pass -N argument for it to stop anoying me.
   Is that documented?

   Thanks again.

   2010/10/6 mdipierro mdipie...@cs.depaul.edu:

If you run web2py from source under windows you 
need it. If you use
the web2py binary then it comes with it.

without it you have no file locking and it is 
possible thet two web2py
threads conflict (one writes a file, another tries 
to open, fails,
overwrites it).

Massimo

On Oct 6, 2:07 pm,yamanduyamandu.co...@gmail.com 
wrote:
Well, I think I never heard of it?
I looked into python help and couldn´t find it.

Should I have it?

On Oct 6, 3:21 pm, mdipierro 
mdipie...@cs.depaul.edu wrote:

 I think I see what the problem is... do you 
 have Mark hammondwin32
 extensions installed?

 Massimo

 On Oct 6, 
 1:13 pm,yamanduyamandu.co...@gmail.com wrote:

  I am using web2py server in Windows 7.

  The actual file is changed and I have to 
  translate again (pt-br.py).

  I tried to replicate the situation now but I 
  coud not.
  Restart the server, restart the editor 
  (thought it could be problem
  with SVN plugin).
  But the problem not ocurred.
  Maybe if restart the computer!
  Because it seems to happen once a day and no 
  more, if remember right.

  On Oct 6, 2:46 pm, mdipierro 
  mdipie...@cs.depaul.edu wrote:

   what os are you using? hat web server?

   you see the translation in english or you 
   find the contect of a
   languages/xx.py file actually changing?

   can you send me an example of the 
   languages/xx.py file before and
   after it gets overwritten?

   Massimo

   On Oct 6, 
   11:38 am,yamanduyamandu.co...@gmail.com 
   wrote:

Everytime I restart the we2py server 
mylanguagefile become in
english again.
What may cause this behavior

Re: [web2py] Re: Language File is Reseted when Server is Reseted

2010-11-08 Thread Carlos Costa
No. Once I tried to fix this very error copying the content from one
language file to other.
But the error already existed and keeps happening.

2010/11/8 mdipierro mdipie...@cs.depaul.edu:
 Did you ever edit the language files without using the web based
 interface?

 Somehow these files are getting corrupted and web2py is re-writing
 them.

 Massimo

 On Nov 8, 12:18 pm, Carlos Costa yamandu.co...@gmail.com wrote:
 Yes.

 2010/11/8 mdipierro mdipie...@cs.depaul.edu:



  Do you have the Mark Hammond wein32 extensions?

  On Nov 8, 12:00 pm, yamandu yamandu.co...@gmail.com wrote:
  Both!

  On Nov 8, 2:53 pm, mdipierro mdipie...@cs.depaul.edu wrote:

   Which problem returned? The cache problem or the language problem?

   1.86.2  or 1.88.3?

   On Nov 8, 10:47 am,yamanduyamandu.co...@gmail.com wrote:

OMG! The problem returned.
And said this too:
ERROR:root:Syntax error in C:\..\applications\anima/languages/pt-br.py

On Nov 6, 10:07 am, Carlos Costa yamandu.co...@gmail.com wrote:

 I think It´s fine for now. At least it will be more clear to the
 developer until discover the cause.

 2010/11/6 mdipierro mdipie...@cs.depaul.edu:

  yes but once and only once, when an upgrade corrupts a cache file.

  On Nov 5, 10:01 pm, Carlos Costa yamandu.co...@gmail.com wrote:
  The ticket is good idea but it will pop to the user?

  2010/11/6 mdipierro mdipie...@cs.depaul.edu:

   Perhaps we can generate a ticket and then delete the file, so 
   the
   ticket happens once.

   On Nov 5, 9:55 pm, mdipierro mdipie...@cs.depaul.edu wrote:
   It stores the cache.disk (in principle it can be deleted 
   without data
   loss). The problem is that if the failure is caused by some 
   other
   serious problem, deleting automatically, will hide a problem 
   with
   cache.disk.

   On Nov 5, 9:52 pm, Carlos Costa yamandu.co...@gmail.com 
   wrote:

Well, I don´t know exactly. What´s this file exactly for?

2010/11/5 mdipierro mdipie...@cs.depaul.edu:

 perhaps when this occurs should delete the file 
 automatically? Pros?
 Cons?

 On Nov 5, 4:35 pm, Carlos Costa yamandu.co...@gmail.com 
 wrote:
 Looks like it fixed.
 So simple!
 Thanks!

 2010/11/5 mdipierro mdipie...@cs.depaul.edu:

  delete it

  C:\...\applications\welcome/cache/cache.shelve

  do you still have the problem?

  On Nov 5, 1:53 pm,yamanduyamandu.co...@gmail.com 
  wrote:
  I´ve installedwin32extensions.

  Now I get:
  ERROR:web2py.cache:corrupted file: 
  C:\...\applications\welcome/cache/
  cache.shelve
  everytime!

  On Oct 6, 6:54 pm, mdipierro 
  mdipie...@cs.depaul.edu wrote:

   Yes it is somewhere in the manual.

   On Oct 6, 3:41 pm, Carlos Costa 
   yamandu.co...@gmail.com wrote:

Things make more sense now.
I always got the message Cron disable because no 
file locking.
I had to pass -N argument for it to stop anoying 
me.
Is that documented?

Thanks again.

2010/10/6 mdipierro mdipie...@cs.depaul.edu:

 If you run web2py from source under windows you 
 need it. If you use
 the web2py binary then it comes with it.

 without it you have no file locking and it is 
 possible thet two web2py
 threads conflict (one writes a file, another 
 tries to open, fails,
 overwrites it).

 Massimo

 On Oct 6, 
 2:07 pm,yamanduyamandu.co...@gmail.com wrote:
 Well, I think I never heard of it?
 I looked into python help and couldn´t find it.

 Should I have it?

 On Oct 6, 3:21 pm, mdipierro 
 mdipie...@cs.depaul.edu wrote:

  I think I see what the problem is... do you 
  have Mark hammondwin32
  extensions installed?

  Massimo

  On Oct 6, 
  1:13 pm,yamanduyamandu.co...@gmail.com 
  wrote:

   I am using web2py server in Windows 7.

   The actual file is changed and I have to 
   translate again (pt-br.py).

   I tried to replicate the situation now but 
   I coud not.
   Restart the server, restart the editor 
   (thought it could be problem
   with SVN plugin).
   But the problem not ocurred.
   Maybe if restart the computer!
   Because it seems to happen once a day and 
   no more, if remember right.

   On Oct 6, 2:46 pm, mdipierro 
   mdipie...@cs.depaul.edu wrote:

what os are you using? hat web server

Re: [web2py] Re: Language File is Reseted when Server is Reseted

2010-11-06 Thread Carlos Costa
I think It´s fine for now. At least it will be more clear to the
developer until discover the cause.

2010/11/6 mdipierro mdipie...@cs.depaul.edu:
 yes but once and only once, when an upgrade corrupts a cache file.

 On Nov 5, 10:01 pm, Carlos Costa yamandu.co...@gmail.com wrote:
 The ticket is good idea but it will pop to the user?

 2010/11/6 mdipierro mdipie...@cs.depaul.edu:



  Perhaps we can generate a ticket and then delete the file, so the
  ticket happens once.

  On Nov 5, 9:55 pm, mdipierro mdipie...@cs.depaul.edu wrote:
  It stores the cache.disk (in principle it can be deleted without data
  loss). The problem is that if the failure is caused by some other
  serious problem, deleting automatically, will hide a problem with
  cache.disk.

  On Nov 5, 9:52 pm, Carlos Costa yamandu.co...@gmail.com wrote:

   Well, I don´t know exactly. What´s this file exactly for?

   2010/11/5 mdipierro mdipie...@cs.depaul.edu:

perhaps when this occurs should delete the file automatically? Pros?
Cons?

On Nov 5, 4:35 pm, Carlos Costa yamandu.co...@gmail.com wrote:
Looks like it fixed.
So simple!
Thanks!

2010/11/5 mdipierro mdipie...@cs.depaul.edu:

 delete it

 C:\...\applications\welcome/cache/cache.shelve

 do you still have the problem?

 On Nov 5, 1:53 pm, yamandu yamandu.co...@gmail.com wrote:
 I´ve installed win32 extensions.

 Now I get:
 ERROR:web2py.cache:corrupted file: 
 C:\...\applications\welcome/cache/
 cache.shelve
 everytime!

 On Oct 6, 6:54 pm, mdipierro mdipie...@cs.depaul.edu wrote:

  Yes it is somewhere in the manual.

  On Oct 6, 3:41 pm, Carlos Costa yamandu.co...@gmail.com wrote:

   Things make more sense now.
   I always got the message Cron disable because no file locking.
   I had to pass -N argument for it to stop anoying me.
   Is that documented?

   Thanks again.

   2010/10/6 mdipierro mdipie...@cs.depaul.edu:

If you run web2py from source under windows you need it. If 
you use
the web2py binary then it comes with it.

without it you have no file locking and it is possible thet 
two web2py
threads conflict (one writes a file, another tries to open, 
fails,
overwrites it).

Massimo

On Oct 6, 2:07 pm, yamandu yamandu.co...@gmail.com wrote:
Well, I think I never heard of it?
I looked into python help and couldn´t find it.

Should I have it?

On Oct 6, 3:21 pm, mdipierro mdipie...@cs.depaul.edu 
wrote:

 I think I see what the problem is... do you have Mark 
 hammondwin32
 extensions installed?

 Massimo

 On Oct 6, 1:13 pm, yamandu yamandu.co...@gmail.com 
 wrote:

  I am using web2py server in Windows 7.

  The actual file is changed and I have to translate 
  again (pt-br.py).

  I tried to replicate the situation now but I coud not.
  Restart the server, restart the editor (thought it 
  could be problem
  with SVN plugin).
  But the problem not ocurred.
  Maybe if restart the computer!
  Because it seems to happen once a day and no more, if 
  remember right.

  On Oct 6, 2:46 pm, mdipierro mdipie...@cs.depaul.edu 
  wrote:

   what os are you using? hat web server?

   you see the translation in english or you find the 
   contect of a
   languages/xx.py file actually changing?

   can you send me an example of the languages/xx.py 
   file before and
   after it gets overwritten?

   Massimo

   On Oct 6, 11:38 am, yamandu 
   yamandu.co...@gmail.com wrote:

Everytime I restart the we2py server 
mylanguagefile become in
english again.
What may cause this behavior?

   --www.yamachine.com
   A máquina não para!

   EL MELECH NEEMAN!

--www.yamachine.com
A máquina não para!

EL MELECH NEEMAN!

   --www.yamachine.com
   A máquina não para!

   EL MELECH NEEMAN!

 --www.yamachine.com
 A máquina não para!

 EL MELECH NEEMAN!



-- 
www.yamachine.com
A máquina não para!


EL MELECH NEEMAN!


Re: [web2py] Re: Language File is Reseted when Server is Reseted

2010-11-05 Thread Carlos Costa
Looks like it fixed.
So simple!
Thanks!

2010/11/5 mdipierro mdipie...@cs.depaul.edu:
 delete it

 C:\...\applications\welcome/cache/cache.shelve

 do you still have the problem?

 On Nov 5, 1:53 pm, yamandu yamandu.co...@gmail.com wrote:
 I´ve installed win32 extensions.

 Now I get:
 ERROR:web2py.cache:corrupted file: C:\...\applications\welcome/cache/
 cache.shelve
 everytime!

 On Oct 6, 6:54 pm, mdipierro mdipie...@cs.depaul.edu wrote:

  Yes it is somewhere in the manual.

  On Oct 6, 3:41 pm, Carlos Costa yamandu.co...@gmail.com wrote:

   Things make more sense now.
   I always got the message Cron disable because no file locking.
   I had to pass -N argument for it to stop anoying me.
   Is that documented?

   Thanks again.

   2010/10/6 mdipierro mdipie...@cs.depaul.edu:

If you run web2py from source under windows you need it. If you use
the web2py binary then it comes with it.

without it you have no file locking and it is possible thet two web2py
threads conflict (one writes a file, another tries to open, fails,
overwrites it).

Massimo

On Oct 6, 2:07 pm, yamandu yamandu.co...@gmail.com wrote:
Well, I think I never heard of it?
I looked into python help and couldn´t find it.

Should I have it?

On Oct 6, 3:21 pm, mdipierro mdipie...@cs.depaul.edu wrote:

 I think I see what the problem is... do you have Mark hammondwin32
 extensions installed?

 Massimo

 On Oct 6, 1:13 pm, yamandu yamandu.co...@gmail.com wrote:

  I am using web2py server in Windows 7.

  The actual file is changed and I have to translate again 
  (pt-br.py).

  I tried to replicate the situation now but I coud not.
  Restart the server, restart the editor (thought it could be 
  problem
  with SVN plugin).
  But the problem not ocurred.
  Maybe if restart the computer!
  Because it seems to happen once a day and no more, if remember 
  right.

  On Oct 6, 2:46 pm, mdipierro mdipie...@cs.depaul.edu wrote:

   what os are you using? hat web server?

   you see the translation in english or you find the contect of a
   languages/xx.py file actually changing?

   can you send me an example of the languages/xx.py file before 
   and
   after it gets overwritten?

   Massimo

   On Oct 6, 11:38 am, yamandu yamandu.co...@gmail.com wrote:

Everytime I restart the we2py server mylanguagefile become in
english again.
What may cause this behavior?

   --www.yamachine.com
   A máquina não para!

   EL MELECH NEEMAN!





-- 
www.yamachine.com
A máquina não para!


EL MELECH NEEMAN!


Re: [web2py] Re: Language File is Reseted when Server is Reseted

2010-11-05 Thread Carlos Costa
Well, I don´t know exactly. What´s this file exactly for?

2010/11/5 mdipierro mdipie...@cs.depaul.edu:
 perhaps when this occurs should delete the file automatically? Pros?
 Cons?

 On Nov 5, 4:35 pm, Carlos Costa yamandu.co...@gmail.com wrote:
 Looks like it fixed.
 So simple!
 Thanks!

 2010/11/5 mdipierro mdipie...@cs.depaul.edu:



  delete it

  C:\...\applications\welcome/cache/cache.shelve

  do you still have the problem?

  On Nov 5, 1:53 pm, yamandu yamandu.co...@gmail.com wrote:
  I´ve installed win32 extensions.

  Now I get:
  ERROR:web2py.cache:corrupted file: C:\...\applications\welcome/cache/
  cache.shelve
  everytime!

  On Oct 6, 6:54 pm, mdipierro mdipie...@cs.depaul.edu wrote:

   Yes it is somewhere in the manual.

   On Oct 6, 3:41 pm, Carlos Costa yamandu.co...@gmail.com wrote:

Things make more sense now.
I always got the message Cron disable because no file locking.
I had to pass -N argument for it to stop anoying me.
Is that documented?

Thanks again.

2010/10/6 mdipierro mdipie...@cs.depaul.edu:

 If you run web2py from source under windows you need it. If you use
 the web2py binary then it comes with it.

 without it you have no file locking and it is possible thet two 
 web2py
 threads conflict (one writes a file, another tries to open, fails,
 overwrites it).

 Massimo

 On Oct 6, 2:07 pm, yamandu yamandu.co...@gmail.com wrote:
 Well, I think I never heard of it?
 I looked into python help and couldn´t find it.

 Should I have it?

 On Oct 6, 3:21 pm, mdipierro mdipie...@cs.depaul.edu wrote:

  I think I see what the problem is... do you have Mark 
  hammondwin32
  extensions installed?

  Massimo

  On Oct 6, 1:13 pm, yamandu yamandu.co...@gmail.com wrote:

   I am using web2py server in Windows 7.

   The actual file is changed and I have to translate again 
   (pt-br.py).

   I tried to replicate the situation now but I coud not.
   Restart the server, restart the editor (thought it could be 
   problem
   with SVN plugin).
   But the problem not ocurred.
   Maybe if restart the computer!
   Because it seems to happen once a day and no more, if remember 
   right.

   On Oct 6, 2:46 pm, mdipierro mdipie...@cs.depaul.edu wrote:

what os are you using? hat web server?

you see the translation in english or you find the contect 
of a
languages/xx.py file actually changing?

can you send me an example of the languages/xx.py file 
before and
after it gets overwritten?

Massimo

On Oct 6, 11:38 am, yamandu yamandu.co...@gmail.com wrote:

 Everytime I restart the we2py server mylanguagefile become 
 in
 english again.
 What may cause this behavior?

--www.yamachine.com
A máquina não para!

EL MELECH NEEMAN!

 --www.yamachine.com
 A máquina não para!

 EL MELECH NEEMAN!



-- 
www.yamachine.com
A máquina não para!


EL MELECH NEEMAN!


Re: [web2py] Re: Language File is Reseted when Server is Reseted

2010-11-05 Thread Carlos Costa
The ticket is good idea but it will pop to the user?

2010/11/6 mdipierro mdipie...@cs.depaul.edu:
 Perhaps we can generate a ticket and then delete the file, so the
 ticket happens once.

 On Nov 5, 9:55 pm, mdipierro mdipie...@cs.depaul.edu wrote:
 It stores the cache.disk (in principle it can be deleted without data
 loss). The problem is that if the failure is caused by some other
 serious problem, deleting automatically, will hide a problem with
 cache.disk.

 On Nov 5, 9:52 pm, Carlos Costa yamandu.co...@gmail.com wrote:

  Well, I don´t know exactly. What´s this file exactly for?

  2010/11/5 mdipierro mdipie...@cs.depaul.edu:

   perhaps when this occurs should delete the file automatically? Pros?
   Cons?

   On Nov 5, 4:35 pm, Carlos Costa yamandu.co...@gmail.com wrote:
   Looks like it fixed.
   So simple!
   Thanks!

   2010/11/5 mdipierro mdipie...@cs.depaul.edu:

delete it

C:\...\applications\welcome/cache/cache.shelve

do you still have the problem?

On Nov 5, 1:53 pm, yamandu yamandu.co...@gmail.com wrote:
I´ve installed win32 extensions.

Now I get:
ERROR:web2py.cache:corrupted file: C:\...\applications\welcome/cache/
cache.shelve
everytime!

On Oct 6, 6:54 pm, mdipierro mdipie...@cs.depaul.edu wrote:

 Yes it is somewhere in the manual.

 On Oct 6, 3:41 pm, Carlos Costa yamandu.co...@gmail.com wrote:

  Things make more sense now.
  I always got the message Cron disable because no file locking.
  I had to pass -N argument for it to stop anoying me.
  Is that documented?

  Thanks again.

  2010/10/6 mdipierro mdipie...@cs.depaul.edu:

   If you run web2py from source under windows you need it. If 
   you use
   the web2py binary then it comes with it.

   without it you have no file locking and it is possible thet 
   two web2py
   threads conflict (one writes a file, another tries to open, 
   fails,
   overwrites it).

   Massimo

   On Oct 6, 2:07 pm, yamandu yamandu.co...@gmail.com wrote:
   Well, I think I never heard of it?
   I looked into python help and couldn´t find it.

   Should I have it?

   On Oct 6, 3:21 pm, mdipierro mdipie...@cs.depaul.edu wrote:

I think I see what the problem is... do you have Mark 
hammondwin32
extensions installed?

Massimo

On Oct 6, 1:13 pm, yamandu yamandu.co...@gmail.com wrote:

 I am using web2py server in Windows 7.

 The actual file is changed and I have to translate again 
 (pt-br.py).

 I tried to replicate the situation now but I coud not.
 Restart the server, restart the editor (thought it could 
 be problem
 with SVN plugin).
 But the problem not ocurred.
 Maybe if restart the computer!
 Because it seems to happen once a day and no more, if 
 remember right.

 On Oct 6, 2:46 pm, mdipierro mdipie...@cs.depaul.edu 
 wrote:

  what os are you using? hat web server?

  you see the translation in english or you find the 
  contect of a
  languages/xx.py file actually changing?

  can you send me an example of the languages/xx.py file 
  before and
  after it gets overwritten?

  Massimo

  On Oct 6, 11:38 am, yamandu yamandu.co...@gmail.com 
  wrote:

   Everytime I restart the we2py server mylanguagefile 
   become in
   english again.
   What may cause this behavior?

  --www.yamachine.com
  A máquina não para!

  EL MELECH NEEMAN!

   --www.yamachine.com
   A máquina não para!

   EL MELECH NEEMAN!

  --www.yamachine.com
  A máquina não para!

  EL MELECH NEEMAN!





-- 
www.yamachine.com
A máquina não para!


EL MELECH NEEMAN!


Re: [web2py] Re: Language File is Reseted when Server is Reseted

2010-10-06 Thread Carlos Costa
Things make more sense now.
I always got the message Cron disable because no file locking.
I had to pass -N argument for it to stop anoying me.
Is that documented?

Thanks again.

2010/10/6 mdipierro mdipie...@cs.depaul.edu:
 If you run web2py from source under windows you need it. If you use
 the web2py binary then it comes with it.

 without it you have no file locking and it is possible thet two web2py
 threads conflict (one writes a file, another tries to open, fails,
 overwrites it).

 Massimo

 On Oct 6, 2:07 pm, yamandu yamandu.co...@gmail.com wrote:
 Well, I think I never heard of it?
 I looked into python help and couldn´t find it.

 Should I have it?

 On Oct 6, 3:21 pm, mdipierro mdipie...@cs.depaul.edu wrote:

  I think I see what the problem is... do you have Mark hammond win32
  extensions installed?

  Massimo

  On Oct 6, 1:13 pm, yamandu yamandu.co...@gmail.com wrote:

   I am using web2py server in Windows 7.

   The actual file is changed and I have to translate again (pt-br.py).

   I tried to replicate the situation now but I coud not.
   Restart the server, restart the editor (thought it could be problem
   with SVN plugin).
   But the problem not ocurred.
   Maybe if restart the computer!
   Because it seems to happen once a day and no more, if remember right.

   On Oct 6, 2:46 pm, mdipierro mdipie...@cs.depaul.edu wrote:

what os are you using? hat web server?

you see the translation in english or you find the contect of a
languages/xx.py file actually changing?

can you send me an example of the languages/xx.py file before and
after it gets overwritten?

Massimo

On Oct 6, 11:38 am, yamandu yamandu.co...@gmail.com wrote:

 Everytime I restart the we2py server my language file become in
 english again.
 What may cause this behavior?





-- 
www.yamachine.com
A máquina não para!


EL MELECH NEEMAN!


Re: [web2py] Re: Webgrid so strange!

2010-02-02 Thread Carlos Costa
Well, now it´s working again.
The tip you gave was very valuable!

I went to confirm what encoding I have been working with because
recently I have changed from editor and was not sure.
It´s utf8 rightnow but I changed from ascii yesterday.

As it works now, I think that was actually the problem, my editor was
in ascii mode and now is in utf8 (right) mode.
Hope it´s only this.

Thanks, Mr Freeze!


2010/2/2 mr.freeze nat...@freezable.com:
 Hmmm...The error you got was related to encoding:
 UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position
 57: ordinal not in range(128)'
 What language are you using?

 Can you post some code?

 On Feb 1, 1:25 pm, yamandu yamandu.co...@gmail.com wrote:
 First: I tried to write comment on web2pyslices but it gives me an
 error.

 Well, I got webgrid working.
 Then stopped.
 I restarted web2py and it worked again.
 And now it stopped again no matter what I do.

 The error is the following:
 NameError: global name 'T' is not defined
 on line 32:
 self.messages.confirm_delete = 'Tem certeza?

 The most strange to me is that I got the same error in the same line
 even if this line is commented.
 Is there come bug or it´s a dependency I passed over?

 --
 You received this message because you are subscribed to the Google Groups 
 web2py-users group.
 To post to this group, send email to web...@googlegroups.com.
 To unsubscribe from this group, send email to 
 web2py+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/web2py?hl=en.





-- 
yamachine.blogspot.com
A máquina não para!


Ani ben Elshadai!

-- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



<    1   2