[web2py] Re: insert a task into a scheduler of another app

2015-01-26 Thread Niphlod
there are no issues in sharing the scheduler db. Did you find any ?

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Strange behaviour with request.args(0)

2015-01-26 Thread Anthony
I think we'll need to see the code that generates the URL (i.e., where the 
request arg is created).

On Sunday, January 25, 2015 at 6:21:40 PM UTC-5, Ian Ryder wrote:

 Hi there, first post after a couple of months using web2py - really 
 enjoying it.

 I have a strange one though - I have a page where an ID is passed to the 
 controller through request.arg(0)

 80% of the time there's no issue, then seemingly randomly the value the 
 controller gets becomes 'images'. I've experimented with it and just 
 changing one character in the ID lets it come through OK so seems to be a 
 bug.

 I don't want to post the actual IDs here as they relate to real records in 
 a real externally visible system but happy to email off-list.

 Something anyone's seen before? Nothing special in my code I don't think:
 entity_id = request.args(0)
 if entity_id is None or entity_id == 'images':
 response.flash = entity_id
 return dict(timeline_events=[], supporter=None, staging_res=None, 
 source_data_server=None, journey_chart=None)

 Thanks
 Ian


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: web2py 2.9.12 is OUT

2015-01-26 Thread Maurice Waka
Great and Thanks


On Saturday, January 17, 2015 at 9:20:14 AM UTC+3, Massimo Di Pierro wrote:

 Changelog:

 - Modular DAL, thanks Giovanni
 - Added coverage support, thanks Niphlod
 - More tests, thanks Niphlod and Paolo Valleri
 - Added support for show_if in readonly sqlform, thanks Paolo
 - Tornado HTTPS support, thanks Diego
 - Improved scheduler, thanks Niphlod
 - Email timeout support
 - Made web2py's custom_import work with circular imports, thanks Jack Kuan
 - Added Portuguese, Catalan, and Burmese translations
 - Allow map_hyphen to work for application names, thanks Tim Nyborg
 - New module appconfig.py, thanks Niphlod
 - Added geospatial support to Teradata adaptor, thanks Andrew Willimott
 - Many bug fixes

 I am sure I am forgetting something. Thanks to all those who contributed. 
 The major change is the new modular DAL. I am sure this will break 
 something. So please report problems and will address them.




-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] web2py pagination

2015-01-26 Thread Maurice Waka
Suppose I have such a code:

def products():
  if len(request.args): page=int(request.args[0])
  else: page=0
  items_per_page=20
  limitby=(page*items_per_page,(page+1)*(items_per_page+1))
  qset = db(db['products']['name']!='None')
  grid = qset.select(limitby=limitby)
  return dict(grid=grid,page=page,items_per_page=items_per_page)

My view: 

{{extend 'layout.html'}}h2Browse available products:/h2
table class=products{{for i, row in enumerate(grid):}}{{if 
i==items_per_page:break}}trtd{{=row.name}}/td{{pass}}/tr/table
{{if page:}}a href={{=URL(args=[page-1])}}previous/a{{pass}}
{{if len(grid)items_per_page:}}a 
href={{=URL(args=[page+1])}}next/a{{pass}}

