[web2py] Re: why you should upgrade to web2py 2.13.4

2016-12-23 Thread Massimo Di Pierro
Can you provide an example of the incompatibility?

On Wednesday, 21 December 2016 22:13:17 UTC-6, Rodrigo attique santana 
wrote:
>
>
> Hello, I recently upgraded my version of web2py to 2.13, however I am 
> having compatibility issues on projects created in version 2.11, which do 
> not run in this version. The same is true for projects created in version 
> 2.13.
>
> Em sábado, 26 de dezembro de 2015 06:22:27 UTC-2, Massimo Di Pierro 
> escreveu:
>>
>> There are many reasons you should upgrade, depending on which version you 
>> are using now:
>>
>> - to help us make sure we did not break backward compatibility. If your 
>> existing app does not work with 2.13.4 (and it should) you give us a chance 
>> to fix the problem. If no, any potential incompatibility will propagate 
>> forward making it more difficult for us to fix it later, and more difficult 
>> for you to upgrade.
>>
>> - to take advantage of new features. For example the awesome JWT feature 
>> that allows to create API tokens and use them for authentication without 
>> hitting the database.
>>
>> - there is also an important security bug fix in 2.13.4 related to 
>> auth.settings.registration_requires_approval=True. The bug allows a newly 
>> registered user to bypass the approval process and approve himself/herself. 
>> Under come conditions. This is now fixed.
>>
>> Massimo
>>
>

-- 
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 not connect to Oracle DB (error DAL)

2016-12-23 Thread ratlionstasus
good day. learn web2py. installed, configured server to connect to 
orcle,but cannot connect through dal, with sqlplus connects fine. line 116, 
in the connector back.driver.connect(URI,**driver_args) DatabaseError: 
ORA-12154: TNS:could not resolve the connection identifier specified

-- 
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: How to check if expression is Aggregate?

2016-12-23 Thread Jurgis Pralgauskis
Yes, I did --recursive, as in description..

2016-12-24 00:42 "Anthony"  rašė:

> On Friday, December 23, 2016 at 11:34:00 AM UTC-5, Jurgis Pralgauskis
> wrote:
>>
>> Hi,
>>
>> I used git clone  from https://github.com/web2py/web2py.git -- that is
>> probably problem
>> adapter always prints as:  > 0x7fc701680450>
>>
>
> PyDAL is now in a separate repository, so you have to do "git clone
> --recursive" to get the PyDAL.
>
> Anthony
>
> --
> 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/0IvASrrIDkA/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.


Re: [web2py] Re: How to check if expression is Aggregate?

2016-12-23 Thread Anthony
On Friday, December 23, 2016 at 11:34:00 AM UTC-5, Jurgis Pralgauskis wrote:
>
> Hi, 
>
> I used git clone  from https://github.com/web2py/web2py.git -- that is 
> probably problem
> adapter always prints as:   0x7fc701680450>
>

PyDAL is now in a separate repository, so you have to do "git clone 
--recursive" to get the PyDAL.

Anthony

-- 
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: Issues with record versioning

2016-12-23 Thread Anthony

>
> 2) the user & time are not recorded on the modified_on, modified_by columns
>

How are you creating/updating the records?

-- 
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: db won't recreate when create site from scratch

2016-12-23 Thread Dave S


On Thursday, December 22, 2016 at 3:14:20 PM UTC-8, b.l. masters wrote:
>
> Ok. Actually that was something. I realized that I gave the directories 
> the wrong permissions when I created these. So I went ahead and reassigned 
> to www-data and now I am getting the following:
>
> Validation error, field:username  0x7f1d49dcd2d0>
>
> It has now created databases. Or at least there are database files showing 
> in the databases directory. However, when I attempt to create a user, this 
> is the traceback message from the Database administration view:
>
> Traceback (most recent call last):
>
> [...] 

>   File "/home/www-data/web2py/gluon/packages/dal/pydal/adapters/base.py", 
> line 1382, in log_execute
> ret = self.get_cursor().execute(command, *a[1:], **b)
> OperationalError: no such table: auth_user
>
>
> But this feels like progress. :-)
>
> These are my current settings migration settings:
>
> db = DAL(..., migrate=True, fake_migrate_all=True)
>
> db.define_table(..., migrate=True, fake_migrate=True
>
> auth.define_tables(username=True, signature=False, migrate=True)
>
> Thanks again for any help.
>

Do you  instantiate Auth in your db.py?

/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.


[web2py] Re: Issues with record versioning

2016-12-23 Thread Ricardo Oliveira
Hi,

I was able to fix problem 1).
Turns out that auth.enable_record_versioning needs to be after all the 
define_tables (found the answer on another post, but couldn't find it in 
the docs).

Still having issue 2). Has anyone seen this before? The solutions I saw on 
other posts didn't work for me.

Thanks.

