Hi Massimo, thanks for responding, Im sorry if these are basic questions
etc.
I have downloaded the standard package web2pywin zip, installed it on my
windows computer and all is running well.
I have now transferred that install and the Apps Ive build to a shared
workdisk on our work network
Glad to help! You do excellent work. Thanks!
Den tisdagen den 11:e december 2012 kl. 15:25:21 UTC+1 skrev Massimo Di
Pierro:
How did that get in there? Fixed in trunk. Thanks Joel for reporting this.
On Tuesday, 11 December 2012 02:51:15 UTC-6, Joel Samuelsson wrote:
I'm not sure if we're
0.0.0.0 is not a real address 0.0.0.0 is a fake address (but somewhat
standard) to say listen on all network interfaces.
Normally you have a computer running web2py on 0.0.0.0 (for the sake of the
example, on port 8000) that can access itself (meaning, from the same
computer) web2py at
My web2py web hasn't http compression enable. How can enable it?
Thanks
--
thanks
I use the following solution;
{{for result in res:}}
h5{{=result.id}}/h5
h5{{=result.title}}/h5
{{=A(TAG.i(_class=icon-plus-sign), _rel=tooltip, _title=testing,
_class=btn, _href='#', _onclick=jQuery('#uc').toggle();)}}
div id=uc
response.view worked perfectly. Thank you for your response.
On Thursday, 13 December 2012 19:59:41 UTC, Niphlod wrote:
you can set it BEFORE returning anything with response.view (e.g. for a
function needing views/randomfolder/index.xml it would be response.view =
Hi Niphlod, thanks for the hints.
I am not sure of the IP address of the network shared disk. In the
meantime I testing running on my local machine in open listening and then
accessing my machine from elsewhere.
When I start web2py.exe , I get the Web2py framework starting etc, hardcron
etc
Hi Seelife.
In order to access your running web2py application from another pc you must
use the real IP of your pc (not 0.*, not 127.*). You can find it with the
IPCONFIG command in a Command Prompt window. Note that (if firewalls allow
it) the other pc's will connect to your pc only, and not
Hi Nico, thanks for input.
yes I know I need to use the IP of my computer so others can access the
running App.
As I said, I am at the moment just running it on my local computer, my work
desktop. I should then be able to access the app by opening the web
address of my computer (IP) and run
Dear all,
I am looking for some advice in how to perform time aggregations, so far I
have been able to aggregate only by hours or minutes but nothing between,
for example every 10m, 15m and so on. For example this query count the
number of fields aggregated by hours:
c = db.record.id.count()
s
there are no native functions on databases to group by, e.g., a quarter
hour.
For those kind of things, either you aggregate by hand in python or code a
view directly in the database to exploit its functions (depending on the
engine, could be either an impossible or a semi-complicated task
I have the button
button onclick={{=URL
http://127.0.0.1:8000/examples/global/vars/URL(del_role)}} class=btn
btn-dangerDelete Role/button
And in my controller I try to put def del_role and, if the user has
membership, i want to del_membership for that role. But this doesn't seem
to be
I'm also trying this but it doesn't work:
button onclick={{auth.del_membership('role'))}} class=btn
btn-dangerDelete Role/button
On Monday, December 10, 2012 9:15:30 PM UTC, Daniele wrote:
When I use form.add_button() I am able to add a button to a form, which I
can display with {{=form}}
Can I suggest you to use the free PythonAnywhere web site for your design /
test phase? Of course it is not feasible for your privacy needs, but it is
something you can play on easily from everywhere.
Anyhow, you must run it with 0.0.0.0:8000 in order to have it visible from
other PCs. Then use
The question title pretty much describes the undesired behavior.
Functions in most controllers are index, add, edit, view. Everything is OK
when rendering index views. When rendering add, edit, or view, the
dropdowns never appear. Some of the main menu items have no associated
URL, so the
Hi Niphlod, thanks for clarifying me this. I will go for the aggregation by
hand, which is more portable rather than database view. However, we could
provide something like that in the web2py library or somewhere, to speedup
the work for future developments.
2012/12/14 Niphlod niph...@gmail.com
Hi Folks, Ok at least some progress.
I can get rocket to work with 0.0.0.8000 on my computer, and then open the
app with http://myip/app/etc etc
But if I try to open that app now by accessing my computer via the IP then
the page is blocked I guess by the network firewall.'
Cos we dont have admin
I think python has some libraries ready for this, but are more targeted to
huge data analysis. Google around for that, and if you resort to your own
code, then share it back, if it's flexible enough a module in contrib for
everyone could be derived from your code.
On Friday, December 14, 2012
onclick accepts a bit of javascript, not an url
On Friday, December 14, 2012 1:16:22 PM UTC+1, Daniele wrote:
I'm also trying this but it doesn't work:
button onclick={{auth.del_membership('role')}} class=btn
btn-dangerDelete Role/button
Another thing I noticed is that whatever I put
суббота, 18 апреля 2009 г., 16:14:30 UTC+5 пользователь jiri написал:
Hello,
I am new to web2py and I am working on multi-language site using this
framework. What is the best way to structure URLs for such site?
Previously I used this scheme (see below) in Pylons framework, it was
I have a feeling you're mixing two things here.
First, you need to start rocket on 0.0.0.0, so that it will listen to all
your local IPs (to simplify things). If rocket starts normally and you
still can't access web2py on your local IP, than you need to open your
firewall. After your firewall
Hi,
While fetching records from postgres database using DAL API we need to
decrypt some specific fields. These field names start with some specific
prefix (e.g. *kny_*). Is there any way that we could override DAL functions
to achieve this requirement?
Suppose we've following table:
Greetings,
I'd like to use the sql 'distinct' in a SQLFORM.grid 'query', but it is
only valid as parameter in the 'select' method.
I guess the 'group' parameter to SQLFORM.grid would work, but then I have
to build the columns to group by, which seems excessive.
Is it possible to create or pass
I'm using web2py to build a dynamic web UI to a MySQL backend, and I'm new
to the web2py framework and web development in general.
What I'm looking for is a library or plug-in with the following features
that is either built for or compatible with web2py.
1) Inline editing of records
Hi,
I have an issue with the upload form and postbacks. In my application I
need to validate file contents before accepting it from user upload form,
so naturally I try to use onvalidation method to it. The table used in
the forma is defined like this:
db.define_table('input_data',
Hi,
Lets say we've a table with name taxpayers; it contains 5 fields. Out of
these 5, two start with *ar_*.
What I want is to run some special function (say *convertme()* ) on these
two fields starting with *ar_* , while fetching data through DAL, like:
query = (db.taxpayers.id 10)
result =
Would you wrap something like this example (from the slice) in an if
clause ? Or, I imagine you could use this scenario for boilerplate text in
your view for all web pages, with slugs like header, footer,
standard_text.
content = db(db.wiki_page.slug==index).select().first().body
I think the most simple option in your situation is use computed fields.
But if you really need to use a SQL function, you should write your
query by hand.
On Thu, Dec 13, 2012 at 3:48 PM, at matifa...@gmail.com wrote:
Hi,
Lets say we've a table with name taxpayers; it contains 5 fields.
Hi there...
Was there a solution posted for this problem?
On Sunday, 30 September 2012 00:03:41 UTC-5, nc wrote:
I've encountered this problem too. I edited my app's controller/default.py
file from the admin interface, clicked on line 34, clicked toggle
breakpoint, and got the message
Try class: clearfix
http://twitter.github.com/bootstrap/components.html#misc
On Friday, December 14, 2012 1:56:12 AM UTC, Andrew W wrote:
Also, with Images I can do left , right, center.
Can I do something like a css clear / clear: both ?
On Friday, December 14, 2012 6:35:11 AM UTC+13,
Sorry, i forgot db.taxpayer in kny_address and kny_phone:
record_list = queryset.select(db.taxpayer.id, db.taxpayer.name,
db.taxpayer.tax, db.taxpayer.designation,
decrypt(db.taxpayer.kny_address), decrypt(db.taxpayer.kny_phone),
orderby = myorder)
Best regards,
Mariano Reingart
form.record.delete() not working, instead use form.record.delete_record()
Richard
On Wed, Dec 12, 2012 at 1:11 PM, Richard Vézina ml.richard.vez...@gmail.com
wrote:
Thanks Massimo...
deletable = True was missing :
def create_update():
create update funciton
form =
Web2py 2.3.1 is out!
- new virtual fields syntax:
``db.define_table('person',Field('name'),Field.Virtual('namey',lambda
row: ro\
w.person.name+'y'))``
- db.thing(name='Cohen',_orderby=db.thing.name), thanks Yair
- made many modules Python 3.3 friendly (compile but not tested)
- better welcome
Please try 2.3.1. If the problem persists open a ticket.
On Thursday, 13 December 2012 15:06:48 UTC-6, Florian Letsch wrote:
I have a few additional fields set on my db_auth table, mainly in order to
implement a simple invite system:
auth.settings.extra_fields['auth_user']= [
Older versions of IE will override the error page and display an IE error
page is the length is less than 512.
As far as I know it is still relevant to display web2py error tickets on
older IE browsers.
On Thursday, 13 December 2012 17:48:19 UTC-6, howesc wrote:
in http.py there exists this
In the a common mistake in migrations or simply moving things around is
moving the database but not the metadata itself.
I am wondering if it is better to keep the metadata (.tables files) IN the
database itself instead of on the filesystem?
On Wednesday, December 12, 2012 9:41:22 PM UTC-6,
I believe this has been fixed. You need to copy appadmin.html and
appadmin.py from the new welcome to your app (guppy?)
On Thursday, 13 December 2012 18:13:13 UTC-6, Adi wrote:
Just tried to use database administration on existing tables...
1.
2.
3.
4.
5.
6.
7.
Traceback (most
I guess there are multiple ways. This is the first that comes to my mind:
persons_with_dogs=db(db.person.id==db.dog.person_id)._select(db.person.id)
# note _select
db(~db.person.id.belongs(persons_with_dogs)).select(db.person.name)
On Thursday, 13 December 2012 23:28:19 UTC-6, François
Thanks. Can I use it for the book?
On Thursday, 13 December 2012 15:15:11 UTC-6, Alan Etkin wrote:
El jueves, 13 de diciembre de 2012 11:42:02 UTC-3, viniciusban escribió:
Agree in part, Massimo.
This feature is very good. Really!
I have posted a slice about auth.wiki
It can be done. we do it for GAE-SQL and for heroku but it leads to bigger
problems.
On Friday, 14 December 2012 09:53:25 UTC-6, VP wrote:
In the a common mistake in migrations or simply moving things around is
moving the database but not the metadata itself.
I am wondering if it is better
You can see in gluon/contrib/heroku.py how it is done.
It leads on bigger problems because ONLY postgresql allows you multiple
alter tables within a transaction. Therefore the metadata can still get out
of sync (when not using postgresql) and it would be harder to fix.
On Friday, 14 December
Yes, I think you can override DAL with your own functions, you could
simulate a Expression and BaseAdapter method:
DECRYPT = lambda first: 'decrypt(%s)' % db._adapter..expand(first)
decrypt = lambda expr: Expression(expr.db, DECRYPT , expr, None, expr.type)
record_list =
Just to report, the problem is not fixed for many production environments
even with that trick If gzip compression is done by the webserver, the
response must be 512 bytes after the compressionI guess however for
production sites everyone has his custom page and not the default one.
On 14 Dec 2012, at 8:28 AM, Niphlod niph...@gmail.com wrote:
Just to report, the problem is not fixed for many production environments
even with that trick If gzip compression is done by the webserver, the
response must be 512 bytes after the compressionI guess however for
Hi,
One of my form returns UL .I want to apply BEAUTIFY helper on this ,what
is the possible syntax.
part of code where I like to apply BEAUTIFY
return DIV(form,UL((hits_forward_mismatch),_class =
'hfm'),UL((hits_loc_forward),_class='hlf'),UL((hits_loc_backward),_class='hlb'))
--
I have the following code that generates an excel spreadsheet and then
downloads it to the user workstation:
from reports import movementDetail as rpt
letters_file = StringIO.StringIO()
returnVal = rpt.process(originationId, fromDate, toDate, filter,letters_file
, auth.user.id)
if returnVal:
I don't know if I'm reading too much into this or not, but this works
without the login popup using IE from my test server which is running with
the rocket server and no SSL. It is requiring the login when I'm running
SSL over Apache.
-Jim
On Friday, December 14, 2012 11:39:18 AM UTC-6, Jim
Hello Simone,
As I told you just try the script with a fresh VM. I notice that, the
server were not accessible after the script executed. I had to stop both
uwsgi and nginx and restart them, then the welcome show up.
I think that the last line is erroneous...
I replace :
/etc/init.d/nginx
I thought this was a problem with IE7 too. If we know for sure this is only
IE6 problem, I am ok with removing that code.
On Friday, 14 December 2012 10:40:20 UTC-6, Jonathan Lundell wrote:
On 14 Dec 2012, at 8:28 AM, Niphlod nip...@gmail.com javascript:
wrote:
Just to report, the problem
problem with older browser is : retrieve a working copy of it.
However, http://core.trac.wordpress.org/ticket/8942 and the following
http://www.clintharris.net/2009/ie-512-byte-error-pages-and-wordpress/,
http://support.microsoft.com/kb/294807 seems to point in the direction of
7.
Others
Could it also be network file permissions? (remote vs local)
On Friday, December 14, 2012 12:59:40 PM UTC-5, Jim S wrote:
I don't know if I'm reading too much into this or not, but this works
without the login popup using IE from my test server which is running with
the rocket server and
I hope to have a website up and running soon where I have done the
following (If you have a better idea, then please let me know)
in layout.html, or in default/index.html
{{if request.args==['index'] or request.args==[]: }} # The Main Page
div class=banner
.other
uhm, in my tests worked (and that line comes from the old script). After
you install nginx it is started automatically, so restart is a good
choice.
However, let's not take it for granted and investigate.
doing cat /etc/init.d/nginx in 12.10 we can find
restart|force-reload)
echo
did you inspect the returned headers under SSL and apache ?
On Friday, December 14, 2012 6:59:40 PM UTC+1, Jim S wrote:
I don't know if I'm reading too much into this or not, but this works
without the login popup using IE from my test server which is running with
the rocket server and no
This is a problem. How about injecting more characters instead of less. How
about an image encoded in ascii?
On Friday, 14 December 2012 13:44:24 UTC-6, Niphlod wrote:
problem with older browser is : retrieve a working copy of it.
However, http://core.trac.wordpress.org/ticket/8942 and
Hello,
I am having an issue inserting dates into my db from a csv file. Here is
the field I am trying to update:
Field http://127.0.0.1:8000/examples/global/vars/Field(birthdate,date),
Using:
birthdate=row['birthdate'],
Here are the values from the csv file:
09/29/1995 01/09/1995
Hi,
yes still open. Attached what you requested, hopefully.
Kenneth
def data():
new = 0
serials = db(db.asset_serial.asset_id == request.args(2)).select()
crud.settings.create_onaccept = insert_serial
crud.settings.create_next =
I think the goal of BEAUTIFY() helper is to nicely display python lists and
dicts.
See documentation in html.py :
class BEAUTIFY(DIV):
example::
BEAUTIFY(['a', 'b', {'hello': 'world'}]).xml()
'divtabletrtddiva/div/td/trtrtddivb/div/td/trtrtddivtabletrtd
I understand that code and put it in my controller.
But, where do I put the reference to it in the view (the base view that is
extended):
By default it says: div id=navbar{{='auth' in globals() and
auth.navbar(separators=(' ',' | ',''))}}/div
I assume that user.bar must replace
Hi
I have a custom comment form:
def comment():
create comment form. Every comment is id locked to the specific
post
#crud.settings.create_next = URL('index')
post=db(db.blog.id==request.args(0)).select().first()
db.comments.post_id.default=post.id
is anybody using request.restful *and* needs the 512 bytes in a restful
response? i'm inclined to only skip those bytes for restful requests
(because they are usually not displayed by browsers).
thanks,
cfh
On Friday, December 14, 2012 2:48:39 PM UTC-8, Niphlod wrote:
Please... let be sure
Thanks, but how do I specify the class in the wiki page?
--
It seemed a good idea to break up a large controller file into two. Now I
have default.py and full.py.
User() is in full.py. So, now my views are broken because auth won't work
to create the auth links in the navbar.
The default views reference auth as: div id=navbar{{='auth' in
globals()
Sure, if I called it already. To do so, might make most sense to put in a
model.
But, I was hoping that the view would call it. There is another path
through the app with very simplified pages that uses its own auth and I
expect most users to follow that path. so, only folks editing content
Tried putting the function in a model and calling the return value in the
view. Didn't work.
I think what is confusing me is use of two different controller files.
Certainly easy to reference actions when used in menus and anywhere in
code just using the URL function. But, this auth code
El viernes, 14 de diciembre de 2012 13:00:37 UTC-3, Massimo Di Pierro
escribió:Thanks. Can I use it for the book?
Of course, but it would need some rewriting to fit with the book style (and
perhaps a more complete info on the wiki API)
--
Thanks for the response.
To restate your answer, if arg[id] is declared, then the calling url must
reflect this.
Given this, It turns out that I can avoid the problem I was having by
simply changing the form.accepts section to redirect after processing.
The previous version of sqlhtml.py was
So it's not possible to do this with a button?
On Monday, December 10, 2012 9:15:30 PM UTC, Daniele wrote:
When I use form.add_button() I am able to add a button to a form, which I
can display with {{=form}} in my view.
However, if I'm making a custom form using form.custom, how can I
Solved in two different ways.
1. Must have done something dumb, but it works to put a custom auth.bar in
a model, menu.py is a good one. This worked:
def user_bar():
if auth.is_logged_in():
logout = A('Logout', _href = URL('full', 'user', args='logout'))
profile =
I need to access a static third-party data source that uses some Python
keywords in the Field name. This obviously is not good and dal.py syntax
errors when loading the app.
Any way I can work around this?
--
yes, I bought a 512MB Raspberry Pi for $35 as a gift to my kid 2 weeks ago.
In less than 5 mins, I am able to run web2py (v2.3.1) on this tiny and
cheap platform.
installed 2 of my apps, they run a bit slow, but smoothly without error.
Web2py + Python + RaspberryPi is a cool toy.
I am going to
form=crud.create(db.comments)
if form.process().accepted:
Crud and form.process() do not go together. Crud is a higher level
interface and automatically handles form processing. Once you call
crud.create(), the form is already processed -- processing it the second
time will not
I solved this.
On Friday, December 14, 2012 3:37:45 PM UTC-8, Lewis wrote:
I understand that code and put it in my controller.
But, where do I put the reference to it in the view (the base view that is
extended):
By default it says: div id=navbar{{='auth' in globals() and
Your layout
.../en/about ... seems very logical to me. I would go with that.
As far as translating longer blocks of text such as a blog entry, why not
use a language indicator in your database table for each entry. For example
lang == en
title == 'My title'
blog_entry == my entry
then for
74 matches
Mail list logo