if request.now and request.utcnow return the same date it means that on
your server the local time is UTC-ish.
When dealing with timezones you'd better store all dates in your database
as UTC, and then either:
- use javascript to detect the user timezone and adjust accordingly
- let the user
Hi there,
got it figured out. Here's my .htaccess:
RewriteEngine On
RewriteBase /
# break after this rule to avoid firing the second rule for static files
RewriteRule ^([^/]+)/static/(.*)$ /applications/$1/static/$2 [L]
RewriteCond %{REQUEST_URI} !^/cgihandler\.py/
RewriteCond %{REQUEST_URI}
To generate qr, I've used qrcode:
https://pypi.python.org/pypi/qrcode/2.4.1
- Pure-python lib
- BSD license
- Requires PIL
- ver 2.4.2
Why it's still alpha with version 2.4.2?
--
---
You received this message because you are subscribed to the Google Groups
web2py-users group.
To
Hi guys!!
Does anyone have an example of connecting to Facebook using the class
ExtendedLoginForm?
I try to do it but I receive this error:
form.components.append(self.alt_login_form.login_form())
AttributeError: 'FaceBookAccount' object has no attribute 'login_form'
So, for test, I put a
A little correction for any future visitor:
compute= lambda row: %(username)s-%(songname)s-%(playlist_name)s),
should be:
compute= lambda row: %(username)s-%(songname)s-%(playlist_name)s %row),
Anyway the solution is great. Thanks a lot.
El miércoles, 12 de septiembre de 2012 00:54:45 UTC+2,
Hello,
I just noticed that Field('image', 'upload') doesn't display the same way
with crud.update / SQLFORM.
When you try to edit record using crud.update, you get an image preview if
it is uploaded already.
With SQLFORM, there is no preview.
I wonder if this is intentional or a bug?
How can
Hi,
I'm using a dummy table with migrate=False against a database view for
reporting, but I have auditing enabled.
I'm getting the error: -
OperationalError: (1054, Unknown column
'request_received_by_month.is_active' in 'field list')
...which suggestes that web2py expects the audit trail
watching at the source code, instead of auth.enable_record_versioning(db)
you can pass a list of tables
On Tuesday, March 5, 2013 2:12:54 PM UTC+1, Philip Kilner wrote:
Hi,
I'm using a dummy table with migrate=False against a database view for
reporting, but I have auditing enabled.
Hi Niphlod,
On 05/03/13 13:21, Niphlod wrote:
watching at the source code, instead of
auth.enable_record_versioning(db) you can pass a list of tables
Crikey - that'd be a long list here!
Thanks for the pointer - will dig...
--
Regards,
PhilK
'a bell is a cup...until it is struck'
--
luckily python is a programming language. :P
your_table_name = 'norecordversioninghere'
versioning_only_on = [db[t] for t in db if t != yourtablename]
auth.enable_record_versioning(versioning_only_on)
On Tuesday, March 5, 2013 2:26:48 PM UTC+1, Philip Kilner wrote:
Hi Niphlod,
On
Oh, it looks like I need to do:
SQLFORM(..., upload = URL('default', 'download'))
Marin
Dana utorak, 5. ožujka 2013. 13:58:30 UTC+1, korisnik Marin Pranjić napisao
je:
Hello,
I just noticed that Field('image', 'upload') doesn't display the same way
with crud.update / SQLFORM.
When you
Sweet code snippet.
On Tuesday, March 5, 2013 8:32:31 AM UTC-5, Niphlod wrote:
luckily python is a programming language. :P
your_table_name = 'norecordversioninghere'
versioning_only_on = [db[t] for t in db if t != yourtablename]
auth.enable_record_versioning(versioning_only_on)
On
Hi Niphlod,
On 05/03/13 13:32, Niphlod wrote:
luckily python is a programming language. :P
|
your_table_name ='norecordversioninghere'
versioning_only_on =[db[t]fort indb ift !=yourtablename]
auth.enable_record_versioning(versioning_only_on)
|
...and luckier still that this list and
Sorry for being so late.
I have put it all in an issue on the pyfpdf page.
Regards, Martin
2013/2/19 Mariano Reingart reing...@gmail.com
On Tue, Feb 19, 2013 at 6:29 PM, Martin Weissenboeck mweis...@gmail.com
wrote:
The result: the “ά” is not shown
That is interesting, because the
How to disable wrong codemirror smart-tabbing? It really makes me angry
when I'm coding.
smartIndent: false don't help.
I need tabbing like in the editArea, where tab makes +4 spaces for all
selected lines and shift+tab makes -4 spaces for all selected lines. thx
--
---
You received this
You could use IS_IN_SET and feed it with you data that coming from a
db().select() that could return the proper oredered data set maybe?!
But I would investigate more on the reason it is not properly ordered since
to order your data you will have to use orderby in your select... Or you
will have
Hi
I think I have a solution how to list all expose method and also return
documentation. I suggest that @doc be introduce to web2py so we can have a
dynamic documentation of all exposed method for services consumers. What do
you think ?
def makeRegistrer():
registry = {}
def
I am trying to get a somewhat complex routing scheme to work, but haven't
been able to with either of the routing systems.
Assume I have the following applications and domains they should be mapped
to:
inventory - inventory.example.com
admin - monitor.example.com/admin
ipcheck -
Please also note my setup:
https:nginx (load balancer with ssl) - http:nginx - uwsgi
--
---
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
Hi,
I upgraded my production server to 2.4.2. yesterday.I thought everything
was looking good until I just got: Error ticket
File /data/domains/web2py/gluon/dal.py, line 7765, in __getattr__
return ogetattr(self, key)
AttributeError: 'DAL' object has no attribute 'virtual'
Is this easy to
maybe showing what line of your code raised the Exception will help...
On Tuesday, March 5, 2013 5:51:57 PM UTC+1, Kenneth wrote:
Hi,
I upgraded my production server to 2.4.2. yesterday.I thought everything
was looking good until I just got: Error ticket
File
Tried to 'graph models' on a windows machine, old apps get the error:
invalid function (appadmin/graph_model)
Created a new app from the wizard, clicked 'graph models'
pygraphviz library not found
Tried to install pygraphviz on Windows (after installing Graphviz), get
this message:
Your
Hi!
In words what i need is to get a set from this query: select the
'persons.email' and 'persons.id' from table 'persons' *that are not in*table
'invitations.to'
my tables:
db.define_table('persons',
Field('name'),
Field('email'))
db.define_table('invitations',
Field('from',db.persons),
I know of some users that made it work on windows, so it wouldn't be enough
to just check the OS. Also, if the button is hidden in case the lib import
fails, then new users would never see it and be reminded that they can
install the library and use it.
In both cases, the button serves a
Check out .belongs() --
http://web2py.com/books/default/chapter/29/06#belongs.
Anthony
On Tuesday, March 5, 2013 12:30:50 PM UTC-5, Pepe Araya wrote:
Hi!
In words what i need is to get a set from this query: select the
'persons.email' and 'persons.id' from table 'persons' *that are not
Hi,
I am newbee on Web2py, I am exploring it. I installed the jqGrid_plugin
that works fine. But now I should like to get back the id of the record or
the valor of a field but it is a JQuery that I don't know. I did this code:
h1It is my table /h1
div class=tab id=t
I suggest you to use SQLFORM.grid or .smartgrid, you will have a grid
similar to jqGrid but generated by web2py with many goodies!
Richard
On Tue, Mar 5, 2013 at 1:19 PM, openo...@gmail.com wrote:
Hi,
I am newbee on Web2py, I am exploring it. I installed the jqGrid_plugin
that works fine.
Hi,
I usually find what row causes the problem but not in this case. I'm using
the plugin_PowerGrid. Anyone using PowerGrid with the new web2py version?
Kenneth
maybe showing what line of your code raised the Exception will help...
On Tuesday, March 5, 2013 5:51:57 PM UTC+1, Kenneth
Perhaps get the id using that technique then use
jquery('#myhiddenfieldid').val(id) store it in a hidden input field so the
post back will then send it back to the web2py server code when you can
easily access it. Or send it back right away using an ajax() call.
On Tuesday, March 5, 2013
Eh, I'd rather have it not shown unless it actually does something. It's
poor software design if you have a button which just gives you an error
message.
On Tuesday, March 5, 2013 10:48:27 AM UTC-7, LightDot wrote:
I know of some users that made it work on windows, so it wouldn't be
enough
You can negate a part of a query by using a tilde (~).
On Tuesday, March 5, 2013 10:30:50 AM UTC-7, Pepe Araya wrote:
Hi!
In words what i need is to get a set from this query: select the
'persons.email' and 'persons.id' from table 'persons' *that are not in*table '
invitations.to'
my
Hi Derek and Anthony,
that's make the trick!!
Thank you both!!
*Pepe Araya*
Diseñador / Designer
On Tue, Mar 5, 2013 at 4:18 PM, Derek sp1d...@gmail.com wrote:
You can negate a part of a query by using a tilde (~).
On Tuesday, March 5, 2013 10:30:50 AM UTC-7, Pepe Araya wrote:
Hi!
You could have a virtual field and sort it based on that.
import socket, structprint struct.unpack(!I, socket.inet_aton(f_ip_addr))[0]
In other words, convert your IP address to decimal, and sort it based on
the decimal representation.
On Monday, March 4, 2013 3:48:41 PM UTC-7, François
That's what we do, use the dirty cell function of JQGrid to get values,
smash them together in a string and pass back to a controller. Not very
elegant...
As someone else suggested, use the built in grid and avoid JQGrid if you
can.
On Tuesday, March 5, 2013 2:14:58 PM UTC-5, dlypka wrote:
again ? Wasn't all of that sorted out ?
what are the differencies between localhost and deployment?
--
---
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
hi,
i've tested it using coalesce but the result is not my expected (only print
sub category).
*coalesce in controller*
categories=db((db.category.is_active==True)
(db.category.parent.coalesce(db.category.category))).select(
I solved in this way:
https://groups.google.com/d/msg/web2py/6obMbP6OY6A/PAI5wStWFIQJ
Maybe it helps you too.
Il giorno martedì 5 marzo 2013 18:27:09 UTC+1, Derek ha scritto:
Tried to 'graph models' on a windows machine, old apps get the error:
invalid function (appadmin/graph_model)
But not is the same error. Is in the same place, but not the same error. I
don't understood why again?
I really don't know what happening... both are ubuntu 12.04. Maybe the
nginx... I don't know...
Sorry for the mistake with deployment, but I don't speak English very
well, I am brazilian.
On
ok, no problem. Seems the same error because you're trying to iterate over
something that is not a list, but a None.
English aside, what difference there is between the working location
and the not working one ?
Are you sure that your recursive procedure returns rows instead of None in
the not
The fifth edition of the book is out!
in HTML:
http://web2py.com/book
in PDF:
https://dl.dropbox.com/u/18065445/web2py/web2py_manual_5th.pdf
and in print:
http://www.lulu.com/shop/massimo-di-pierro/web2py-5th-edition/paperback/product-20731496.html
--
---
You received this
great, the book is updated not long after the new version is out.
btw, is there any changelog for the new book?
thank you
--
---
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
Performing the procedure directly in MySQL Workbench returns correctly. The
error occurs in:
raw_rows = db.executesql(proc, fields=fields)
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
if auth.user_id:
user_id = auth.user_id
fields = [db.auth_user.generation, db.auth_user.id,
I've added the optional arguments to my field, and created the functions as
described. However I'm getting the error:
type 'exceptions.NameError' name 'store_file' is not defined
Do the functions need to live in a specific location in order to be
recognized?
I looked through the book but I
in HTML:
http://web2py.com/book
This one says it's the 4.9th edition.
--
---
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
Hi,
on my web2py application on windows, I have a cron task that runs for a
long time. I noticed a new process is spawned for every cron job.. If the
main web2py process exists (for example if I try to terminate the process,
or close the web2py window), it will not exit until the cron process
Maybe one of the DAL wizards will chime in and explain how to do this in
the model.
Until then, though, you may have to think about sorting these on the
controller side.
First, an IP address isn't a string. It's four octets, separated by dots.
It's stored as a string, but string sorting
What's the DAL syntax for computing a unique hash for each tuple/row?
(so that no other tuple/row has that same hash)
What I have tried:
Field('my_field_name', unique=True, compute=lambda q:
CRYPT(digest_alg='sha1',key='my_field_name',salt=True)(str(q)).split('$')[0]),
--
---
You received
On Wednesday, 6 March 2013 08:02:13 UTC+11, Anthony wrote:
in HTML:
http://web2py.com/book
This one says it's the 4.9th edition.
It's v5 for me (an hour later)
--
---
You received this message because you are subscribed to the Google Groups
web2py-users group.
To unsubscribe
md5 here just because it's faster and generally safe if you don't have
trillion records
from hashlib import md5
compute=lambda r: md5(str(r)).hexdigest()
On Tuesday, March 5, 2013 10:54:21 PM UTC+1, Alec Taylor wrote:
What's the DAL syntax for computing a unique hash for each tuple/row?
On Tuesday, March 5, 2013 4:37:33 PM UTC-5, Cliff Kachinske wrote:
Maybe one of the DAL wizards will chime in and explain how to do this in
the model.
Until then, though, you may have to think about sorting these on the
controller side.
First, an IP address isn't a string. It's four
yep, books sends out headers expiring at midnight UTC (~30 minutes from
now).
If Massimo just updated the book and you have hit a page some time ago,
you're seeing the cached version.
Hit CTRL+R to refresh the browser cache and 5.0 should be returned.
PS: finally we have gzipped content
Do not use to and from in field names. You will get into trouble.
On Tuesday, 5 March 2013 11:30:50 UTC-6, Pepe Araya wrote:
Hi!
In words what i need is to get a set from this query: select the
'persons.email' and 'persons.id' from table 'persons' *that are not in*table '
invitations.to'
On Tuesday, 5 March 2013 07:07:46 UTC+11, Niphlod wrote:
ps: version check fails because it expects
version (date) stable/dev
instead of the current format
Version 2.4.2 (stable) 2013-03-04 03:26:21
Is there a quick fix for this (ie a change to 2.3.2)?
On Monday, March 4, 2013
+1 for web2py!!
In the admin interface I can see:
Version 2.4.2 stable (2013-03-04 03:26:21)
Unable to check for upgrades http://web2py.com/
Running on *%s*
%s should be information about the server type, version..., right? I'm
using Centos 6, nginx+uwsgi. Maybe web2py expects some wsgi
Thanks for 2.4.2. I manually updated on Windows and my apps are all working
(although for a couple I needed to delete the scheduler tables and update
some queries to new field names, where I had things to monitor jobs ... I
look forward to using the new scheduler features).
--
---
You
Niphlod,
I am using the following and not using the generic grid. What CSS could be
missing ?
def dailycounts():
grid=SQLFORM.smartgrid(db.daily_counts,
user_signature=False,create=False,editable=False,deletable=False,
Hi,
there is a typo in dal.py for GAE support I've reported yesterday
http://code.google.com/p/web2py/issues/detail?id=1359can=4
I've also attached a patch for it that seems to solve the issue.
Can someone review it please?
Thank you,
--
Vincenzo Ampolo
http://goshawknest.wordpress.com/
I'm not sure where the issue comes but here's the thing.
I did some modifications to some plugins that uses a modal in forms.
Here's the plugin code:
# In models/db.py
db.define_table('Area',
Field('nombre', requires=IS_NOT_EMPTY()),
format=%(nombre)s
)
db.define_table('Docente',
Attached file.
--
---
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
thanks for the updated manual!
Margaret
--
---
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
Hi,
Really great job!
Thanks!
Alfonso de la Guarda
Twitter: @alfonsodg
Redes sociales: alfonsodg
Telef. 991935157
1024D/B23B24A4
5469 ED92 75A3 BBDB FD6B 58A5 54A1 851D B23B 24A4
On Tue, Mar 5, 2013 at 3:48 PM, Massimo Di Pierro
mdipie...@cs.depaul.edu
{{=BEAUTIFY (something)}}
is for pretty-printing a dictionary. What you want to use instead is:
{{=grid}}
-Jim
--
---
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
Hi Massimo,
On 05/03/13 20:48, Massimo Di Pierro wrote:
The fifth edition of the book is out!
Marvellous - Thank You!
(and all the contributors)
--
Regards,
PhilK
'a bell is a cup...until it is struck'
--
---
You received this message because you are subscribed to the Google Groups
Did you include the code for the store_file and retrieve_file functions listed
in the Stack Overflow answer before the table definitions in your model file?
-Jim
--
---
You received this message because you are subscribed to the Google Groups
web2py-users group.
To unsubscribe from this
Thank you! I will apply the patch asap.
On Tuesday, 5 March 2013 19:04:49 UTC-6, Vincenzo Ampolo wrote:
Hi,
there is a typo in dal.py for GAE support I've reported yesterday
http://code.google.com/p/web2py/issues/detail?id=1359can=4
I've also attached a patch for it that seems to solve
Hi web2py users,
I'm new to framework but have found it to be elegantly designed and
productive to work under. I'm curious to hear though, how are folks
organizing application specific javascript files. For most projects it
seems like one app.js file is enough but as the code base grows is it
I read about many limitations if I will use GAE for web2py, nevertheless it
will not stop me :-)
I think that main issue is to properly use memcaches. Is it enought to use
only cache.memcache and if yes what is the best way to use it? I plan to
use it for sessions a for selected results stored
Is there simple way how to highlight changes against last version?
Dne úterý, 5. března 2013 21:48:38 UTC+1 mdipierro napsal(a):
The fifth edition of the book is out!
in HTML:
http://web2py.com/book
in PDF:
https://dl.dropbox.com/u/18065445/web2py/web2py_manual_5th.pdf
and in
Jim,
I just did the following and nothing changed. Still no breadcrums or
buttons.{
{extend 'layout.html'}}
h1Daily Count View/h1
{{=grid}}
--
---
You received this message because you are subscribed to the Google Groups
web2py-users group.
To unsubscribe from this group and stop
In your original response you quoted, you had grid: followed by the HTML
assigned to that key. Are you still getting the grid: part, or just the
(unstyled) HTML?
--
---
You received this message because you are subscribed to the Google Groups
web2py-users group.
To unsubscribe from this
Jim,
I just noticed the word grid is gone, so it must be unstyled HTML. Is there
a way to make it styled ?
On Tuesday, March 5, 2013 9:38:50 PM UTC-6, Jim Gregory wrote:
In your original response you quoted, you had grid: followed by the HTML
assigned to that key. Are you still getting the
Hi All,
I'm seeing some odd behaviour, and am trying to work out if it's web2py
or me that is confused.
I have a page with JQueryUI tabs. The first tab shows a record, the 2nd,
3rd and 4th tabs show grids from different child tables, each within a
LOADed component. The templates all use the
Sounds like your CSS file is missing. View the source of the page and see if it
is referencing the CSS file. If so, try accessing the CSS file directly by
copying and pasting the URL of the file from the page source into the location
bar of your web browser. If you get a 404 error, then either
Hi,
A little more info: -
- The 2nd tab is for subject areas, and if I inspect the contents of
this component when first loaded, I see: -
a class=w2p_trap button btn
Hi,
It seems that the grids are not isolated from one another within their
components - calling the insert page seems to create a link to the last
loaded grid.
Fortunately, I don't need all the power of the grid in every case, so
I'm going to use something simpler.
Should I report this as
Is it possible to order by two or more db fields in a DAL select statement?
Thanks Regards,
AT
--
---
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
could you be more specific?
i make a conditional if statement for sorting (orderby) in my application
--
---
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
Pl consider following select statement:
rows=db().select(db.persons.ALL, db.books.ALL,
left=db.persons.on(db.persons.id==db.books.owner))
Want to order by persons.dob, then books.purchased, where both are of type
date/time.
On Wednesday, 6 March 2013 11:01:03 UTC+5, 黄祥 wrote:
could you be
On 6 March 2013 08:10, at matifa...@gmail.com wrote:
Pl consider following select statement:
rows=db().select(db.persons.ALL, db.books.ALL,
left=db.persons.on(db.persons.id==db.books.owner))
Want to order by persons.dob, then books.purchased, where both are of type
date/time.
Did you
I have observed that the searches in the Book app is case sensitive.
Can I request that searches are made case insensitive please.
Regards
Johann
--
Because experiencing your loyal love is better than life itself,
my lips will praise you. (Psalm 63:3)
--
---
You received this message
Thanks Johann, it works. :)
I'd tried it earlier but was getting some errror. I hadn't realized that it
was due to some other problem.
Regards
On Wednesday, 6 March 2013 11:33:09 UTC+5, Johann Spies wrote:
On 6 March 2013 08:10, at mati...@gmail.com javascript: wrote:
Pl consider
the ticket you linked to looks like it is not failing on the connection,
but rather failing on a query. these 2 line are of interest to me:
File /base/data/home/apps/s~gk-hercules/1.365624770532609305/gluon/dal.py,
line 4115, in execute
return self.log_execute(command.decode('utf8'), *a,
Following the example in the new book under components:
Model:
db.define_table(comment_post, Field(body, text, label=Your
comment), auth.signature)
Controller:
@auth.requires_login()
def post(): return dict(form = SQLFORM(db.comment_post).process(), comments
= db(db.comment_post).select())
83 matches
Mail list logo