On Thursday, December 22, 2016 at 4:13:17 AM UTC, Ricardo Oliveira wrote:
>
> Hi,
> I'm having a couple of issues with record versioning:
> 1) I had to directly "force" versioning for tables 
> (db.mytable._enable_record_versioning() for each table), although I have:
>
>  auth.define_tables(username=True, signature=True)
>  auth.enable_record_versioning(db, 
> archive_names='%(tablename)s_archive', current_record='current_record')
>  db._common_fields.append(auth.signature)
>
> 2) the user & time are not recorded on the modified_on, modified_by columns
>
> Not sure where to go from here.
> I would appreciate any help.
>
> Best regards,
> Ricardo.
>

-- 
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: How to check if expression is Aggregate?

2016-12-23 Thread Jurgis Pralgauskis
Hi,

I used git clone  from https://github.com/web2py/web2py.git -- that is
probably problem
adapter always prints as:  

now I downloaded *_src.zip
and I get  

Thanks, probably I shouldn't use git... (but thought would be easier to
update to newest with pull..)


On Thu, Dec 22, 2016 at 3:36 AM, Anthony  wrote:

> What version of web2py, and are you sure it includes the proper version of
> PyDAL?
>
> What is the object type of db._adapter (a) immediately after db is created
> in db.py and (b) when db is assigned from current.db in the module?
>
> Your traceback shows object type "SQLite", but the adapter is not of that
> type.
>
> Anthony
>
>
> On Wednesday, December 21, 2016 at 11:57:24 AM UTC-5, Jurgis Pralgauskis
> wrote:
>>
>>
>> > That's odd. Hard to say what's going on without seeing the code. Maybe
>> attach a minimal app that reproduces the problem.
>>
>> https://github.com/dz0/web2py_grand_helpers/blob/master/app/
>> modules/plugin_search_form/search_form.py#L188
>>
>> you can toggle comment with next line to see the non/working case...
>>
>> ps.: current.db is set in
>> https://github.com/dz0/web2py_grand_helpers/blob/master/app/
>> models/plugin_search_form.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 a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/web2py/0IvASrrIDkA/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.
>



-- 
Jurgis Pralgauskis
tel: 8-616 77613;
Don't worry, be happy and make things better ;)
http://galvosukykla.lt

-- 
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: Layout design with angular material and web2py

2016-12-23 Thread Anthony
Note, when you have an {{extend}} or {{include}} inside an {{if ...:}} 
block, web2py will still execute all the code in the extended/included view 
-- the end results will simply not be written to the final HTML sent to the 
browser. This is because extend and include are template language 
directives, not Python, so they are executed before any of the Python code.

Anthony

On Friday, December 23, 2016 at 12:36:05 AM UTC-5, Biplov Bhandari wrote:
>
> UPDATE
>
> I changed the deliminator of web2py as response.delimiters = ('')
>
> The layout.html looks like http://pastebin.com/PqrcBtTm . It has 
> condition to include sidebar-nav and menu-bar, and include the form. The 
> /views/default/user.html looks like this:
>
> 
>  
>  
>  
>  
>  
>  
>  
>  
>  
> 
>
> 
> 
> jQuery("#web2py_user_form input:visible:enabled:first").focus();
>  
> web2py_validate_entropy(jQuery('#auth_user_password'),100);
>  
> web2py_validate_entropy(jQuery('#no_table_new_password'),100);
>  
> 
> 
>
>
> The user function in controllers/default.py is
>
> def user():
> if request.args(0) == "login":
> response.title = T("Login")
> auth.messages.submit_button = T("Login")
>
>
> return dict(form=auth())
>
>
> When trying to load /default/user/login, web2py complains me saying I am 
> missing pass in view, which I don't think I have.
>
> The full traceback looks like:
>
> Ticket ID
>
> 127.0.0.1.2016-12-23.12-28-19.b04c11e7-91f1-491b-94f2-8ab7aa934741
> missing "pass" in viewVersion
> web2py™ Version 2.14.6-stable+timestamp.2016.05.09.19.18.48
> Python Python 2.7.5: C:\Python27\python.exe (prefix: C:\Python27)Traceback
>
> 1.
> 2.
> 3.
> 4.
> 5.
> 6.
> 7.
> 8.
> 9.
> 10.
> 11.
>
> Traceback (most recent call last):
>   File "C:\Eden\web2py\gluon\rocket.py", line 1320, in run
> self.run_app(conn)
>   File "C:\Eden\web2py\gluon\rocket.py", line 1813, in run_app
> self.environ = environ = self.build_environ(sock_file, conn)
>   File "C:\Eden\web2py\gluon\rocket.py", line 1633, in build_environ
> request = self.read_request_line(sock_file)
>   File "C:\Eden\web2py\gluon\rocket.py", line 1384, in read_request_line
> raise SocketTimeout('Socket timed out before request.')
> SocketTimeout: Socket timed out before request.
>
>
> Then if I change my views/default/user.html to this
>
> 
>  
> 
>
> 
> 
> jQuery("#web2py_user_form input:visible:enabled:first").focus();
>  
> web2py_validate_entropy(jQuery('#auth_user_password'),100);
>  
> web2py_validate_entropy(jQuery('#no_table_new_password'),100);
>  
> 
> 
>
> The views/auth/_login.html looks like this: 
>
> 
> 
> 
> 
> 
> 
> 
> 
>  
> 
>
>
> The error is gone, but the form is not loaded yet.
>
> [image: 7uFaXjH.png (1674×1023)]
>
> I stepped through gluon/template.py, the block main_body is contained but 
> is blank.
>
> What am I missing here? How do I include the form?
>
> Oh and the formstyle is custom one, which looks like:
> def formstyle_angular_material(form, fields, *args, **kwargs):
>
>
> def render_row(row_id, label, widget, comment, hidden=False):
>
>
> input_container = TAG["md-input-container"](_class="md-block")
>
>
> _class = "form-row row hide" if hidden else "form-row row"
>
>
> if isinstance(label, LABEL):
> label.attributes["_style"] = "color:green"
> input_container.append(label)
>
>
> if isinstance(widget, INPUT):
> if "_type" in widget.attributes and \
>widget.attributes["_type"] == "checkbox":
> # Checkbox
> # Label contained here
> widget = TAG["md-checkbox"](label.components[0])
> return DIV(widget, _class=_class, _id=row_id)
> else:
> # Normal Input
> # Label contained above
> input_container.append(widget)
>
>
> if hasattr(widget, "element"):
> submit = widget.element("input", _type="submit")
> if submit:
> widget = TAG["md-button"](widget.attributes["_value"],
>   _class="md-raised md-primary",
>   _type="submit")
> return DIV(widget, _class=_class, _id=row_id)
>
>
> return DIV(input_container, _class=_class, _id=row_id)
>
>
> parent = TAG[""]()
> for row_id, label, widget, comment in fields:
> parent.append(render_row(row_id, label, widget, comment))
> return parent
>
>
> Please help me move forward. Really appreciate any help on this regard.
>

