I followed the example for the REST API (multiple times actually). However
I keep getting *"**no matching pattern"* every time.
In fact it looks like the auto pattern is not generating because when I
navigate to
api/patterns.json, I see
{"content": "auto"}
instead of the beautiful rendering
Ok, SQLITE does not allow it, so you can try a different approach.
Remove the unique and the notnull
*Field('unikey'', compute=lambda row: "%(user)d_%(location)s" % row)
add a validator.
db.site.unikey.requires = [IS_NOT_EMPTY(), IS_NOT_IN_DB(db, ' site.unikey')]
*
--
The solution was that I needed to get rid of the following in my YUI 3 code:
headers: {
'Content-Type': 'application/json'
}
Woohoo!! I can now send and receive JSON data :-D
On Sunday, December 30, 2012 8:55:34 PM UTC-8, b00m_chef wrote:
>
> This might be a web2py b
However. I just tried it and was told it can't be done.
OperationalError: Cannot add a UNIQUE column
Error snapshot help
(Cannot add a UNIQUE column)
Bummer.
BR,
Jason Brower
On Sun, Dec 30, 2012 at 8:16 AM, Bruno Rocha wrote:
can see two options.
1. Use form validation:
def check_user(fo
I'll take number 2. :) Looks much cleaner to me! I new about number 1 but was
hoping to see something that sat in the model. Thanks.
BR,
Jason Brower
On Sun, Dec 30, 2012 at 8:16 AM, Bruno Rocha wrote:
can see two options.
1. Use form validation:
def check_user(form):
query = db.site.
The monitor tool runs on Flask I am sure it will be easy to write a web2py
version of this. Maybe as a plugin.
Em 31/12/2012 00:09, "Bruno Rocha" escreveu:
>
> Running delayed jobs with web2py and Redis Queue:
>
> http://rochacbruno.com.br/web2py-and-redis-queue/
>
> Bruno.
>
--
Hm ok, I think that threading error is just a red-herring. If you feel
comfortable enough, I could try and import your setup into a spare gear on
my account and triage it that way. You can take an exact export with the
rhc snapshot command and I can import it and see if I can pin down what's
up
On Mon, Dec 31, 2012 at 11:37 AM, Bruno Rocha wrote:
> DONE!!!
>
> 1. create a file called web2py-rq.py
>
> #!/usr/bin/env python
> import sys
> from rq import Queue, Connection, Worker
>
> # Preload libraries
> #import library_that_you_want_preloaded
>
> # Provide queue names to listen to as argu
I have static versions of my pages generated by automatically
headlessly snapshotting my AngularJS rendered pages.
When JavaScript is disabled or a scraper views the site; I want the
static versions to be served. Otherwise I want to server the
JavaScript-heavy files.
How do I do this in web2py; a
I have been trying to get web2py to read a post request sent from
javascript, but without any success. I hope you guys can help figure out
what is going on. Here is the code:
View:
YUI().use("json-stringify", "io", "dump", "json-parse", function(Y) {
Y.io('data', {
method: 'POST',
DONE!!!
1. create a file called web2py-rq.py
#!/usr/bin/env python
import sys
from rq import Queue, Connection, Worker
# Preload libraries
#import library_that_you_want_preloaded
# Provide queue names to listen to as arguments to this script,
# similar to rqworker
with Connection():
qs = ma
Keep in mind that you should be careful about when and where you enable
generic views. The reason they are not always enabled by default is that
they can allow private data to be leaked -- you may pass extra data to an
HTML view that does not get rendered by the view (e.g., data used only to
ev
Just like this: https://github.com/ui/django-rq
We shoukd have a web2py-rq
--
Would be better to find a way to start the rqworker inside the web2py
environment
python web2py.py -S myapp -M -R rqworker
how to do it?
--
1. Instal Redis
apt-get install redis-server
2. Install rq
sudo pip install rq
3. Create a file in modules called queued_functions.py
#!/usr/bin/env python
#-*- coding:utf-8 -*-
# need to put this for mail to work
import sys
sys.path.append("/path/to/web2py")
from gluon.tools import Mail
If this helps.
I noticed two things happen after I install the web2py script.
- standard installation script - the welcome application works fine
- edit the db.py file to switch from SQLITE to MYSQL
db =
DAL('mysql://myusername:mypwd@localhost/databasename',pool_size=1,check_reserved=['al
Upgraded my web2py application on webfaction to latest version 2.3.2. -
actually did a clean installation of web2py both locally and remotely.
Created a new version of the mysql database instance as well - both local
and remotely.
Clean installation locally as well including database. Every
I was randomly tinkering around and discovered websocket_messaging.py
I've got that running and it appears to be receiving messages from the
sample functions but I can't seem to get them to actually display in the
browser. I was wondering if there was some sort of nice, canned websocket
javascr
My bad:
Assigning to a form.vars item before calling to .process() works
The issue is that the first code posted by Joe tests for the boolean value
of form.vars.upload (an instance of the file storage object) and that
object always evaluates to False, so:
if request.vars.update:
is omitt
Could you show an example?
On Sunday, 30 December 2012 15:11:12 UTC-6, rochacbruno wrote:
>
> Hi, I recently discovered a nice tool called Python RQ
>
> It is the same as Celery or web2py scheduller, but I find it easy to
> install and manage.
>
> http://python-rq.org/
>
> I just configured this
Seems like a good idea. What do other think? If the difference is only in
the type, could we simply override the value of type using a class variable
and use the widget method of the base class?
Massimo
On Sunday, 30 December 2012 12:01:06 UTC-6, Calvin wrote:
>
> Hi Massimo
>
> Here is a patch
This
form=SQLFORM(db.fileobject)
if request.vars.upload:
form.vars.filename = request.vars.upload.filename
if form.process().accepted: ...
should work. Please open a ticket.
On Friday, 28 December 2012 03:15:52 UTC-6, Joe Barnhart wrote:
>
> I'm not sure why this is difficul
Hi, I recently discovered a nice tool called Python RQ
It is the same as Celery or web2py scheduller, but I find it easy to
install and manage.
http://python-rq.org/
I just configured this as my mail sender on web2py app, works very well.
--
I suspect you're trying to give a multi-file upload in-the-same-page
solution as Google and other brands do: AFAIK the standard upload widget
cannot handle multiple submissions in one form, but you could implement
your own widget with the help of this thread:
https://groups.google.com/d/topic/w
There are different issues with streaming.
web2py supportes https streaming, if modified since, and range requests.
This means that if the client is smart enough it will cache previously
downloaded data and will request data in chunks (range requests) which will
then be streamed by the server.
> El domingo, 30 de diciembre de 2012 17:32:44 UTC-3, Magnitus escribió:I
am currently in the process of writing a
> netflix/youtube-like app that allows you stream movies on your local LAN
(eventually, perhaps over the internet even, but that is
> not an immediate priority, especially given my
10x for the info.
Is there any benefit for using the server vs. the desktop flavor?
About pgAdmin, I don't really understand what you mean.
We have been using posgreSQL with web2py in production for almost 3 years
now. Using phpPgAdmin on our production was never an option - always a
necessity. Ma
El viernes, 28 de diciembre de 2012 06:15:52 UTC-3, Joe Barnhart escribió:
>
> I'm not sure why this is difficult, but I see many posts about this when I
> search, yet none exactly work for me. This seems like it should be easy
> but is surprisingly difficult in web2py.
A possible workaround (
Worked! :) thanks
On Sunday, 30 December 2012 19:59:28 UTC, Massimo Di Pierro wrote:
>
> How about
>
> #model
> auth.settings.extra_fields['auth_user'] = [Field('personal_info','text')]
>
> #controller
> def profile(): return dict(user=db.auth_user(request.args(0,cast=int)))
>
> #view profile.html
I am currently in the process of writing a netflix/youtube-like app that
allows you stream movies on your local LAN (eventually, perhaps over the
internet even, but that is not an immediate priority, especially given my
limited data transfer allowance by my ISP) using a web interface.
I am writ
I will try to do it, but, since I have confidential data I don't know if I
will be able do it. Meanwhile I will try to make a fresh app and go step by
step.
El domingo, 30 de diciembre de 2012 18:19:42 UTC+1, Niphlod escribió:
>
>
>
> On Sunday, December 30, 2012 2:33:42 PM UTC+1, Wonton wrote:
How about
#model
auth.settings.extra_fields['auth_user'] = [Field('personal_info','text')]
#controller
def profile(): return dict(user=db.auth_user(request.args(0,cast=int)))
#view profile.html
{{extend
'layout.html'}}{{=user.first_name}}{{=user.personal_info}}
Mind that profile() should only
Arnon,
I test it with 12.04 server 64 bit under VirtualBox with windows 7 64 bit
as guest and it works fine. It surely work under ubuntu desktop, but not
tested. The purpose of the script is to deploy rapidly a new prod/stage
server with basic configuration that you can tweaks for your needs later
I will be glad, if you want to...
:)
Richard
On Fri, Dec 28, 2012 at 11:12 PM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:
> Would you suggest we include it in web2py/scripts/?
>
>
> On Friday, 28 December 2012 14:17:12 UTC-6, Richard wrote:
>>
>> Hello,
>>
>> This is a new year gif
Hi Massimo
Here is a patch which updates the date, time and datetime widget. If this
approach is acceptable, I am happy to provide a patch for the other types
as well.
Calvin
On Sunday, 30 December 2012 00:50:59 UTC+8, Massimo Di Pierro wrote:
>
> I think this would be a good idea but somebody
On Sunday, 30 December 2012 17:46:57 UTC, sasogeek wrote:
>
> can i create a new view so that i can have something like
> http://...[app]/[controller]/[view]/profile/[user_id] and based on the user
> id, the view displays a particular profile? like the show controller/view
> in the example ima
can i create a new view so that i can have something like
http://...[app]/[controller]/[view]/[user_id] and based on the user id, the
view displays a particular profile? like the show controller/view in the
example images app in the documentation...? and even if so, can i have some
code guidanc
well in my application, i allow users to register and login using the auth,
but auth only exposes http://...[app]/[controller]/[view]/profile
which is the profile of the currently logged in user. i want to create a
link so that other users can click on it to see other people's profiles.
On Sunda
How do I manage the database with PGAdminII ?
Which database should I choose?
What would be the user-name?
How can one install phpPGadmin on this configuration?
On Sun, Dec 30, 2012 at 2:47 PM, Arnon Marcus wrote:
> Is this for the server or desktop flavor ?
>
>
> On Sun, Dec 30, 2012 at 2:16 P
On Sunday, December 30, 2012 2:33:42 PM UTC+1, Wonton wrote:
>
> But it's strange. I have all this code inside my default.py controller,
> inside web2py.
> Indeen, these 2 lines:
> query = db(db.table.field1=='What I am looking for')
> query.update(field2='hello')
> work perfectly even witho
>
> 1) Regarding to the update:
As far as I know, to update a row I should do something like this:
>query = db(db.table.field1=='What I am looking for')
>query.update(field2='hello')
>rows = query.select()
>
>row = rows[0]
>row.update_record()
>
>
Note, you could also have
But it's strange. I have all this code inside my default.py controller,
inside web2py.
Indeen, these 2 lines:
query = db(db.table.field1=='What I am looking for')
query.update(field2='hello')
work perfectly even without the db.commit().
But, this code:
query = db(db.table.field1=='What I am l
for future references:
issuing db.commit() is necessary only if you're using DAL outside web2py.
As soon as the function in the controller is executed, a db.commit() is
issued automatically as long as no exceptions are thrown.
query = db(db.table.field1=='What I am looking for')
query.update(f
Is this for the server or desktop flavor ?
On Sun, Dec 30, 2012 at 2:16 PM, Arnon Marcus wrote:
> Will this work with ubuntu 12.10 ?
>
>
> On Sat, Dec 29, 2012 at 6:12 AM, Massimo Di Pierro <
> massimo.dipie...@gmail.com> wrote:
>
>> Would you suggest we include it in web2py/scripts/?
>>
>>
>>
Will this work with ubuntu 12.10 ?
On Sat, Dec 29, 2012 at 6:12 AM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:
> Would you suggest we include it in web2py/scripts/?
>
>
> On Friday, 28 December 2012 14:17:12 UTC-6, Richard wrote:
>>
>> Hello,
>>
>> This is a new year gift for the one
Hello viniciusban!
The line "db.commit()" solved these 2 problems, thank you very much!
Regarding to why I used "update_record()" without parameters, I took it
from an example I saw on Internet, maybe the example was wrong or maybe
(probably) I missunderstood the example.
Thank you very much a
46 matches
Mail list logo