)
>
> Anyhow, contains has a special usage for list fields.
>
>
> On Thursday, September 20, 2012 5:07:46 PM UTC+1, Andrew Evans wrote:
>
>> I have since added format='%(title)s %(id)s' to the region table but the
>> listing is not being selected
>>
>>
Hello I am using Santize=True with some HTML permitted. For any invalid
characters or HTML added such as or , how can I produce a
response error message rather than escaping the code and adding it to the
database? So it just doesn't let you post it if there is any invalid markup
Any ideas
*chee
Hi I am trying to update the records in my database for a field that is
linked. I have two entries in the table channel. When I edited channel_name
field I expected everything would have changed (because it is linked). but
it did not. How do I go about changing the data?
*cheers
db.define_table(
Your right ty :-)
How can I select channel_name then from my view (so I don't have to change
a million entries)
{{for broadcast in schedule:}}
{{=broadcast.channel}}
Gah nvm :-P
Its 7 30 am I was a bit under the weather :-P
sorry :-(
On Tue, Jul 3, 2012 at 7:35 AM, Andrew Evans wrote:
> Your right ty :-)
>
> How can I select channel_name then from my view (so I don't have to change
> a million entries)
>
> {{fo
Hello I have a field for a table
Field('profile_name',length=64),
I would like to make sure special characters and whitespace can't be added
to it
How would I go about doing this? and produce an error message if it occurs
on form submission (div.error))
*cheers
Ok nvm I just read that web2py will not allow this by default *cheers
:-)
On Tue, Jul 3, 2012 at 10:47 AM, Andrew Evans wrote:
> Hello I have a field for a table
>
> Field('profile_name',length=64),
>
> I would like to make sure special characters and whitespace can
Hello I have the following field
Field('genre',requires=IS_IN_DB(db,db.genre.id, '%(title)s',
multiple=True), widget=SQLFORM.widgets.checkboxes.widget),
I am trying to figure out how to layout the checkboxes so there in a 3
column grid
Any ideas
*cheers
I was mistaken thank you for your help
I guess what web2py does is escape those special characters, is that
correct?
Anyway I used the IS_APHANUMERIC function
*cheers
Hello I am trying to use uploadify in my web2py app but I am having a bit
of difficulty no errors occur it just doesn't work
These are my controllers
def index():
return dict()
def myUpload():
form = SQLFORM(db.music)
if form.accepts(request.vars, session):
response.flash =
thank you for helping me
I looked at some of the documentation and figured out some things but I get
an IORERROafter uploading any ideas
here is my modified controller and my uploadify script I am using uploadify
version 3
def myUpload():
form = SQLFORM(db.music)
if form.accepts(request.
GREAT ty very much for your help :-)
*cheers
On Wed, Jul 4, 2012 at 1:29 PM, Relsi Hur wrote:
> here a very fast example.
>
> Em quarta-feira, 4 de julho de 2012 16h40min45s UTC-3, cheer10s escreveu:
>>
>> thank you for helping me
>>
>> I looked at some of the documentation and figured out so
Hello I am trying to figure out how to replace the submit button in SQLFORM
I would like to replace with
Upload
and add
Clear
My controller is
def index():
form = SQLFORM(db.music2)
if form.accepts(request.vars, session):
#db.music2.insert(song =
db.music2.song.store(request.v
Hello I have two functions one for querying the data base and one for
submitting data. I also have one view for the form and one load file for
the database query I then LOAD the load file into index view
{{extend "template.html"}}
{{=LOAD('default', 'ajax_example.load', ajax=True)}}
My Fo
Ok my approach was a bit off. I got the div to update on form submission.
But how to separate the form view from the same page as the view to display
updates?
which I think has to do with this
return XML('ajax("%s",[],"#song_list");' % URL('default',
'ajax_example.load'))
Any ideas
Spoke to soon the div does not update.
What I am after is the div song_list refreshing in real time. I appreciate
any help offered
*cheers
*controllers*
def index():
return dict()
def page_with_form():
return dict()
def ajax_example():
rows = db(db.music2.id>0).select()
return
Hello everyone and Happy New Year!
I was hoping to ask a few questions on working with existing databases in
CSV format that do not come from web2py. So here goes.
How can I work with the existing information, How would I make
changes/additions to the data using web2py. The imported CSV data wo
I was able to solve my problem with this if anyone is interested
import pytz
{{current_time =
datetime.datetime.now(pytz.timezone('America/Vancouver')).replace(tzinfo=None)}}
*cheers
On Thu, Jan 17, 2013 at 8:25 AM, Andrew Evans wrote:
> Hello web2py group! I am trying to find
Hello web2py group! I am trying to find a way to get the local time say PST
or EST so I can display a video based on that time.
Any suggestions? I was able to convert it to UTC but this doesn't really
help the situation
{{project_date = db(db.schedule).select(orderby=~db.schedule.date_in,
li
I am developing a search form in web2py, I create the form like this
Enter Keywords
Select Region
Choose a Region...
{{for region in region_query:}}
I was able to get it working thanks anyway everyone
--
Hi I did something I think which is similar
you can get the current time based on time zone like this
import datetime
import pytz
import time
current_time =
datetime.datetime.now(pytz.timezone('US/Eastern')).replace(tzinfo=None)
This allowed me to schedule videos to play at a given time
Not su
Ok so after doing a bit more research
I have come across this:
http://www.web2py.com/examples/static/epydoc/web2py.gluon.sqlhtml.SQLFORM-class.html
and I have done this
listing_id = request.args(0)
query = (db.listing.id[listing_id]) & (db.listing.userinfo[auth.user.id])
form = SQL
I am now getting this error
AttributeError: 'Table' object has no attribute
'SUBSTRING(listing.userinfo,5,(6 - 5))'
Using this code
listing_id = request.args(0)
query = db.listing[listing_id] and db.listing.userinfo[auth.user.id]
query = db.listing[query]
form = SQLFORM(db.listi
Hi Massimo thank you for you help!
What I was trying to do using crud.update initially was have a user update
one of their records. When they do this I would like to set a boolean value
that is in db.listing named 'confirmed' to False (confirmed=False) which is
readable=False and writable=False
I
Hello I am having a seemingly difficult time with this :-)
and I am hoping some one can aid in solving this :-)
I am trying to make an item reserved from start-date to end-date any ideas
*cheers here is my code
This my latest attempt googled and found this function
import datetime
def dateran
Hello I am trying to validate a form entry against existing entries in my
database on form submission. But user_start and user_end are returning as
None Type. How do I get the values of a form using SQLFORM
*cheers
if form.accepts(request.vars):
for project in project_date:
Hello I am trying to make a controller function upon submission of the form
validate against existing entries in the database
*this is the function:*
@auth.requires(auth.has_membership('second_year') or
auth.has_membership('admin'))
def second_year_checkout():
check_id = request.args(0)
I am trying to solve an issue in my code and hoping some of you can help
I have a cart functionality for *reserving* items based on a month / day /
year reservation. The problem is an extra entry is being added to the
database when I submit the form.
Any ideas how to fix this also will my *chec
How can I make an entry in a MySQL Field deletable and not the whole entry
I have a table structure with
Field('name')
Field('image')
I want to make an option for the image Field to be deletable using crud to
update the form
*cheers
and ty
--
grr nvm figured it out :-)
On Wed, Oct 10, 2012 at 12:15 PM, Andrew Evans wrote:
> How can I make an entry in a MySQL Field deletable and not the whole entry
>
> I have a table structure with
>
> Field('name')
> Field('image')
>
> I want to make a
Hello!
How can I get the date and datetime calendar jquery from SQLForm to appear
(when a time is being entered) on mobile platforms
*cheers
and ty
--
Hi I am having problems integrating this plugin
http://dev.s-cubism.com/plugin_uploadify_widget in to my form.
In my Models.py I have
from plugin_uploadify_widget import (
uploadify_widget, IS_UPLOADIFY_IMAGE, IS_UPLOADIFY_FILENAME,
IS_UPLOADIFY_LENGTH
)
db.define_table('video',
Fiel
Hi no its not on GAE
I do get the last post but its for the last category posted in here is a
link you can see :-)
http://www.fireflywra.com/forum
*cheers
On Wed, Jan 4, 2012 at 5:10 PM, Anthony wrote:
> What do you get with that query? Is this on GAE (on GAE, I don't think the
> id's are ne
Hey ty that helped enough to solve my problem
db((db.forum_post.category == db.category.id) & (db.category.id ==
forums.id)).select(db.forum_post.ALL,
orderby=~db.forum_post.id, limitby=(0,1))
the "forums" value is a loop through the categories :-)
*cheers
ty very much for your help
On Wed,
Hey there I have a new site available to show the web2py community. My
Friend/Business Partner/Team mate built most the code in other projects, I
just kind of tweaked it fixed a few bugs and added/subtracted some features
Anyway everything is coded in web2py including the forums... We had to snag
Really? works for me..
On Thu, Jan 12, 2012 at 3:53 PM, chawk wrote:
> Your link is not working :(
No worries no harm done :-)
On Thu, Jan 12, 2012 at 3:59 PM, chawk wrote:
>
> Okay, turns out I am not able to click on the anchor for this post or
> another post I just put up myself. Google is giving me a 404 error
> page. The problem appears to be on my end.
>
> Sorry,
Great advice! Fixed everything you suggested
On Thu, Jan 12, 2012 at 4:05 PM, chawk wrote:
> Your footer should follow the same layout as the nav bar, meaning 100%
> width across the screen.
>
> I cant really see the forum without signing up first.
>
> Your copyright symbol is not showing up.
>
I also removed the sign up unless you want to post an article or blog post
*cheers
On Thu, Jan 12, 2012 at 4:20 PM, Andrew Evans wrote:
> Great advice! Fixed everything you suggested
>
>
> On Thu, Jan 12, 2012 at 4:05 PM, chawk wrote:
>
>> Your footer should follow the s
ty very much
:-)
On Thu, Jan 12, 2012 at 4:33 PM, chawk wrote:
> I just checked it out again, the forum looks great!
ty everyone! Annet I did the changes you suggested but will have to work on
the forum styling later today. Great ideas though *cheers
On Fri, Jan 13, 2012 at 5:04 AM, Cliff wrote:
> Very nice.
>
> A agree with Annet about the forum styling, though.
>
> On Jan 13, 3:16 am, Rahul wrote:
> > Lo
Hello I think I finished the styling :-)
its not perfect I am sure :-P I think the green at the top of the thread
could be replaced (if only I could find where in the style sheet it is)
anyway here is the link again
www.fireflywra.com
and
www.fireflywra.com/forum
Thank you for all the insight
ty very much
thanks for all the feedback :-)
*cheers
Andrew
On Sat, Jan 14, 2012 at 10:34 AM, Chris Hawkes wrote:
> It looks a ton better, good job!
>
>
> On Sat, Jan 14, 2012 at 12:21 PM, Andrew Evans
> wrote:
>
>> Hello I think I finished the styling :-)
>>
&g
Oh ya ty
will fix that and will make the template easier to maintain today using
{{include "nav.html"}} etc
*cheers
On Sun, Jan 15, 2012 at 7:20 AM, Annet wrote:
> Hi Andrew,
>
> > its not perfect I am sure :-P
>
> but in line with the rest of the site ;-)
>
> I just noticed that now matter w
Hello I just updated web2py and after restarting uwsgi I get an error on my
site
ValueError: invalid literal for int() with base 10: '05 04:36:30'
Traceback
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
Traceback (most recent call last):
File "/opt/web2py/gluo
t()
trailers = db(db.trailer.id>0).select(orderby=~db.trailer.air_date)
return
dict(schedule=schedule,episodes=episodes,categories=categories,trailers=trailers)
*cheers ty :D
On Sun, Jan 15, 2012 at 6:02 PM, Andrew Evans
wrote:
> Hello I just updated web2py and after restartin
Just upgraded web2py to the latest version (1.99.4) and it fails to load my
default/index pages on a few of my sites. Other pages work fine
Any ideas what I am doing wrong? maybe something to do with routes?
was working fine before
*cheers
Ok seems to be an issue using datetime or date
Sorry about double posting if I did I may have posted on the wrong email. I
appreciate any help though not sure what I need to post to get further help
ValueError: invalid literal for int() with base 10
On Sun, Jan 15, 2012 at 6:43 PM, Andrew
After a bit of research this is what I found the table which caused an
error (it has been removed temporarily) but
db.define_table('trailer',
Field('userinfo', db.auth_user, default=auth.user_id, readable=False,
writable=False),
Field('title',requires=IS_NOT_EMPTY()),
Field('descripti
Hello I am having a problem with CKEditor in Crud I get the following error
when I try to use it
Traceback (most recent call last):
File "/opt/web2py/gluon/restricted.py", line 192, in restricted
exec ccode in environment
File "/opt/web2py/applications/pstv/controllers/control_panel.py"
*cheers
I must of been blind not to see that last night
ty very much
On Tue, Jan 17, 2012 at 5:51 AM, Anthony wrote:
> db.define_table('contrib',
>> Field('userinfo', db.auth_user, default=auth.user_id, readable=False,
>> writable=False),
>> Field('title'),
>> Field('contributions'
Wondering if this site can be included in the powered by web2py
www.paradigmshift.tv
*cheers
Andrew
Yes was made by me and a partner/friend of mine
and ty
On Fri, Jan 20, 2012 at 8:52 PM, Bruno Rocha wrote:
> looks very nice on mobile! congrats!
>
>
> On Sat, Jan 21, 2012 at 12:42 AM, Andrew Evans
> wrote:
>
>> Wondering if this site can be included
I want to redirect the admin user if they login as admin vs logging in as a
regular user
if auth.requires_membership('admin'):
auth.settings.login_next = URL('control_panel', 'index')
auth.settings.logout_next = URL('control_panel', 'index')
that is in my model atm but does not seem to
Nevermind got everything sorted my logic was a bit off
*cheers :D
On Mon, Jan 23, 2012 at 9:20 AM, Andrew Evans wrote:
> I want to redirect the admin user if they login as admin vs logging in as
> a regular user
>
> if auth.requires_membership('admin'):
> auth.
Hello I am trying to randomly select from entries in my database then store
that random result. The problem is its storing the wrong result (I think
its storing the previous random selection)
Any ideas how I can achieve my goal?
@auth.requires_login()
def xreflection():
game_id = request.arg
Anyone able to help with this? No pressure, just hoping I can get some
insight from one of the Gurus :-)
*cheers
On Thu, Nov 10, 2011 at 11:22 AM, Andrew Evans wrote:
> Hello I am trying to randomly select from entries in my database then
> store that random result. The problem is its s
hmm that did not work any other ideas *cheers
this is what we did
def xreflection():
game_id = request.args(0)
reflection_id = request.args(1)
if reflection_id == None:
return dict(redirect(URL('error','invalid')))
if game_id == None:
return dict(redirect(URL('erro
Still trying to solve this any ideas are welcome *cheers
Hello just wondering if some one can help with this, still having no luck.
Would appreciate any help *cheers
On Fri, Nov 11, 2011 at 7:02 PM, Andrew Evans wrote:
> Still trying to solve this any ideas are welcome *cheers
>
Just to note my code looks like this:
@auth.requires_login()
def xreflection():
game_id = request.args(0)
reflection_id = request.args(1)
if reflection_id == None:
return dict(redirect(URL('error','invalid')))
if game_id == None:
return dict(redirect(URL('error','in
How would you go about implemeting the "Share This" button of Facebook by
pulling out a query from a database table. for example:
Thanks in Advance
Hello I am running the latest version of web2py and apach2 on debian lenny
but it doesn't seem like my routes.py file is being used
I still get invalid controller instead of my message.
is there anything in particular I have to do with apache to get routes.py to
run
*cheers
Hi ty for the reply and sorry about my message it was quickly done up
I only added this line to the routes.example.py and renamed it routes.py
routes_onerror = [('dojo0/*','/dojo/error/index')]
the controller error/index is this
def index():
if request.vars.code == '400':
return dic
Ok ty I got it haha
now I feel like a novice :-P
I had an extra period in the routes.py filename so it was routes..py
any ty for the advice *cheers
Andrew
direct(URL('default', 'index'))
elif request.vars.code == '404':
redirect(URL('default', 'index'))
else:
redirect(URL('default', 'index'))
but when I use
routes_onerror = [('*/*','/dojo/error/ind
Sorry I mean this
routes_onerror = [('dojo/*', '/dojo/error/index'),
('musico/*', '/musico/error/index'),]
returns a invalid request when going www.namiyama.com/index.php
*cheers
On Wed, Feb 16, 2011 at 4:07 PM, Andrew Evans wrote:
Hi ty for your help my routes in is just standard with example routes file
routes_in = ((r'.*:/favicon.ico', r'/examples/static/favicon.ico'),
(r'.*:/robots.txt', r'/examples/static/robots.txt'),
((r'.*http://otherdomain.com.* (?P.*)',
r'/app/ctr\g')))
any suggestions
hey is there anyway to say get the current site the user is on
for example: routes_onerror = [(r'*/*', r'/dojo/error/index')]
this returns all domains to dojo/error/index. Is it possible to do somehing
like this /request.application/error/index/
any ideas
*cheers
Just figured it out :-)
routes_onerror = [(r'*/*', r'/error/index')]
works if error/index is in the application
*cheers
tested it with two domains
Does any one have any resources on setting up web2py and Tornado in a
production environment. I would like to set it up with Debian Lenny to host
web sites I develop, I am wanting to get in to development using Tornado and
web2py cause I saw how cool it was in a few demos.
Any tips and advice are
So I have finally gotten around to trying to implement paypal into my site.
But I am facing some issues and was hoping some one could help me figure out
my questions.
I am trying to figure out how to use this example
http://www.web2pyslices.com/main/slices/take_slice/106 but I need to know:
What
I assume at import urlib and below is the module does it matter what I name
the controller or module?
*cheers
ome questions I have :-)
*cheers
Andrew
On Sun, Mar 13, 2011 at 9:23 PM, Andrew Evans wrote:
> I assume at import urlib and below is the module does it matter what I name
> the controller or module?
>
> *cheers
>
Cool can you post a link to this post :-)
would be greatly appreciated
*cheers
Andrew
On Mon, Mar 14, 2011 at 6:30 AM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:
> :-)
>
> On Mar 14, 2:36 am, pbreit wrote:
> > Sorry for the brevity. I think can put together a whole app and post it
Cool
ok so when I pass the sitesettings attributes to my view what am I passing?
{{ attributes = {"cert_id":sitesettings.paypal_cert_id,
"cmd":"_cart",
"business":sitesettings.cart_business,
"add":"1",
"custom":a
Makes sense I wanted them in a table also. But the site settings table is
already in existance, with that code you provided how does that work? Or am
I totally missing something?
*cheers
On Tue, Mar 15, 2011 at 1:50 PM, howesc wrote:
> yes, you should be putting your paypal values in there. i
I am trying to pass request.args(0) to sqlform so it adds an entry when
submitted based on the project_id value any ideas?
my database code
db.define_table('tasks',
Field('userinfo', db.auth_user, default=auth.user_id, readable=False,
writable=False),
Field('project_id', db.project, requi
Thank you I was able to figure it out *cheers
On Fri, May 13, 2011 at 8:05 PM, pbreit wrote:
> I think this will do it:
>
> def add_task():
> form = SQLFORM(db.tasks)
> form.vars.project_id = request.args(0)
>
> if form.accepts(request.vars, session):
>
> ...
>
Hello I have a table
db.define_table('comments',
Field('userinfo', db.auth_user, default=auth.user_id, readable=False,
writable=False),
Field('project_id', db.project, requires = IS_IN_DB(db, db.project.id,
'%(project_title)s'), readable=False, writable=False),
Field('isReply', 'intege
Never mind I just figured out what I needed to do *cheers
Thank You
Hello I have a commenting system I am working on and I am having a problem
with passing the arguments so they match up.
I am trying to make comments.project_id match up with the isReply field when
I add a Reply I am passing args=row.project_id as an argument to the
reply_comment form
My comment s
hey thanks worked like a dream *cheers
On Wed, Jun 29, 2011 at 10:35 PM, Bruno Rocha wrote:
> I did this for web2py.com using request.function, I created a function
> tooggle_class which receives request.function and do this job.
>
> here is an example that I use in http://CursoDePython.com.br
Hello
I am having troubles integrating your code into even a simple example. I was
hoping you could help me by creating a working example of your code called
something like paypal_test and packing it into a web2py file so I can then
work on it in my own code. As well as telling me how you generat
Hello I am trying to figure out how to require a File extension for an
upload but make the upload not required.
Field('file','upload', required=False, requires=IS_UPLOAD_FILENAME(extension
='(pdf|doc|txt)' , error_message='Inappropiate extension, Please Upload PDF
or DOC file only')),
Any ideas
Hello I have the following in my routes.py file but its not mapping the
second domain to the web2py project any ideas whats up?
routers = dict(
# base router
BASE = dict(
default_application = 'cheer10s',
domains = {
'cheer10s.com' : 'cheer10s',
Hey well for some reason its working now *confused
Anyway I won't complain ty for the advice
This is a great forum :-)
On Wed, Aug 31, 2011 at 1:36 PM, Jonathan Lundell wrote:
> On Aug 31, 2011, at 12:06 PM, Andrew Evans wrote:
>
> Hello I have the following in my routes.py fi
, Jonathan Lundell wrote:
> On Aug 31, 2011, at 1:50 PM, Andrew Evans wrote:
>
> Hey well for some reason its working now *confused
>
>
> Keep in mind that you need to restart web2py (or at least reload the router
> configuration) for changes to take effect. That can be confusing
Hello, I am running a scheduler that I would like to timeout the
scheduler_run on a failed execution of my function so that it will attempt
to retry running it.
try:
attempt to run my code
except:
failed to run, timeout scheduler_run to reattempt
Also I have parameters that when a val
Excellent! Thank you Anthony this solved my problem. Also thank you for the
clear explanations :-)
*cheers
On Sun, Jan 12, 2014 at 6:05 AM, Anthony wrote:
> If these groups are for the purpose of controlling access to resources,
> you might consider using the built-in role-based access control
Hello I am trying to figure out how to detect if a computer is running
Windows or Macintosh then load the appropriate files and if any other
system Linux/Mobile etc then load the other files
The reason for this is I am using Google Earth in a project and I want to
load Google Maps if it is not ava
Hello I am facing a problem with returned output from a controller not
displaying when being called from a link using the ajax() function inside a
LOAD(ed) component.
*index*
{{=LOAD('default', 'file_list.load', ajax=False)}}
--
*file_list.load*
Que For Encryption
Amazing! Thank you very much.
On Tue, Jun 24, 2014 at 10:49 AM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:
> This line
>
> db.personal_uploads.file_upload.authorize = lambda record:
> auth.is_logged_in() and (record.members.contains(auth.user_id))
>
>
> should be
>
>
> db.personal_u
Hello I am building a simple file encryption software and I am facing
issues with files larger than 200KB not being fully uploaded but resulting
in success. I am running nginx server / web2py. However I am pretty sure
it's configuration is set up correctly
Perhaps some one could take a look at my
101 - 195 of 195 matches
Mail list logo