-- 
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 

[web2py] Re: Need help to debug this error when using URL from gluon/html.py

2016-12-23 Thread Anthony
Looks like in your call to URL, the vars dictionary includes:

'title': u'Eva de Dominici pos\xf3 como una chica Guess y cont\xf3 sus tips 
beauty'

Notice that the title is a unicode object. If the title is the only item 
that might be unicode, you can simply encode it before passing it to the 
URL() function:

URL(..., vars=dict(..., title=unicode(title).encode('utf8')))

If other items in the query string might also end up as unicode, you should 
loop through and encode everything.

Anthony

On Thursday, December 22, 2016 at 5:32:32 PM UTC-5, Lisandro wrote:
>
> Sorry about that, the image quality was reduced after uploading it.
> Here I made a new screen capture and uploaded it to my drive account, so 
> It's full quality:
>
> https://drive.google.com/file/d/0B0y0m_8LgjGIT3hCU000T0hQamM/view?usp=sharing
>
> But the character you noticed was just some noise in the image.
>
> Just to add something that could be relevant: I use IS_SLUG validator in 
> order to generate a unique slug and store it in a database record. Then, I 
> use it as an argument of URL(), to construct the url of an article. 
> I think that shouldn't cause any trouble, but who knows.. ¿maybe some 
> unicode character is leaking into the slug? It shouldn't be the case, 
> because if it was, then the error would be raised constantly, but it is 
> sporadic :/
>
>
>
>
> El jueves, 22 de diciembre de 2016, 18:25:59 (UTC-3), Dave S escribió:
>>
>>
>>
>> On Thursday, December 22, 2016 at 8:32:16 AM UTC-8, Lisandro wrote:
>>>
>>> Hi there, sorry for the delay, I was waiting for the error to occur.
>>> Today the error triggered again, and I had disabled tickets2email, so I 
>>> have the ticket, but it doesn't show any code, its odd.
>>>
>>
>> Using my magnifying glass, I think I see that there's a Unicode character 
>> in the *location* variable, between "con" and "sus".  Unicode is not 
>> allowed in URLs; did you run an escape tool over it?
>>
>> /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.


[web2py] Re: Deploy with postgresql

2016-12-23 Thread Ben Lawrence
Andre, did you solve this? For me pg 9.5 on remote ubuntu 16, web2py is not 
creating the tables.

On Sunday, September 4, 2016 at 6:55:54 AM UTC-7, Morganti wrote:
>
> Hi people!
>
> I just almost in go-live. So, I tried to create a Postgresql database and 
> starting to configure some config tables for my appliacation, but I had the 
> error below.
>
> Traceback (most recent call last):
>   File 
> "/home/andre/Dropbox/Projetos/web2py/applications/87k/controllers/appadmin.py",
>  line 249, in select
> nrows = db(query, ignore_common_filters=True).count()
>   File 
> "/home/andre/Dropbox/Projetos/web2py/gluon/packages/dal/pydal/objects.py", 
> line 2010, in count
> return db._adapter.count(self.query, distinct)
>   File 
> "/home/andre/Dropbox/Projetos/web2py/gluon/packages/dal/pydal/adapters/base.py",
>  line 1322, in count
> return self.cursor.fetchone()[0]
> IndexError: list index out of range
>
> Thanks
> Best regards
> André
>
>
>

-- 
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.