I made some test and successfully packaged web2py!
There is only a caveat, that unfortunately makes useless python-for-android
right now:
If you want to use it without kivy module (an opengl es 2.0 ui toolkit),
then you might want a lighter java bootstrap, that we don't have right now.
Help is
Hello. I create a simple component (a .load file) with a table in it.
If I call it directly via browser then it would render as expected.
But calling it from within a view (with LOAD method) won't render its
format (border, spacing, etc). I notice that it only happens with
table. Others just
Dear all,
i have a server and i have a apache installed how can i tell apache
to the when someone asks for www.domain.com , apache gives it the
website at my localhost:8080 .. how can i do that
2012/1/10 Web2Py Freak halna...@gardeniatelco.com:
Dear all,
i have a server and i have a apache installed how can i tell apache
to the when someone asks for www.domain.com , apache gives it the
website at my localhost:8080 .. how can i do that
If you can not run apache on port 80 you
I got it working towards the end of this post. I've included to original
text because I thinks it explains my problem better. Solution is in red.
I obviously didn't state my problem clearly. The issue isn't replacing all
of the loaded html with an image, just the link that gets clicked. A more
i have IIS on port 80 i want it on port 8080 !!
On Tue, Jan 10, 2012 at 5:12 AM, Web2Py Freak
halna...@gardeniatelco.com wrote:
i have IIS on port 80 i want it on port 8080 !!
On your apache config file change the listen 80 to say listen to 8080
Cheers,
./fxk
--
Past hissy-fits are not a predictor of future hissy-fits --Nick Holland
i did all that :
LoadModule wsgi_module modules/mod_wsgi.so
Listen 8080
servername : localhost:8080
NameVirtualHost *:8080
VirtualHost *:8080
DocumentRoot C:/web2py/applications
ServerName localhost
Directory C:/web2py
Order allow,deny
Deny from all
/Directory
Location /
Order deny,allow
ServerAlias www.domain.com
or if you don't want to use localhost at all anymore you can replace
ServerName localhost with ServerName www.domain.com
Kenneth
i did all that :
LoadModule wsgi_module modules/mod_wsgi.so
Listen 8080
servername : localhost:8080
NameVirtualHost *:8080
Two things:
First, the my_script.py is the program you want to run to get output
from. I just used a Python script as an example. This line could just as
easily be:
output, error = run_command('ls', '-l')
to list all files in a directory (though you would typically use Python's
os module for
How do I get javascript in a component plugin to execute each time after the
component is loaded so the javascript is applied to the loaded component
elements?
I'd encountered the similar problem and discussed before:
Hello,
Maybe this is a stupid question.
But I could not find the answer anywhere
I have, for example, 2 tables:
db.define_table('account',
Field('name','string'),
migrate=False)
db.define_table('user',
Field('account_id',account),
Field('name','string'),
migrate=False)
Hi
I'm looking for input on how people manage their database connection
when setting up your app in a Mercurial repository.
If I just add my app and db.py to my repository, then every time I setup
a different development machine to access it, the app will, by default,
point to the same
On Tuesday, January 10, 2012 8:56:34 AM UTC-5, Marcello wrote:
Hello,
Maybe this is a stupid question.
But I could not find the answer anywhere
I have, for example, 2 tables:
db.define_table('account',
Field('name','string'),
migrate=False)
db.define_table('user',
Yes... I forgot to say that...
But this is a legacy database, and I can't rename the field
Thanks Anthony
On 10 jan, 12:16, Anthony abasta...@gmail.com wrote:
On Tuesday, January 10, 2012 8:56:34 AM UTC-5, Marcello wrote:
Hello,
Maybe this is a stupid question.
But I could not
its not working !!
On Tuesday, January 10, 2012 5:12:31 AM UTC-5, Cahya Dewanta wrote:
Hello. I create a simple component (a .load file) with a table in it.
If I call it directly via browser then it would render as expected.
But calling it from within a view (with LOAD method) won't render its
format
Just found this
https://github.com/elcio/badmin
I am going to test it more, looks very nice!
This may be a python question.
My controller returns a 'int' value converted into 'str' (e.g.
123456789) to view.
View renders it --- 123456789.
I wish to render it like -- 12,34,56,789
How do I do it?
Thanks,
Vineet
What does it do? There's no description, just that it's an automatic
admin.
This StackOverflow question should answer
it:
http://stackoverflow.com/questions/1823058/how-to-print-number-with-commas-as-thousands-separators-in-python-2-x
The second part of the answer can help you if you are trying to add commas
in a non-standard way.
Using what Kenneth just said, are you trying to access web2py using this
URL?
http://domain.com:8080/
Also, are you restarting Apache every time you make a change?
On Monday, January 9, 2012 11:54:08 PM UTC-5, Rahul wrote:
I did not get it...
What would be an equivalent query I would need to pass for below? I
need to just select rows (Friend_name column for all status that are
Friend and reguserid is whatever the logged in users id) for below
You might be able to do something like this to trick it into being a
virtual field:
db.user.account = Field.Virtual(lambda row: row.account_id)
This just makes a virtual field account which returns the value of
account_id. This will only work with reads, though. If you try to set a value
to
i did what Kenneth said , and i am restarting the Apache everything i
change anything , i am using a VPS at arvixe.com i have IIS running
on localhost:80 and apache running on localhost:8080 and its really
good locale now i just want to make a domain go to localhost:8080 and
then i will handle it
may be
db.user.account = db.user.account_id
should work in controllers
--
Bruno Rocha
[http://rochacbruno.com.br]
On my dev machines, I'm using SQLite, so the database is the same
regardless of what machine I'm using. In your case, you could set your
db.py file to detect your machine's host name and use the appropriate DAL
string accordingly.
For example:
import socket
hostname = socket.gethostname()
if
Are you trying to make http://domain.com:8080 go to localhost:8080, or are
you expecting http://domain.com(:80) to go to localhost:8080?
Hi,
My environment: latest web2py, ubuntu, postgresql, nginx, uwsgi.
I need to handle multiple subdomains:
http:// sub.domain.com / *args ? vars*
All of them must internally point to the following url structure:
http:// www.domain.com / app / controller / function / sub / *args ? vars
*
Bruno, I've never tried that way before. Will that cause web2py to create a
new field account?
i want when someone go to www.mydomain.com he will go to localhost:
8080
On Tue, Jan 10, 2012 at 1:16 PM, Ross Peoples ross.peop...@gmail.comwrote:
Bruno, I've never tried that way before. Will that cause web2py to create
a new field account?
You are right, I am wrong (forget what I said)
This works only for Rows
rows = db(db.table).select()
for row in rows:
On Jan 10, 2012, at 6:04 AM, Jim Steil wrote:
I'm looking for input on how people manage their database connection when
setting up your app in a Mercurial repository.
If I just add my app and db.py to my repository, then every time I setup a
different development machine to access it, the
Ross
That's all I'm looking for is what others are doing to manage the
situation. I should have specified that I'm using MySQL. When I'm at
the office, it is a different server on the network. When at home or on
my laptop I'm running a local copy of MySQL.
Before web2py I was using
Thank Jonathan, I didn't realize that it would be created
automatically. I'll just keep 'databases' out of the repo altogether then.
-Jim
On 1/10/2012 9:25 AM, Jonathan Lundell wrote:
On Jan 10, 2012, at 6:04 AM, Jim Steil wrote:
I'm looking for input on how people manage their
I'm not sure there's a standard way of doing it if you're not using
sqlite, but I personally have the database pointing to a name in my
hosts file. So I'll configure configdbhost to be my configuration
database (in the hosts file on the box) and then have the lines (split
so that if the
On Tue, Jan 10, 2012 at 12:39 PM, Ross Peoples ross.peop...@gmail.comwrote:
What does it do? There's no description, just that it's an automatic
admin.
It creates a very nice and clean easy customizable admin from db tables
take a look
http://www.diigo.com/item/image/121xl/vsj5?size=o
--
On Jan 10, 2012, at 7:32 AM, Jim Steil wrote:
Thank Jonathan, I didn't realize that it would be created automatically.
I'll just keep 'databases' out of the repo altogether then.
For the benefit of other readers, the issue that Jim is referring to is that
hg, like many source-management
Ok, that's what I thought. You cannot do this easily. There are only two
way that I know of to make this happen: configure your router to map port
80 to 8080 internally (breaking IIS), or to use an HTTP proxy. The reason
being that whenever you go to a URL, it implicitly connects to port 80.
We are close to a complete tool, so there is still the ease of reporting in
web2py.
Ovidio Marinho Falcao Neto
Web Developer
ovidio...@gmail.com
ovidiomari...@itjp.net.br
ITJP - itjp.net.br
83 8826 9088 - Oi
Seems like practicality beats purity :p
(although the true relevance of the above line in the context of
web2py can be discussed)
how can i use an HTTP proxy ?
Thanks Ross Peoples.
That link is very helpful.
I can now build a similar method for 12,34,56,789 format.
-- Vineet
On Jan 10, 7:43 pm, Ross Peoples ross.peop...@gmail.com wrote:
This StackOverflow question should answer
Hello Massimo and all,
I'm trying to use web2py for several projects of mine.
I always find a problem that should be solved if I could set the table name.
Let me show an example...
Suppose that I have this:
db.define_table('person12345', Field('name'))
db.define_table('dog12345',
Just a reminder : See the pinned message at the top of the web2py-
users list for more details.
Mr.NetAdmin
Ah silly me. Developer tools should be my friend :) now I can see that
my table inherit style from skeleton.css which set 'border: 0 none'.
Thank you for pointing it out, Anthony!
If you run Apache on port 80, you can setup an Apache site to proxy to
another web server. For example, I have this Apache site file to forward
all requests for domain2.com to another web server on the local network:
VirtualHost *.80
ServerName domain2.com
Proxy *
Order
Hi guys,
I made a plugin to render as responsive all web2py tables. It uses a
combination of css media queries and javascript to accomplish the goal. You
can find it on my github:
https://github.com/angeloc/web2py-responsive-tables
It's far from perfect, I'm open to suggestions!
Sincerly,
The parametric router cannot do this but the regular web2py routing
does.
Here is an example
routes_in = (
('.*:https?://yourdomain.com:(GET|POST) /$anything','/app/
$anything'),
)
the .* means the route applies to all client IPs. https? means you
take both http and https. (GET|POST) means the
keep us posted.
On Jan 10, 9:37 am, Bruno Rocha rochacbr...@gmail.com wrote:
On Tue, Jan 10, 2012 at 12:39 PM, Ross Peoples ross.peop...@gmail.comwrote:
What does it do? There's no description, just that it's an automatic
admin.
It creates a very nice and clean easy customizable admin
Love this quote.
On Jan 10, 9:59 am, stefaan stefaan.hi...@gmail.com wrote:
Seems like practicality beats purity :p
(although the true relevance of the above line in the context of
web2py can be discussed)
I have an app, but I cant join (because I won latest edition)
On Tue, Jan 10, 2012 at 2:56 PM, NetAdmin mr.netad...@gmail.com wrote:
Just a reminder : See the pinned message at the top of the web2py-
users list for more details.
Mr.NetAdmin
--
Bruno Rocha
[http://rochacbruno.com.br]
Hello,
I came across an issue when retrieving session data. I simplified the
app to basically this code in a model:
# -*- coding: utf-8 -*-
try:
session.i += 1
except:
session.i = 1
It works fine in a fresh new application (i.e. session.i increases its
value).
If I switch to use sqlite
I am trying to do a read only view of my form using the elements()
method of the form;
Although I cant seem to figure it out.
I am doing the following
in view.html
{{for k in form.elements():}}
{{= k }}
{{pass}}
Not quite the result i am looking for.
I want to be able to while looping
1. Removing all line breaks from the script and writing
response.js(script) in the plugin controller. Again no luck.
Actually, this should work, but the syntax is:
response.js = '''script$(function()
{$(.replacewloading).click(function() {$(this).parent().html('spanimg
Hi,
I was trying to distribute an application with web2py binary for
windows, but I required the PostgreSQL driver. So I copied the
psycopg2 files to site-packages in the web2py binary folder.
If I start a shell from an application, I can import psycopg2 and
connect to the database. However, it
Has this been answered already;
How do I change the class names to use bootstrap?
Thanks.
I am trying to do a read only view of my form using the elements()
method of the form;
Although I cant seem to figure it out.
I am doing the following
in view.html
{{for k in form.elements():}}
{{= k }}
{{pass}}
Not quite the result i am looking for.
I want to be able to while
What classes do you need to add? Once the form has been created, you can
add classes to individual elements via:
form.element('[selector goes here]')['_class'] = 'new class'
See http://web2py.com/books/default/chapter/29/5#elements.
If you need to add a class to an input widget specifically,
On Tuesday, January 10, 2012 3:43:13 PM UTC-5, Alexandre Miguel de Andrade
Souza wrote:
What is the diference to sqlform.grid or sqlform.smartgrid?
smartgrid is for exploring tables that are linked via references. It takes
a single table, and it automatically provides links from the
Thanks I think the semantics for forms is quite different from web2py.
I think it may be easier to use custom forms vs trying to do it this way.
On 1/10/12 3:54 PM, Anthony wrote:
What classes do you need to add? Once the form has been created, you
can add classes to individual elements via:
Hi Bruno
I just downloaded the zip file, but it seems broken. Did you re.factor
config.db.uri to be config.db_options.uri etc? I think you still a few
edits to do. I tried to debug but in the end I did not have enough time but
I am really looking forward to trying it again soon.
Thanks,
On Tuesday, January 10, 2012 4:14:02 PM UTC-5, David J wrote:
Thanks I think the semantics for forms is quite different from web2py.
I think it may be easier to use custom forms vs trying to do it this way.
Are you talking about Twitter Bootstrap? I thought that just provided CSS
styling
Yes sorry for the confusion
Here is an example from twitter:
form
fieldset
legendExample form legend/legend
divclass=clearfix
labelfor=xlInputX-Large input/label
divclass=input
inputid=xlInputclass=xlargetype=textsize=30name=xlInput
/div
/div
/form
Here is the web2py output. Having trouble
The other big difference is that you can pass a query (in place of the
table name) to .grid but not .smartgrid. Instead with .smartgrid, you
pass query filters in the constraints argument.
-Jim
On 1/10/2012 2:58 PM, Anthony wrote:
On Tuesday, January 10, 2012 3:43:13 PM UTC-5, Alexandre
Assuming you don't need the fieldset and legend (which don't look useful in
this example), I would think the Bootstrap styling would still work fine
with the web2py form. If you really need to restructure, though, then
creating a custom form should be fairly
easy:
I was wondering if we could test a controller from the shell?
./web2py.ps -S app -M
then do something like index
and see the result in the shell
The reason I am asking is I am trying to debug an on_accept method I
defined and I want to debug it in the shell
Thanks.
Yes, the -S option takes a full app/controller/function path, so you could
do:
python web2py.py -S app/default -M
and you will be in the context of the default controller and can call any
function in that controller from the shell.
Anthony
On Tuesday, January 10, 2012 5:08:21 PM UTC-5, David
Hello everybody,
during last Christmas Holidays I've tried to port web2py to python3. I
didn't use 2to3. You can see what I've done at
https://ec2-50-17-139-112.compute-1.amazonaws.comhttps://ec2-50-17-139-112.compute-1.amazonaws.com/admin/default/site
where
it runs on apache2 with mod_wsgi
You should be able to build your own web2py executable using setup_exe.py.
I've been able to include pyodbc that way for a project that needed MS SQL
access - see no reason it shouldn't also work for the PostrgreSQL driver
too.
~Brian
I use the below:
is_local = request.client in ['127.0.0.1', 'localhost']
if is_local:
from local_settings import *
else:
from prod_settings import *
I got local_settings.py prod_settings.py. Through hgignore, I ignore
prod_settings.py so it doesn't go to my public repo.
P.S:
Congrats to all web2pyers . Its really motivate and feeling apriciated by
the world. Thanks to massimo and all contributors for giving such great and
flexible framwork.
Thanks for the input Joseph. I can see how that would work for me too.
-Jim
On 1/10/2012 7:46 PM, Joseph Jude wrote:
I use the below:
is_local = request.client in ['127.0.0.1', 'localhost']
if is_local:
from local_settings import *
else:
from prod_settings import *
I got
I create a file in the models, and never commit it, called 0-
settings.py, that goes
w2p_settings['dbcon'] = 'whatevent://me:mypass@myhost/mydb'
then, on db.py
try:
db = DAL(w2p_settings['dbcon'])
except NameError:
db = DAL('somedb://someotherguy:hispassword@otherhost/somedb')
this has
Hi,
In register screen if i do not provide password and verify-password still
the user does gets registered.
also able to login with that user. any solution to avoid the acceptance of
blank password
Thanks,
Viren
That's a one more example of web2py and python's victories. Thank you.
I also embrace the idea of thorough testing on simulated testing
environment as much as like the production environment.
I want to believe that web2py's wonderful DAL properly abstracts sql
dialects of databases. For my team, DAL is a irresistible charm over other
well established frameworks.
Does setup_exe.py work at all? When I run it, A PyFPDF Template
Designer pop ups. The line causing it is:
from gluon.import_all import base_modules, contributed_modules
Trying setup_exe_2.6.py, there is a syntax error in line 113:
if os.path.exists('dist/site-packages')
78 matches
Mail list logo