Just a personal opinion: web2py should come out of the shadows of django.
Two of the three quotes are directed towards django.
Hi,
I get the below error in GAE. Unable to write to file
/base/data/home/apps/s~123-check/1.354481446592778594/applications/init/languages/pl-pl.py
In fact it is repeated for other languages too. Please note that I'm not
using any translations (my guess is some of the gluon tools may be using
Massimo,
Since it is on GAE, I don't have the full traceback (if there is another
way to get the traceback, pl let me know). I got only the below two types
of errors:
routes_out: [/init/default/index] not rewritten
Unable to write to file
/base/data/home/apps/s~123-check/1.354481446592778594/a
Below works for me:
steps I followed. Your context may differ and customize accordingly.
1) define a db model with the fields you want; I wanted all emails to be
stored too, so I defined this model
2) define two functions - a contact fn that gets called from template; the
contact fn itself calls
You can see it working at: 123-check.appspot.com/init/default/contact
is there any progress in including it in admin?
I couldn't download the compiled plugin but downloaded and from the
excellent docs, was able to include into my app. But making it part of
admin will be great.
Joseph
Am not sure where Yarko is now-a-days, but he used to provide replies in a
manner that not only provided answers you were looking for but made you
rethink the problem itself. I have his replies stored.
Anthony is active both here and in stackoverflow. I can't even keep up here.
And one time, Ma
Hi all,
I am just starting to use compute field. Here is my db definition looks
like (it is in a module)
class Entries(object):
.
def define_tables(self,db):
Field('permalink',type='text',required=True,compute = lambda row:
self.get_permalink(row)),
.
d
Congrats to everyone. If people are still using 1.99.2 (or older version),
is there a place of reference for those versions? At last the n - 1 (n =
latest version)?
BTW, I like to new layout
Rgds,
Joseph
There should be an option in google groups to like a reply which brings a
bit of smile :-)
Module import work in standalong web2py but not in gae. Version: 1.99.2
(2011-09-26 06:55:33). Help appreciated.
Thanks,
Joseph
I upgraded to 1.99.4 and it works :-)
But there is another issue.
from gluon.contrib.markdown import markdown2 as markdown
in gae it throws error no module named markdown :-(
What are the ways in which such multiple layouts and choosing one at the
run time work? Something like wordpress themes? Modifying views/layout fix
the layout to the one that was deployed. But as in wordpress, if more
themes are installed how can a different one be chosen?
Thank you,
Joseph
Hi,
I am almost complete on a blog engine for myself and have also written
import from wordpress. I'm not stuck at mapping the urls. In wordpress I've
been using
domain//mm/slug
as url for posts and
domain/page
for pages.
How do I translate that in web2py? Can this be achieved via parame
I used this the below in routes.in
(r'^(?P\d{4})/(?P\d{2})/(?P\w+)/$',
'/init/default/index/\g/\g'),
but when I go to a url
localhost:/2011/11/a-slug
it returns invalid request error
then I tried
routers = dict(
BASE = dict(default_application = 'init',
default_controller = 'default',
yes anthony
Thx Jonathan & Anthony. Following works:
routers = dict(
BASE = dict(default_application = 'init',
default_controller = 'default',
default_function = 'index',
functions = ['index'],
),
)
Regards,
Joseph
routers = dict(
BASE = dict(default_application = 'init',
default_controller = 'default',
default_function = 'index',
functions = ['index'],
),
)
With the above routes, admin doesn't work. i.e: localhost:8080/admin/index
throws a password pg but after that the control goes to /admin/site and it
Hopefully last question on this thread.
routers = dict(
init= dict(functions = ['index',
'user',
'contact',
'sitemap',
'feed',
'error']),
)
above works for admin, appadmin & for other entries too
Not sure the below is a problem with routes or not.
I have a feed() function. If I browse
All,
Thanks to many forum members esp Anthony & Jonathan, I was able to finish
the blog engine that I have been developing to learn more about web2py. The
code is in https://bitbucket.org/id804097/minnaedu/src. The blog is
at: http://minnaedu.appspot.com/. This week, I will be migrating my
word
Looks nice Martin. Isn't routes.py needed to run this?
Joseph
Your code base should be adjusted. Both Anthony & Jonathan helped me with
similar problem for me.
Here is my
routes.py:
https://bitbucket.org/id804097/minnaedu/src/570149716878/webapp/routes.py
here is my
controller/index:
https://bitbucket.org/id804097/minnaedu/src/570149716878/webapp/applic
Power of web2py is in running the same code base both in GAE & webfaction.
Here is the blog engine (with imported wordpress entries) in webfaction:
http://www.jjude.biz
I wrote about it here: http://goo.gl/zidxe
Let 2012 be a great year.
Joseph
Hi all,
As much as I'm happy to reach the front page of hacker news with
minnaedu.appspot.com, it threw me out of the free limits of GAE. What
surprised me was that when the number of visitors to the page was just 500
& there are just 2 posts (basically this was a blog engine), I already
reache
Christian,
Did you manage to write this? I am looking for optimizing the GAE. Would
appreciate your inputs.
Thanks,
Joseph
Let us say I have the below code in db.py under models
define_table(db, )
If I change that to,
if settings.migrate:
define_table(db,...)
rest of the queries based on this table doesn't work. I want to skip the
definition altogether if the table is already present. Reason: I assume
that
To use this do you need APIs both from dropbox & janrain?
Thank you,
Joseph
Paul,
What kind of error are you getting?
I'm also starting to play with dropbox. Got two functions in default
controller (one is a callback function) but it works. BTW, I'm storing the
dropbox session as current.session.dsession
Joseph
http://www.jjude.biz
If anyone is interested, you can look into the code for dropbox connection
here:
http://goo.gl/QYT2y
This is my default.py. Look at dropbox_connect and process_dropbox.
Question: How can I automate this with cron? When I do it, it stops with
the redirect.
Thank you,
Joseph
I'm using this logging module with logging.conf. It works fine in
controllers & models. How to make it work in modules?
Regards,
Joseph
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: si
You may want to change the metadata author. Site looks good.
BTW, what plan of GAE are you on?
I have the below table definition
db.define_table('entries',
Field('tags', 'list:string',required=True))
and then inserted values. Now I am trying to select using the below
entries = db(db.entries.tags.contains('learning')).select()
It returns no values (though there are rows in db).
db: sqlit
Thanks Bruno.
I deleted the db and recreated (its only in db). The error still persists.
print type(entry.tags) returns list
and the field values are |learning|other|other|
I can see that in the field too.
Would you mind sharing your rest code? I think I'm missing something 'small'
Regards,
J
I went into shell in a new web2py directory and tried the below.
Surprisingly, I get empty output. Any explanations?
python web2py.py -S init -M
db.define_table('entries',
Field('title', type='string'),
Field('tags', 'list:string'))
>>> db.entries.insert(title='hello',tags='one,two,three')
1
Thank you Denes. I understood and this works fine at shell.
At web-application, I use the below code,
form = crud.create(db.entries,
next = URL('index'))
This gets me a simple text field for the 'list:string' field and whatever I
enter gets in as,
'one,two,three'
I tried to enter ['one','two'
Thank you. It works.
Just for completeness: I had designed a layout from scratch and hence had
left out web2py_ajax.html. For this widget to work, it is essential that
this file is included.
Regards,
Joseph
Dear All,
I was expecting when I am going to get this message from webfaction team
and I got it today. I have searched through this group and found that I
could use uwsgi server. Before I go ahead and make changes on the site, I
got few questions:
1. Currently it is running on apache. How do I m
oh my god. The memory usage dropped from 71 mb from 120 mb. webfaction
should use this as their default for installing web2py.
I can't thank you enough.
Just one more question:
1. I'm assuming there is no need to restart uwsgi; it automatically does I
suppose?
Thank you,
Joseph
sorry it is midnight here and i am too relieved that it is solved and too
excited that now i can get back to 'real' development.
dropped to 71 mb from 120 mb
use uwsgi.
Ref: https://groups.google.com/d/msg/web2py/LOdYk1C7B0I/JiMA_HzNqBQJ
can I rotate log (uwsgi.log) with this command? I don't want the log file
to go on increasing in size
What tools / code snippets are you using to monitor memory leaks?
There is an option -F while starting web2py. Is there any
documentation (or pointers) about how to use it?
Thank you,
Joseph
http://www.jjude.biz
Hi,
When I deploy the freshly downloaded web2py src under GAE I get the
below error:
IOError: [Errno 13] file not accessible: '//VERSION'
I do have python 2.7 & 3 installed. But under the GAE Launcher, python
path is set to /usr/bin/python where python2.5 is installed. Also I'm
able to browse
with the commandline. If someone can
help, it will be good.
Thank you,
Joseph
On Aug 28, 6:55 pm, Massimo Di Pierro
wrote:
> GAE requires 2.5. GAE has experimental support for 2.7 but we have not
> tested that yet.
>
> On Aug 28, 7:39 am, Joseph Jude wrote:
>
>
>
>
&g
Hi all,
I have the below form (leaving out non-essential code)
form = FORM(
DIV(
UL(
SPAN(LABEL('Name:')),
SPAN(INPUT(_type="text", _name="name", requires=IS_NOT_EMPTY(,
DIV(
LABEL("Items:"),
UL(
SPAN(INPUT(_type="text", _name="items[]")),
SPAN(INPUT(_type="text", _name="items[]")),
SPAN(INP
Thanks Anthony for the reply.
1) With your answer, I understand why the ['',''] is displayed. But is there
a way to change it?
2) [] is appended since I wanted an array. But in the mean-while I
experimented without [] and just having 'items' as the variable name for all
the three fields and got
Hi,
I define the below form in controller but the hidden field is not present in
the view. Note that, field 'totalitems' is not in the db. Let me know how to
add hidden fields to FORM.
form = FORM(
DIV(
LABEL("Checklist Items:"),
UL(
SPAN(INPUT(_type="text", _name="citems"),
IMG(_class="add", _
Hi all,
With help of members of this group, I was able to produce a dynamic form
where text fields can be added / removed at the client side. However, I got
one (hopefully the last) problem.
This form contains two sets of fields - in the first set, there is only name
which is mandatory; in the
Thanks to forum members (Anthony & Cliff), I was able to develop an
application which I hope to serve as a repository of checklists. It is
hosted at http://123-check.appspot.com/. This is just a first version and
I'm still learning. Your comments / suggestions are appreciated.
Jo
ive you the name of it's creator
> You should enable editing
> Allow other users to suggest more options
> Instead of 3 lines, and a plus, create one, and onfocus, automaticly
> create another line. This will create a better flow.
>
> Are you planning to open source this app?
Hello All,
As much as I wanted to avoid, eventually I had to add two columns and rename
a column to an existing table in GAE which contain data. Is there a way
(after much search, I'm not even asking for an easy way) to do that?
Thanks,
Joseph
Thank you for your reply. Is there a way to run gae specific code (with gae
objects) within web2py? or should this be executed only within gae
environment (may be I need to modify app.yaml too then?)
Thank you in advance,
Joseph
I was able to successfully added a field, filled with content and also
renamed a field (add a filed, copy and then delete). If it would be of some
use for others, here is how I did:
Ref the below stackflow thread. Alex offers a simple solution.
http://stackoverflow.com/questions/2906746/updatin
As much as I like backward compatibility, I believe the (web2py) code will
become unmanageable and bloated too. So at some point in time, it is better
to overhaul and not provide backward compatibility.
choosing a license type as liberal as web2py would be preferred. as far as I
could read and understand, foundation is not that liberal.
All,
I have been looking into automated testing of web2py. I have looked at the
below pages:
http://web2py.com/AlterEgo/default/show/260
http://packages.python.org/web2py_utils/test_runner.html
http://www.web2pyslices.com/slices/take_slice/67
http://ncdegroot.blogspot.com/2011/09/web2py-automate-
Amazing.
by the same token, is there any site which collects all the sites developed
in web2py? I couldn't find any. Not the appliances but the real sites built
with web2py. That might be a good booster for new comers into web2py to be
convinced that web2py is not just for learning but for real
Hi,
I want to customize the auth functionality to add a user id(or name).
This is what I've done so far.
DB:
from gluon.tools import Auth
auth=Auth(globals(),db)
auth.settings.table_user=db.define_table(
auth.settings.table_user_name,
Field('user_name',length=128,default='',requir
> > 2) in login, the password is sent in plain text. how to rectify
>
> You can use https to protect your password... http is not enough to do
> so...
>
I'm going to deploy in GAE, so I don't think https is an option. In
the out-of-the-box web2py passwords are not visible. I would like to
adopt
I thought of sharing this article:
http://blogs.forrester.com/appdev/2009/10/my-dream-stack-for-developing-web-applications.html
Joseph
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to
Hi,
When I execute the below code in GAE it throws an error: unsupported
operand type(s) for %: 'NoneType' and 'dict'. However this works ok in
a non-GAE environment. Any tips?
print db(db.paid_by.paid_by.lower()=='cash').select(db.paid_by.ALL)[0]
['id']
Basically what I have is the description
pm, mdipierro wrote:
> GAE does not support .lower()
>
> sorry
>
> On Oct 9, 12:31 pm, Joseph Jude wrote:
>
> > Hi,
> > When I execute the below code in GAE it throws an error: unsupported
> > operand type(s) for %: 'NoneType' and 'dict'. Howeve
All,
I'm just starting out with web2py. I have two questions:
: the url is mapped out as /app/controller/function. so this looks
like : http://domain/init/default/index. How to have url as http://domain/index?
: as I understand from the docs, all functions in the controller
(default.py) are expose
Okay with little bit of search, I found that,
-In GAE, one can't select a single field; so I selected all fields
(db.priority.ALL) and the error 1 vanished.
-In GAE, datetime field throws up error. I removed datetime fields,
and I didn't get any error. Once I introduce the datetime field in db
mod
e coercion code was last modified in r725.
>
> > > >http://code.google.com/p/web2py/source/diff?spec=svn743&r=725&format=...
>
> > > > If the bug is not in 1.56.2, try using 1.56.2 until this can be fixed/
> > > > patched.
>
> > > > Rob
web2py admin is not supported in GAE. However you can access GAE's
admin from _ah/admin
On Feb 26, 6:04 am, Jarod Liu wrote:
> I followed the linkhttp://mdp.cti.depaul.edu/AlterEgo/default/show/186
> to deploy web2py on local GAE, but failed.
>
> my platforms:
> 32bit linux
> gae_sdk 1.1.9
> we
All,
I am glad to say that my first app on web2py is hosted in GAE, thanks
to ease of programming in web2py. It is my attempt to learn new
concepts (cloud computing, SAAS etc) utilizing my experience (on
helpdesk, service desk). It is hosted at: http://y-a-t-s-y.appspot.com/.
I blogged about it at
If I buy the book now, will there be any discounts for the 2nd
edition; or it is better to wait for the 2nd edition.
Thx,
Joseph
On Mar 15, 9:12 am, Jeffield wrote:
> I just posted a amazon review with the correct page count.> but I am shooting
> for a second edition by summer.
>
> who-hoo
>
>
I hope I can say the below with the hope of raising some healthy
discussions rather than hurting anyone (which is not my intention)
1) web2py should be hosted on its own (like web2py.org / web2py.com or
something like that). Current URL gives a 'first impression' that it
is a college project
2) op
I've created a yahoo pipe to aggregate blog posts (google blog alert)
& tweets (twitter search). if you blog about web2py, please let me
know the feed URL and I'll add (in fact you can clone the pipe and
create your own too). If there are other sources (not aggregate
sources) - that you would like
I'm assuming that you want to validate the user via google auth and
then allow the authenticated user into your application. Sometime
back, i did this for a desktop based application updating a
application hosted in appengine (after authentication). I wrote abt it
here:
http://www.jjude.com/2008/0
All,
Just a question on the best practice - in terms of development &
continuous maintenance. web2py (like django) allows to define forms in
controller itself. And it allows having 'business logic' embedded in
views too. To bring out the application quickly, such mixing is fine.
But what about lon
>
> The goal is a maintainable and extensible app.
>
> The devil is in the details.
>
> Questions of "truly MVC" are like "truly agile" or "truly capitalist /
> market economy" or "truly social" --- as long as you don't loose the reas
Is there any guide/documentation on how to create stand-alone
applications of web2py (on windows/mac)?
Thanks,
Joseph
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this grou
ezip it,
> as long as you comply with the license.
>
> On Mar 24, 8:05 am, Joseph Jude wrote:
>
> > Is there any guide/documentation on how to create stand-alone
> > applications of web2py (on windows/mac)?
>
> > Thanks,
> > Joseph
--~--~-~--~~-
lso install your "init" app bytecode compiled so that you do
> not give away the source code.
>
> Massimo
>
> On Mar 24, 10:48 am, Joseph Jude wrote:
>
> > Massimo,
> > I understood the license part. I believe using web2py, I could
> > create .exe &
I have this db definition:
db.define_table('status',
SQLField('name'),
SQLField('sort_order', 'integer'))
I've inserted sample values like:
if len(db().select(db.status.ALL)) == 0:
db.status.insert(name='New', sort_order=1)
All,
I have used routes.py for URL mapping and it is working as expected.
However I can type the default URLs (/init/default/index, /init/
default/*) on the browser and it still accepts it. How can these
default URLs be blocked?
Thank you,
Joseph
--~--~-~--~~~---~--~
Hi all,
I'm not sure if anyone of you got this error while running on
appengine (locally, using appengine launcher).
: [Errno 13] file not accessible
going through the err pg, I see this at the end.
web2py_path = os.environ.get('web2py_path', os.getcwd())
web2py_version = open(os.path.joi
Hi All,
What is needed to have userid rather than email in the user
registration page of Auth?
Thank you,
Joseph
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, se
Hi,
What are the testing tools available within web2py? I know doctests
can be used. Is there a client test tool too (something like what
Django has)?
Thank you,
Joseph
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
I was one of the guys who lamented lack of blogs on web2py. So here
I've written a blog post:
http://www.jjude.com/2009/04/07/why-i-chose-web2py-for-developing-yatsy/.
Feel free to comment/digg/stumble/twit.
Joseph
On Mar 22, 11:04 pm, Kent Borg wrote:
> Datapoint: I have been studying and pla
Hi all,
I'm implementing api for my application. I've written other controller
functions. However I need implement the authentication. I am not able
to find a way to use the default Auth(). I thought of the below
option:
at client (i.e: calling applications)
- encode userid & password
- pass it a
Hi all,
I have a function as below. This is called as part of API function
rather than from the browser.
def assign():
print request.vars.fields
if request.vars.fields:
case_values=json.loads(request.vars.fields)
ret_dict=api.assign_case(db,case_values)
else:
r
;assign" function expects the request.vars.fields to be in JSON.
> This should do it but I have not tried it.
>
> data = {'fields': simplejson.dumps({'case_id': 16, 'assign_to':
> 'age...@example.com'})}
> data = urllib.urlencode(data)
&g
87 matches
Mail list logo