I have 'next' button and 'previous' button. How do I get the 'last' button(page 
with the last items on the list?
Regards

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Is Web2py suitable for my project

2015-01-26 Thread Richard Vézina
Didn't know bokeh thanks!

Richard

On Sun, Jan 25, 2015 at 10:43 PM, Kiran Subbaraman 
subbaraman.ki...@gmail.com wrote:

  Eric,
 The best option then is for you to try out the hello-world example in
 web2py. This will give you a good idea as to how to create a minimal web
 application, and also insert your code. You need to start here:
 http://web2py.com/books/default/chapter/29/03/overview#Say-hello
 The stuff you are talking about should be pretty straight-forward in
 web2py (or any other equivalent web framework).
 You need to create a model file (to store stuff in the db), a controller
 (where your plotting logic, like that of Bokeh / MPLD3, will reside), and
 the view (the html where you render your charts, or even embed javascript
 based plotting libraries - like d3js).
 Feel free to ask questions as you work your way through the initial web2py
 programming model.

 
 Kiran Subbaramanhttp://subbaraman.wordpress.com/about/

 On Mon, 26-01-2015 3:22 AM, Eric wrote:

 Kiran,

  Thanks for the response. I'm extremely new to any sort of web
 programming. I have a bit of Python experience. Unfortunately the response
 above was simply above my head. I've written file parsers in Python so I
 can handle that. I'm confident I can write the algorithms too. What I can't
 figure out is how to integrate a plotting utility like Bokeh or possibly
 MPLD3 (http://mpld3.github.io/index.html) into Web2py and get the plot to
 show up in a Web2py created page. I've seen a few examples of how to
 trigger a browser's file dialog, but don't know how to use that to get a
 file into the Python parsing script. I'm usually pretty good at finding
 resources on the web, but my general knowledge of web technologies is a
 problem.

  Eric

 On Sunday, January 25, 2015 at 3:24:18 AM UTC-6, Kiran Subbaraman wrote:

  I would use web2py for these requirements, because you get the
 authentication/authorization, sessions, DAL (for db access) capabilities
 out of the box.
 You probably need packages in addition to pydal (for DAL support), on top
 of Flask to accomplish this. Look at the gluino example to see what I mean:
 https://github.com/mdipierro/gluino

 
 Kiran Subbaramanhttp://subbaraman.wordpress.com/about/

 On Sat, 24-01-2015 9:53 PM, Eric wrote:

 Hi all,

  I'm new to web2py and have been working my way through the learning
 materials. I have a specific application and am wondering if web2py is a
 good choice for a framework or something simpler such as Flask.
 Specifically I want to create a web application (for an intranet) where a
 user would upload a data file using the standard browser file dialog, have
 it analyzed by an algorithm I've written in Python and then responses
 plotted on the page and also a file of results savable using the browsers
 standard save file dialog. I know enough Python to handle the file parsing,
 data analysis and result file generation. I'll need access to Python
 libraries such as Numpy. I've discovered Bokah (http://bokeh.pydata.org)
 as an attractive plotting library. They use Flask in their tutorial. I
 haven't found anything particularly clear about how to invoke the browser
 file dialogs. Eventually I'd like to use a database to archive the uploaded
 data files and resulting result files along with other information such as
 user, date, instrument serial number, etc.

  Thanks,

  Eric
  --
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 ---
 You received this message because you are subscribed to the Google Groups
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to web2py+un...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


   --
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 ---
 You received this message because you are subscribed to the Google Groups
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


  --
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 ---
 You received this message because you are subscribed to the Google Groups
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source 

[web2py] Record format and SQLFORM.factory

2015-01-26 Thread César Bustíos Benites
Hello! I have a table called *presupuesto *with a custom *format*:

db.define_table('presupuesto',
Field('jar', db.jar, label='JAR'),
Field('monto', 'decimal(11, 2)', label='Presupuesto inicial', 
requires=IS_NOT_EMPTY(error_message='Ingrese un monto para el 
presupuesto')),
Field('monto_mensual', 'decimal(11, 2)', label='Presupuesto mensual', 
compute=lambda r: Decimal(r.monto)/Decimal('12')),
Field('ano', 'integer', label='Año', 
requires=[IS_NOT_EMPTY(error_message='Ingrese el año'), 
IS_INT_IN_RANGE(1980, 2100, error_message='Año inválido')]),
format=lambda record: '%s %s' % (record.jar.nombre, record.ano)
)

I'm using the following SQLFORM.factory in a view:

@auth.requires_login()
def control_gastos():
form = SQLFORM.factory(
Field('Presupuesto', requires=IS_IN_DB(db, db.presupuesto)),
submit_button='Continuar',
table_name='presupuesto',
)
form.element(_type='submit')['_class'] = 'btn btn-success'
form.element('#presupuesto_Presupuesto')['_class'] = 'form-control'
form.element('#presupuesto_Presupuesto')['_style'] = 'width: 100%'
return dict(form=form)

Somehow, I was expecting that the records shown in the form were formatted 
as define in the table but that's not happening. Am I missing something?



Thanks,
César

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Checksum for download of web2py?

2015-01-26 Thread Massimo Di Pierro
We should post them. We will add them.

On Sunday, 25 January 2015 06:20:03 UTC-6, Benjamin wrote:

 Hello Group,

 Unfortunately, I am not able to find a checksum for the official download 
 on web2py.com.
 Is there a reason not to offer one, or is it just me being blind?

 Your answer is highly appreciated,
 Kindest regards,
 Benjamin


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] IMPORTANT - DO NOT POST ISSUE ON GOOGLE CODE

2015-01-26 Thread Massimo Di Pierro
We have a migration in process and we will be moving all the open issues 
form googlecode to gihub (thanks Niphlod for handling all of this). So 
until it is done please:


- don't touch existing issues on googlecode

- don't open new ones on googlecode

- wait a day or two for the complete migration

- don't open issues on github

- wait for our approval to start opening/modifying issues on github

Thanks for the understanding and sorry for the trouble. Everything will be 
better when done.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: What are the usual steps for designing a web2py application?

2015-01-26 Thread Richard Vézina
Strange requirement!!

On Sat, Jan 24, 2015 at 7:23 AM, Y yannick.hagm...@gmail.com wrote:

 In my case Facebook, LinkedIn, Google are not trustworhy (quite the
 opposite). I need - most importantly - to avoid that database entries of
 users can be attributed to users.
 The users should be mere abstract nodes with properties for me. It's the
 abstract node and its properties I'm interested in.

 On the other hand I need to know their adresses for billing them, I need
 to convince them, that I myself can't relate their personal information in
 the database to them. Maybe this two requirements are conflicting each
 other. What do you guys think? Is there a solution for this scenario?

 (user Jonathan) -- [raltes to] -- (user-node of X) --- [contains] ---
 {Properties: Age, Eyecolor}
   I   I
   (Biling)(Interest)

 /Y

 Well, web2py was designed with security in mind, such as using the auth
 machanisms, URL signing, etc.  Auth works with several methods, from
 tracking passwords in the database to using trusted servers to confirm you
 (CAS and RBAC with Facebook, LinkedIn, Google), use of Captchas, signed
 URLs, etc.

 If you think something is missing, describe what you need and see if
 someone already has an answer for it, or has suggestions to handle it
 easily.

 /dps


  --
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 ---
 You received this message because you are subscribed to the Google Groups
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: crash - session_pickled = pickle.dumps(self, pickle.HIGHEST_PROTOCOL) on 2.9.11

2015-01-26 Thread Niphlod
that's not a solution. it's making things slower as they were before.

On Monday, January 26, 2015 at 10:28:57 AM UTC+1, Dmitry Ermolaev wrote:

 solve^^
 replace all  pickle.dumps with:
 session_pickled = pickle.dumps(self) , pickle.HIGHEST_PROTOCOL)

 понедельник, 13 октября 2014 г., 20:22:57 UTC+3 пользователь Dmitry 
 Ermolaev написал:

 I use apache 2.2

 If use 2 and more apps - error will be raise for each that not got first 
 HTTP-request

 One app work normal

 Traceback (most recent call last):

   File C:\web2py-m\gluon\main.py, line 435, in wsgibase
 session.connect(request, response)
   File C:\web2py-m\gluon\globals.py, line 931, in connect
 session_pickled = pickle.dumps(self, pickle.HIGHEST_PROTOCOL)
 TypeError: 'NoneType' object is not callable


 If use rocked server - all work



-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] request_reset_password not returning a form

2015-01-26 Thread Ian W. Scott
When I click on Lost Password in the user menu I just get a page with a 
blank body. The url to which I'm forwarded seems right 
(http://ianwscott.webfactional.com/paideia/default/user/request_reset_password?_next=/paideia/default/index)
 
but there's no form on the page. It's as if the page controller is 
returning an empty dict. But I'm not getting any error message either.

I've looked through the page source and it's not that the form is 
hidden. It's just not being included in the page response. Other 
default/user forms are produced just fine: login, change_password, etc. So 
I can't figure out why request_reset_password returns nothing.

Since there's no error ticket it's very difficult for me to debug. Any 
suggestions?

Here is my setup for mail and the relevant auth settings (from 
controllers/db.py):

mail = Mail()
mail.settings.server = keydata['email_sender']  # 'logging' # SMTP server
mail.settings.sender = keydata['email_address']  # email
mail.settings.login = keydata['email_pass']  # credentials or None
current.mail = mail


auth.settings.mailer = mail# for user email verification
auth.settings.registration_requires_verification = False
auth.settings.registration_requires_approval = False
auth.messages.verify_email = 'Click on the link http://' \
+ request.env.http_host + URL('default', 'user', args=['verify_email']) 
\
+ '/%(key)s to verify your email'
auth.settings.reset_password_requires_verification = True
auth.messages.reset_password = 'Click on the link http://' \
+ request.env.http_host + URL('default', 'user', args=['reset_password'
])\
+ '/%(key)s to reset your password'



-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Dropdown lists

2015-01-26 Thread Omi Chiba
I have a three dropdown and the value will be dynamically changed using 
ajax. It's working fine but something is wrong. In second dropdown 
(id=lead_name), I specify jQuery('#model_name') but it's 
actually jQuery('#leadl_name') but then when the value for the second drop 
changed, the value disappear from the second and third. When I keep the 
current way (which is wrong name) it's working as expected Do you guys 
know what's wrong?

This is my view

form enctype=multipart/form-data action={{URL()}} method=post
tr
tdselect name='model_name' onchange=jQuery('#model_name'
).empty(); 
ajax('lead_ajax', ['model_name'], 'lead_name');
{{for model in models:}}
option value={{=model.Name}} 
{{= selected='selected' if str(model.Name)=
=request.vars.model_name else }}
{{=model.Name}}
/option
{{pass}}
/select/td
tdselect id='lead_name' name='lead_name' onchange=jQuery
('#model_name').empty(); 
ajax('block_ajax', ['lead_name'], 'block_name');
{{for lead in leads:}}
option value={{=lead.Name}} 
{{= selected='selected' if str(lead.Name)=
=request.vars.lead_name else }}
{{=lead.Name}}
/option
{{pass}}
/select/td
 tdselect id='block_name' name='block_name'
{{for block in blocks:}}
option value={{=block.Name}} 
{{= selected='selected' if str(block.Name)=
=request.vars.block_name else }}
{{=block.Name}}
/option
{{pass}}
/select/td
td/td
td/td
tdinput type=submit value='Submit'/td
/tr
/form

My controller

def index():
response.title='KR Quick Delivery Service'

if request.vars.model_name: 
lists = db((db.KR_Product.Model==request.vars.model_name)  (db.
KR_Product.Lead==request.vars.lead_name)  (db.KR_Product.Block==request.
vars.block_name)).select(db.KR_Product.ALL)
else:
lists=''
models = db().select(db.KR_Model.ALL)
leads = db(db.KR_Lead.ModelName == '20').select(db.KR_Lead.ALL)
blocks = db(db.KR_Block.LeadName == '01').select(db.KR_Block.ALL)

return dict(lists=lists,models=models,leads=leads,blocks=blocks)

def lead_ajax():
leads = db(db.KR_Lead.ModelName==request.vars.model_name).select(db.
KR_Lead.ALL)
result = ''
for lead in leads:
result += option value=' + lead.Name + ' + lead.Name + 
/option  
return XML(result)

def block_ajax():
blocks = db(db.KR_Block.LeadName==request.vars.lead_name).select(db.
KR_Block.ALL)
result = ''
for block in blocks:
result += option value=' + block.Name + ' + block.Name + 
/option  
return XML(result)



-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] How to temporarily disable record versioning in a scheduler task

2015-01-26 Thread Antonio Salazar
I have a scheduled task which ocassionally updates a lot of records in a 
versioned table. I'd like to disable record versioning only inside the task.

I understand that record version can be activated per table and thus 
conditioned, but since the models run before eveything, I can't figure how 
to disable it when the task starts.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Record format and SQLFORM.factory

2015-01-26 Thread Niphlod
where are you telling to SQLFORM.factory the representation of the record ? 

On Monday, January 26, 2015 at 5:09:31 PM UTC+1, César Bustíos Benites 
wrote:

 Hello! I have a table called *presupuesto *with a custom *format*:

 db.define_table('presupuesto',
 Field('jar', db.jar, label='JAR'),
 Field('monto', 'decimal(11, 2)', label='Presupuesto inicial', requires
 =IS_NOT_EMPTY(error_message='Ingrese un monto para el presupuesto')),
 Field('monto_mensual', 'decimal(11, 2)', label='Presupuesto mensual', 
 compute=lambda r: Decimal(r.monto)/Decimal('12')),
 Field('ano', 'integer', label='Año', requires=[IS_NOT_EMPTY(
 error_message='Ingrese el año'), IS_INT_IN_RANGE(1980, 2100, error_message
 ='Año inválido')]),
 format=lambda record: '%s %s' % (record.jar.nombre, record.ano)
 )


 I'm using the following SQLFORM.factory in a view:

 @auth.requires_login()
 def control_gastos():
 form = SQLFORM.factory(
 Field('Presupuesto', requires=IS_IN_DB(db, db.presupuesto)),
 submit_button='Continuar',
 table_name='presupuesto',
 )
 form.element(_type='submit')['_class'] = 'btn btn-success'
 form.element('#presupuesto_Presupuesto')['_class'] = 'form-control'
 form.element('#presupuesto_Presupuesto')['_style'] = 'width: 100%'
 return dict(form=form)


 Somehow, I was expecting that the records shown in the form were formatted 
 as define in the table but that's not happening. It's only showing IDs:


 https://lh6.googleusercontent.com/-HVtGNOVneTI/VMZm_thtOTI/YFs/YrDCU2mdVLI/s1600/Screenshot%2Bfrom%2B2015-01-26%2B11%3A09%3A18.png

 What am I missing?


 Thanks,
 César


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: What are the usual steps for designing a web2py application?

2015-01-26 Thread Luc Chase
Your question refers to after the basic requirements are known?

I'd interested to hear from @Massimo and others about the scope for using 
Web2py as an analysis  design tool via rapid functional-prototyping tool ( 
including instead of wireframes )  leading to final production version 
of the software. i.e. Not throw away prototypes.  
Is it rapid enough for iteratively re-working and evolving ideas?





On Tuesday, 20 January 2015 13:18:23 UTC, Y wrote:

 Hello

 What are the usual steps for designing a web2py application?

 Best regards


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: web2py pagination

2015-01-26 Thread Cássio Botaro
An example: http://mindbending.org/pt/paginando-consultas-web2py

unfortunately in portuguese, but the code is clear.


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Record format and SQLFORM.factory

2015-01-26 Thread Niphlod
uhm. maybe you're missing the point that SQLFORM.factory() COMPLETELY 
forgets about models... 
you pass Fields and that's all that factory() knows about it. 
That's the whole point of factory()

On Monday, January 26, 2015 at 10:22:53 PM UTC+1, César Bustíos Benites 
wrote:

 Hello Niphlod, do I have to do that? I think I'm missing the point with 
 the *format* parameter of *define_table*.


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Date format

2015-01-26 Thread Sh. Moiz M. Husain Bhai Nagpurwala
I want to Display date as *Tuesday, January 27, 2015*

How to do that.

Thanks.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: represents currency format

2015-01-26 Thread Massimo Di Pierro
Notice this can also be done in JS and it will make your code cleaner: 
http://numeraljs.com/

On Monday, 26 January 2015 18:01:08 UTC-6, Niphlod wrote:

 in the view, you have 

 td style=text-align: right;{{=list.UnitPrice}}/td

 use instead

 td style=text-align: 
 right;{{=db.KR_Product.UnitPrice.represent(list.UnitPrice)}}/td

 should work without issues.

 or read about render() here 
 http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Rendering-rows-using-represent


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Strange behaviour with request.args(0)

2015-01-26 Thread Ian Ryder
Just to add, I swapped to use request.vars and it's all fine with the same 
IDs...so I'm rolling but a mystery with .args :)

On Monday, January 26, 2015 at 10:21:40 AM UTC+11, Ian Ryder wrote:

 Hi there, first post after a couple of months using web2py - really 
 enjoying it.

 I have a strange one though - I have a page where an ID is passed to the 
 controller through request.arg(0)

 80% of the time there's no issue, then seemingly randomly the value the 
 controller gets becomes 'images'. I've experimented with it and just 
 changing one character in the ID lets it come through OK so seems to be a 
 bug.

 I don't want to post the actual IDs here as they relate to real records in 
 a real externally visible system but happy to email off-list.

 Something anyone's seen before? Nothing special in my code I don't think:
 entity_id = request.args(0)
 if entity_id is None or entity_id == 'images':
 response.flash = entity_id
 return dict(timeline_events=[], supporter=None, staging_res=None, 
 source_data_server=None, journey_chart=None)

 Thanks
 Ian


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Checksum for download of web2py?

2015-01-26 Thread Benjamin
Thank you very much for your answer, Mr Di Pierro.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Is Web2py suitable for my project

2015-01-26 Thread Eric
Richard,

If you try Bokeh and/or mpld3 please tell me how it went. I'll need 
scientific plots in my application and would welcome any hints on how to 
accomplish this in Web2py.

Eric

On Monday, January 26, 2015 at 9:30:48 AM UTC-6, Richard wrote:

 Didn't know bokeh thanks!

 Richard

 On Sun, Jan 25, 2015 at 10:43 PM, Kiran Subbaraman subbaram...@gmail.com 
 javascript: wrote:

  Eric,
 The best option then is for you to try out the hello-world example in 
 web2py. This will give you a good idea as to how to create a minimal web 
 application, and also insert your code. You need to start here: 
 http://web2py.com/books/default/chapter/29/03/overview#Say-hello
 The stuff you are talking about should be pretty straight-forward in 
 web2py (or any other equivalent web framework).
 You need to create a model file (to store stuff in the db), a controller 
 (where your plotting logic, like that of Bokeh / MPLD3, will reside), and 
 the view (the html where you render your charts, or even embed javascript 
 based plotting libraries - like d3js).
 Feel free to ask questions as you work your way through the initial 
 web2py programming model. 

 
 Kiran Subbaramanhttp://subbaraman.wordpress.com/about/

 On Mon, 26-01-2015 3:22 AM, Eric wrote:
  
 Kiran, 

  Thanks for the response. I'm extremely new to any sort of web 
 programming. I have a bit of Python experience. Unfortunately the response 
 above was simply above my head. I've written file parsers in Python so I 
 can handle that. I'm confident I can write the algorithms too. What I can't 
 figure out is how to integrate a plotting utility like Bokeh or possibly 
 MPLD3 (http://mpld3.github.io/index.html) into Web2py and get the plot 
 to show up in a Web2py created page. I've seen a few examples of how to 
 trigger a browser's file dialog, but don't know how to use that to get a 
 file into the Python parsing script. I'm usually pretty good at finding 
 resources on the web, but my general knowledge of web technologies is a 
 problem.

  Eric

 On Sunday, January 25, 2015 at 3:24:18 AM UTC-6, Kiran Subbaraman wrote: 

  I would use web2py for these requirements, because you get the 
 authentication/authorization, sessions, DAL (for db access) capabilities 
 out of the box.
 You probably need packages in addition to pydal (for DAL support), on 
 top of Flask to accomplish this. Look at the gluino example to see what I 
 mean: https://github.com/mdipierro/gluino

 
 Kiran Subbaramanhttp://subbaraman.wordpress.com/about/

 On Sat, 24-01-2015 9:53 PM, Eric wrote:
  
 Hi all, 

  I'm new to web2py and have been working my way through the learning 
 materials. I have a specific application and am wondering if web2py is a 
 good choice for a framework or something simpler such as Flask. 
 Specifically I want to create a web application (for an intranet) where a 
 user would upload a data file using the standard browser file dialog, have 
 it analyzed by an algorithm I've written in Python and then responses 
 plotted on the page and also a file of results savable using the browsers 
 standard save file dialog. I know enough Python to handle the file parsing, 
 data analysis and result file generation. I'll need access to Python 
 libraries such as Numpy. I've discovered Bokah (http://bokeh.pydata.org) 
 as an attractive plotting library. They use Flask in their tutorial. I 
 haven't found anything particularly clear about how to invoke the browser 
 file dialogs. Eventually I'd like to use a database to archive the uploaded 
 data files and resulting result files along with other information such as 
 user, date, instrument serial number, etc.

  Thanks,

  Eric
  -- 
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 --- 
 You received this message because you are subscribed to the Google 
 Groups web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to web2py+un...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


   -- 
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 --- 
 You received this message because you are subscribed to the Google Groups 
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to web2py+un...@googlegroups.com javascript:.
 For more options, visit https://groups.google.com/d/optout.


  -- 
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 --- 
 You received this message because you are subscribed to the Google Groups 
 

Re: [web2py] Re: HELP!! Another upgrading failed for Apache running web2py

2015-01-26 Thread Niphlod
uhm. apache is relly something nasty when it comes to a few things 
like 

https://code.google.com/p/modwsgi/wiki/ApplicationIssues

and 

https://code.google.com/p/modwsgi/wiki/IssuesWithPickleModule

wondering if it's a problem-per-se or not.

On Friday, January 23, 2015 at 11:46:08 PM UTC+1, Omi Chiba wrote:

 Please delete my previous forum post from your emails : )

 On Friday, January 23, 2015 at 4:18:03 PM UTC-6, Massimo Di Pierro wrote:

 Want to stop by my office next week? I'd like to take a look.

 On Friday, 23 January 2015 15:02:21 UTC-6, Omi Chiba wrote:

 OK, so I can fix this TypeError: can't pickle function objects error by 
 the solution described here. (Adding AllowOverride None  in apache config 
 file

 https://groups.google.com/forum/#!searchin/web2py/apache$20pickle/web2py/UYqS8nIkeQY/ib8Vjshs7JEJ

 This solve one problem! So I don't have any problem with web2py 2.4.7 
 right now,
 I was hoping this also solve the problem with 2.9.12 but it doesn't. I 
 got a same error.

 The ticket mentioned in the linked forum post is still opened, 
 https://code.google.com/p/web2py/issues/detail?id=1655

 So I think this is related issue which is not solved yet.


 On Friday, January 23, 2015 at 10:05:06 AM UTC-6, Omi Chiba wrote:

 I mean file is created anyway. It's just a error ticket 

  File C:\Python27\Lib\copy_reg.py, line 70, in _reduce_ex
 raise TypeError, can't pickle %s objects % base.__name__
 TypeError: can't pickle function objects

 On Friday, January 23, 2015 at 9:26:18 AM UTC-6, Omi Chiba wrote:

 Um... more weird things. I'm using version 2.4.7 now and I got a 
 similar error when I try to create view.

 Versionweb2py™Version 
 2.4.7-stable+timestamp.2013.05.24.17.48.47PythonPython 
 2.7.4: C:\UniServer\usr\local\apache2\bin\Apache.exe (prefix: C:\Python27)
 Traceback

 1.
 2.
 3.
 4.
 5.
 6.
 7.
 8.
 9.
 10.
 11.
 12.
 13.

 Traceback (most recent call last):
   File C:\web2py\gluon\main.py, line 606, in wsgibase
 session._try_store_in_cookie_or_file(request, response)
   File C:\web2py\gluon\globals.py, line 757, in 
 _try_store_in_cookie_or_file
 self._try_store_in_file(request, response)
   File C:\web2py\gluon\globals.py, line 763, in _try_store_in_file
 if not response.session_id or self._forget or self._unchanged():
   File C:\web2py\gluon\globals.py, line 719, in _unchanged
 session_pickled = cPickle.dumps(dict(self))
   File C:\Python27\Lib\copy_reg.py, line 70, in _reduce_ex
 raise TypeError, can't pickle %s objects % base.__name__
 TypeError: can't pickle function objects


 On Friday, January 23, 2015 at 8:54:23 AM UTC-6, Omi Chiba wrote:

 Yes. I stop and start apache when I replace web2py folder.

 After trouble shooting I found

 1. http://thksupport.com/welcome/default/index = OK
 2. https://thksupport.com/welcome/default/index = NG
 3. https://thksupport.com/admin/default/index = NG

 So any https request become NG for the same error

 Then, Restart Apache server

 1. http://thksupport.com/welcome/default/index = NG
 2. https://thksupport.com/welcome/default/index = OK
 3. https://thksupport.com/admin/default/index = OK

 Now all http request become error!!

 Then, Restart Apache server Again... all https request become error.

 Previous version (2.4.6) is working fine both http and https no 
 problem.




 On Thursday, January 22, 2015 at 11:21:49 PM UTC-6, Massimo Di Pierro 
 wrote:

 Did you restart the web server?

 I do not think this has anything to do with cookies. This has to do 
 with pickle being None and it cannot be because it is clearly imported. 
 Something very bad happened to your import. Make sure you stop and 
 start 
 again the web server. If you use mod_proxy also stop and start python.


 On Thursday, 22 January 2015 17:27:00 UTC-6, Omi Chiba wrote:

 Please see my quick test result below. I'm not sure if it's related 
 to sessions and/or cookies because I always failed when I access with 
 https.

 1st test 

 1. delete all the cookie on my browser and delete sessions from all 
 the app. 
 2. open the website = display welcome app = ok
 3. tried to access admin app with https = NG (Same error ticket.)

 2nd test

 1. delete all the cookie on my browser and delete sessions from all 
 the app. 
 2. tried to access admin app with https = NG (Same error ticket.)

 3rd Test

 1. delete all the cookie on my browser and delete sessions from all 
 the app. 
 2. Open browser incognito mode 
 3. open the website = display welcome app = ok
 4. tried to access admin app with https = NG (Same error ticket.)


 On Thu, Jan 22, 2015 at 5:02 PM, Massimo Di Pierro 
 massimo@gmail.com wrote:

 I am pretty sure that is what web2py does. If sessions are deleted 
 the cookie is ignored. Are these session in cookies?

 On Thursday, 22 January 2015 11:35:56 UTC-6, Leonel Câmara wrote:

 Basically you have an old cookie in your browser that's messing 
 things up. Obviously it's also a bug with web2py as it should just 
 

[web2py] Re: IMPORTANT - DO NOT POST ISSUE ON GOOGLE CODE

2015-01-26 Thread Massimo Di Pierro
Thank you Niphlod, this is an amazon job.

Massimo

On Monday, 26 January 2015 17:00:52 UTC-6, Niphlod wrote:

 migration completed.

 You can find in the original googlecode issue a last message by me linking 
 to the newly migrated issue on github, and on the github issue the link to 
 the original issue on googlecode.

 From now on:
 - googlecode issues WON'T be looked at
 - please post ONLY issues on https://github.com/web2py/web2py/issues
 - moreover, if your issues are relative to DAL, now it lives in a 
 different repository, so the issues should be posted to 
 https://github.com/web2py/pydal/issues 

 Bye


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Strange behaviour with request.args(0)

2015-01-26 Thread Leonel Câmara
Hey,

What do you have in your web2py's routes.py?

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: crash - session_pickled = pickle.dumps(self, pickle.HIGHEST_PROTOCOL) on 2.9.11

2015-01-26 Thread Dmitry Ermolaev
solve^^
replace all  pickle.dumps with:
session_pickled = pickle.dumps(self) , pickle.HIGHEST_PROTOCOL)

понедельник, 13 октября 2014 г., 20:22:57 UTC+3 пользователь Dmitry 
Ermolaev написал:

 I use apache 2.2

 If use 2 and more apps - error will be raise for each that not got first 
 HTTP-request

 One app work normal

 Traceback (most recent call last):

   File C:\web2py-m\gluon\main.py, line 435, in wsgibase
 session.connect(request, response)
   File C:\web2py-m\gluon\globals.py, line 931, in connect
 session_pickled = pickle.dumps(self, pickle.HIGHEST_PROTOCOL)
 TypeError: 'NoneType' object is not callable


 If use rocked server - all work



-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: web2py 2.9.12 is OUT

2015-01-26 Thread Dmitry Ermolaev
solved!
replase all pickle.dumps

*session_pickled = pickle.dumps(self) ##, pickle.HIGHEST_PROTOCOL)*


понедельник, 26 января 2015 г., 8:15:42 UTC+3 пользователь Dmitry Ermolaev 
написал:


 Traceback (most recent call last):
   File C:\web2py-m\gluon\main.py, line 435, in wsgibase
 session.connect(request, response)
   File C:\web2py-m\gluon\globals.py, line 934, in connect
 session_pickled = pickle.dumps(self, pickle.HIGHEST_PROTOCOL)
 TypeError: 'NoneType' object is not callable



-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: crash - session_pickled = pickle.dumps(self, pickle.HIGHEST_PROTOCOL) on 2.9.11

2015-01-26 Thread Dmitry Ermolaev
please insert here code

вторник, 2 декабря 2014 г., 17:13:55 UTC+3 пользователь Remco Boerma 
написал:

 What solved my issue was registering with copy_reg. 
 I store an instance  of my own class in the session, which now brakes 
 without a registered reduction function. 
 Though the class implements __getstate__ and __setstate__ apparently that 
 isn't enough anymore. 
 For docs checkout 
 https://docs.python.org/2/library/pickle.html#module-pickle and 
 https://docs.python.org/2/library/copy_reg.html

 Hope this helps. 


 Op woensdag 19 november 2014 15:54:13 UTC+1 schreef Edwin van de Ven:



 Op maandag 13 oktober 2014 19:22:57 UTC+2 schreef Dmitry Ermolaev:

 I del al files in /sessions and update to 2.9.11

 Traceback (most recent call last):
   File C:\web2py-m\gluon\main.py, line 435, in wsgibase
 session.connect(request, response)
   File C:\web2py-m\gluon\globals.py, line 931, in connect
 session_pickled = pickle.dumps(self, pickle.HIGHEST_PROTOCOL)
 TypeError: 'NoneType' object is not callable


 I'm getting the exact same error after upgrading to 2.9.11. My sessions 
 directory is also empty. Does anyone else experience similar behavior? 



-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: crash - session_pickled = pickle.dumps(self, pickle.HIGHEST_PROTOCOL) on 2.9.11

2015-01-26 Thread Dmitry Ermolaev
not worked ((
I clear all cookies - error again

понедельник, 13 октября 2014 г., 21:00:32 UTC+3 пользователь Leonel Câmara 
написал:

 You need to delete your browser cookies too. That said, this may also be a 
 web2py error because it shouldn't break just because the browser gives him 
 a non-existing session cookie.


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: crash - session_pickled = pickle.dumps(self, pickle.HIGHEST_PROTOCOL) on 2.9.11

2015-01-26 Thread Dmitry Ermolaev
why no error if rocked-server used and error if apache used ?

why first aplication that got request HTTP worked but all others error?

почему под сервером строенным все приложения работают а под сервером Апачи 
- нет
почему работает только то приложение, которое получило первым HTTP-запрос, 
а все остальные с ошибкой ответы дают?

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: request_reset_password not returning a form

2015-01-26 Thread Cynthia Butler
It looks like your 
mail.settings.login = keydata['email_pass'] 
may be just a password.
I'm guessing, it depends on what the value of 'email_pass' is.

It needs to be the full user@domain:password, like this:
name@maildomain:password 

On Monday, January 26, 2015 at 1:04:05 PM UTC-7, Ian W. Scott wrote:

 When I click on Lost Password in the user menu I just get a page with a 
 blank body. The url to which I'm forwarded seems right (
 http://ianwscott.webfactional.com/paideia/default/user/request_reset_password?_next=/paideia/default/index)
  
 but there's no form on the page. It's as if the page controller is 
 returning an empty dict. But I'm not getting any error message either.

 I've looked through the page source and it's not that the form is 
 hidden. It's just not being included in the page response. Other 
 default/user forms are produced just fine: login, change_password, etc. So 
 I can't figure out why request_reset_password returns nothing.

 Since there's no error ticket it's very difficult for me to debug. Any 
 suggestions?

 Here is my setup for mail and the relevant auth settings (from 
 controllers/db.py):

 mail = Mail()
 mail.settings.server = keydata['email_sender']  # 'logging' # SMTP server
 mail.settings.sender = keydata['email_address']  # email
 mail.settings.login = keydata['email_pass']  # credentials or None
 current.mail = mail


 auth.settings.mailer = mail# for user email 
 verification
 auth.settings.registration_requires_verification = False
 auth.settings.registration_requires_approval = False
 auth.messages.verify_email = 'Click on the link http://' \
 + request.env.http_host + URL('default', 'user', args=['verify_email'
 ]) \
 + '/%(key)s to verify your email'
 auth.settings.reset_password_requires_verification = True
 auth.messages.reset_password = 'Click on the link http://' \
 + request.env.http_host + URL('default', 'user', args=[
 'reset_password'])\
 + '/%(key)s to reset your password'





-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: represents currency format

2015-01-26 Thread Omi Chiba
Can you give me more details? I'm not sure if directly call it from view or
controller. I apprecite if you can provide a sample code with the
following.  db.KR_Product.UnitPrice.represent = lambda value, row: '$ %.2f'
% (0.0 if value == None else value)

On Mon, Jan 26, 2015 at 4:56 PM, Niphlod niph...@gmail.com wrote:

 if you're not using web2py's facilities (SQLTABLE, grid, rows.render(),
 etc), you have to call represent directly

 {{=db.KR_Product.UnitPrice.represent(list.UnitPrice)}}



 On Monday, January 26, 2015 at 11:39:07 PM UTC+1, Omi Chiba wrote:

 I want to show the UnitPrice like $1,000,00 but it shows 1000.00.

 *Model*

 db.define_table('KR_Product',
 Field('ProductCode', length=15),
 Field('PartNumber', length=50),
 Field('SubA', length=15),
 Field('SubB', length=15),
 Field('UnitPrice', 'decimal(18,2)'),
 Field('Quantity', 'decimal(18,0)'),
 Field('Weight', 'decimal(18,3)'),
 Field('LeadTime', length=50),
 Field('Model', length=2),
 Field('Lead', length=2),
 Field('Block', length=1),
 Field('Stroke', length=4),
 Field('Grade', length=1),
 Field('Cover', length=1),
 Field('Sensor', length=1),
 Field('Housing', length=1),
 Field('Flange', length=1),
 Field('Description', length=500)
 )

 db.KR_Product.UnitPrice.represent = lambda value, row: '$ %.2f' % (0.0
 if value == None else value)


 *View*

 div id=container
 div id=wrapper
 table class=table table-hover
 thead
 thPart Number/th
 thLead Time/th
 th style=text-align: right;span
 class='right'Quantity/th
 th style=text-align: right;span class='right'Unit
 Price($)/th
 th style=text-align: right;span
 class='right'Weight(kg)/th
   /thead
 tbody
  {{for list in lists:}}
 tr
 td{{=list.PartNumber}}/td
 td{{=list.LeadTime}}/td
 td style=text-align: right;{{=list.Quantity}}/td
 td style=text-align: right;{{=list.UnitPrice}}/td
 td style=text-align: right;{{=list.Weight}}/td
 /tr
 {{pass}}
 /tbody
 /table
 /div
 /div

  --
 Resources:
 - http://web2py.com
 - http://web2py.com/book (Documentation)
 - http://github.com/web2py/web2py (Source code)
 - https://code.google.com/p/web2py/issues/list (Report Issues)
 ---
 You received this message because you are subscribed to a topic in the
 Google Groups web2py-users group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/web2py/bJHpQE5O74g/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to
 web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] represents currency format

2015-01-26 Thread Omi Chiba
I want to show the UnitPrice like $1,000,00 but it shows 1000.00. 

*Model*

db.define_table('KR_Product',
Field('ProductCode', length=15),
Field('PartNumber', length=50),
Field('SubA', length=15),
Field('SubB', length=15),
Field('UnitPrice', 'decimal(18,2)'),
Field('Quantity', 'decimal(18,0)'),
Field('Weight', 'decimal(18,3)'),
Field('LeadTime', length=50),
Field('Model', length=2),
Field('Lead', length=2),
Field('Block', length=1),
Field('Stroke', length=4),
Field('Grade', length=1),
Field('Cover', length=1),
Field('Sensor', length=1),
Field('Housing', length=1),
Field('Flange', length=1),
Field('Description', length=500)
)

db.KR_Product.UnitPrice.represent = lambda value, row: '$ %.2f' % (0.0 if 
value == None else value)


*View*

div id=container
div id=wrapper
table class=table table-hover
thead
thPart Number/th
thLead Time/th
th style=text-align: right;span 
class='right'Quantity/th
th style=text-align: right;span class='right'Unit 
Price($)/th
th style=text-align: right;span 
class='right'Weight(kg)/th
  /thead
tbody
 {{for list in lists:}}
tr
td{{=list.PartNumber}}/td
td{{=list.LeadTime}}/td
td style=text-align: right;{{=list.Quantity}}/td
td style=text-align: right;{{=list.UnitPrice}}/td
td style=text-align: right;{{=list.Weight}}/td   
/tr
{{pass}}
/tbody
/table
/div
/div

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: represents currency format

2015-01-26 Thread Niphlod
if you're not using web2py's facilities (SQLTABLE, grid, rows.render(), 
etc), you have to call represent directly

{{=db.KR_Product.UnitPrice.represent(list.UnitPrice)}}



On Monday, January 26, 2015 at 11:39:07 PM UTC+1, Omi Chiba wrote:

 I want to show the UnitPrice like $1,000,00 but it shows 1000.00. 

 *Model*

 db.define_table('KR_Product',
 Field('ProductCode', length=15),
 Field('PartNumber', length=50),
 Field('SubA', length=15),
 Field('SubB', length=15),
 Field('UnitPrice', 'decimal(18,2)'),
 Field('Quantity', 'decimal(18,0)'),
 Field('Weight', 'decimal(18,3)'),
 Field('LeadTime', length=50),
 Field('Model', length=2),
 Field('Lead', length=2),
 Field('Block', length=1),
 Field('Stroke', length=4),
 Field('Grade', length=1),
 Field('Cover', length=1),
 Field('Sensor', length=1),
 Field('Housing', length=1),
 Field('Flange', length=1),
 Field('Description', length=500)
 )

 db.KR_Product.UnitPrice.represent = lambda value, row: '$ %.2f' % (0.0 if 
 value == None else value)


 *View*

 div id=container
 div id=wrapper
 table class=table table-hover
 thead
 thPart Number/th
 thLead Time/th
 th style=text-align: right;span 
 class='right'Quantity/th
 th style=text-align: right;span class='right'Unit 
 Price($)/th
 th style=text-align: right;span 
 class='right'Weight(kg)/th
   /thead
 tbody
  {{for list in lists:}}
 tr
 td{{=list.PartNumber}}/td
 td{{=list.LeadTime}}/td
 td style=text-align: right;{{=list.Quantity}}/td
 td style=text-align: right;{{=list.UnitPrice}}/td
 td style=text-align: right;{{=list.Weight}}/td   
 /tr
 {{pass}}
 /tbody
 /table
 /div
 /div


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: IMPORTANT - DO NOT POST ISSUE ON GOOGLE CODE

2015-01-26 Thread Niphlod
migration completed.

You can find in the original googlecode issue a last message by me linking 
to the newly migrated issue on github, and on the github issue the link to 
the original issue on googlecode.

From now on:
- googlecode issues WON'T be looked at
- please post ONLY issues on https://github.com/web2py/web2py/issues
- moreover, if your issues are relative to DAL, now it lives in a different 
repository, so the issues should be posted to 
https://github.com/web2py/pydal/issues 

Bye

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: put signature on custom auth table

2015-01-26 Thread 黄祥
thanks cynthia for the trick. i use custom auth table for that.
e.g.
auth.settings.extra_fields['auth_user']= [
Field('name') ]

# create all tables needed by auth if not custom tables
auth.define_tables(username = True, signature = True)

 custom_auth_table 
custom_auth_table = db[auth.settings.table_user_name]

# format
custom_auth_table._format = '%(name)s'
# readable
custom_auth_table.first_name.readable = False
custom_auth_table.last_name.readable = False
# writable
custom_auth_table.first_name.writable = False
custom_auth_table.last_name.writable = False

auth.settings.table_user = custom_auth_table


best regards,
stifan

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: represents currency format

2015-01-26 Thread Niphlod
in the view, you have 

td style=text-align: right;{{=list.UnitPrice}}/td

use instead

td style=text-align: 
right;{{=db.KR_Product.UnitPrice.represent(list.UnitPrice)}}/td

should work without issues.

or read about render() here 
http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Rendering-rows-using-represent

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Record format and SQLFORM.factory

2015-01-26 Thread César Bustíos Benites
Hello Niphlod, do I have to do that? I think I'm missing the point with the 
*format* parameter of *define_table*.

On Monday, January 26, 2015 at 3:01:09 PM UTC-5, Niphlod wrote:

 where are you telling to SQLFORM.factory the representation of the record 
 ? 

 On Monday, January 26, 2015 at 5:09:31 PM UTC+1, César Bustíos Benites 
 wrote:

 Hello! I have a table called *presupuesto *with a custom *format*:

 db.define_table('presupuesto',
 Field('jar', db.jar, label='JAR'),
 Field('monto', 'decimal(11, 2)', label='Presupuesto inicial', 
 requires=IS_NOT_EMPTY(error_message='Ingrese un monto para el 
 presupuesto')),
 Field('monto_mensual', 'decimal(11, 2)', label='Presupuesto mensual', 
 compute=lambda r: Decimal(r.monto)/Decimal('12')),
 Field('ano', 'integer', label='Año', requires=[IS_NOT_EMPTY(
 error_message='Ingrese el año'), IS_INT_IN_RANGE(1980, 2100, 
 error_message='Año inválido')]),
 format=lambda record: '%s %s' % (record.jar.nombre, record.ano)
 )


 I'm using the following SQLFORM.factory in a view:

 @auth.requires_login()
 def control_gastos():
 form = SQLFORM.factory(
 Field('Presupuesto', requires=IS_IN_DB(db, db.presupuesto)),
 submit_button='Continuar',
 table_name='presupuesto',
 )
 form.element(_type='submit')['_class'] = 'btn btn-success'
 form.element('#presupuesto_Presupuesto')['_class'] = 'form-control'
 form.element('#presupuesto_Presupuesto')['_style'] = 'width: 100%'
 return dict(form=form)


 Somehow, I was expecting that the records shown in the form were 
 formatted as define in the table but that's not happening. It's only 
 showing IDs:


 https://lh6.googleusercontent.com/-HVtGNOVneTI/VMZm_thtOTI/YFs/YrDCU2mdVLI/s1600/Screenshot%2Bfrom%2B2015-01-26%2B11%3A09%3A18.png

 What am I missing?


 Thanks,
 César



-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.