Hi,
I hav written a form in controller of my application. The form
has a select option which based on its input uses ajax and calls a
function. This function sends a json list object. How do I access that
variable in order to incorporate the contents of that list as another
select option m
So its for that not two people can has the same session_ID and cannot send
the form?
2009/4/24 mdipierro
>
> It is optional. If it is there is associate a unique ID to each form
> to prevent double form submission.
>
> Massimo
>
> On Apr 24, 2:02 pm, Pynthon wrote:
> > Hahaha, sorry for my bad
Hello
I searched in the book but I can't find it. Im creating a blog with
the small knowledge I have about W2P. Just for fun and to learn. I
want to order it like this:
3
2
1
and not
1
2
3
The latest posts ion the head :P. How can I do this?
Thanks,
Pynthon
--~--~-~--~~--
Hi.
I'm assuming you have some query from where you take the posts.
In the select part there's a parameter orderby. To give it to sort it in
reverse order just write the sign ~ in front of the orderby parameter.
example
db(some_query).select(db.table.ALL, orderby = ~db.table.field)
regards
mml
Thanks man! Works perfect! Maybe I want this blog for my public site.
But I also want to make an admin panel. How need I to make that? I
know how to work with sessions. But can it also be safe?
On Apr 25, 12:27 pm, Mladen Milankovic wrote:
> Hi.
>
> I'm assuming you have some query from where yo
On Sat, Apr 25, 2009 at 2:30 PM, Alexei Vinidiktov
wrote:
> Hello,
>
> I'm beginning to learn user authentication. I've implemented a very
> basic authentication using the Auth module that works fine on my local
> machine: I can register a user, a confirmation email is sent out, the
> user can co
Hi.
You can do something with the auth class.
Here some tutorial about it.
http://mdp.cti.depaul.edu/examples/default/tools
You can expose only functions for login/logout. Create a user by hand, through
web2py admin.
Then create controllers/functions that requires authorization.
For the safety
But I see that there is also with profiles etc.
On Apr 25, 12:45 pm, Mladen Milankovic wrote:
> Hi.
>
> You can do something with the auth class.
> Here some tutorial about it.http://mdp.cti.depaul.edu/examples/default/tools
>
> You can expose only functions for login/logout. Create a user by ha
BTW, is there also something like a editor for my blog. Because HTML
gets escaped and when I do enter it does not work :(.
On Apr 25, 12:53 pm, Pynthon wrote:
> But I see that there is also with profiles etc.
>
> On Apr 25, 12:45 pm, Mladen Milankovic wrote:
>
> > Hi.
>
> > You can do something
Hi.
Yes there are. If you need more from the authorization you can expose those
too, or all of them if you want to allow registration on the blog.
Usually I work on things where registration isn't good thing, and I need only
login and logout.
If you want all the functions:
def user(): return d
Hmm my posts were deleted. However, this is with profiles right? I
just want a plain login/logout system :$. And is there also something
like an editor. Because when I type my posts now I can't use enters
because everything is escaped. And the for loop does not work:
{{for post in posts:}}
{{
Hi.
For the html editor, wouldn't know to recommend.
When you got the post for the blog, just put it into XML() helper. Like:
XML(post) This way it won't be escaped.
regards
mmlado
On Saturday 25 April 2009 12:54:44 Pynthon wrote:
> BTW, is there also something like a editor for my blog. Becau
Hi.
You'll need to add html for formating in the view. You can also add the XML
helper if you want to have html code in the post. Like:
{{for post in posts:}}
{{=post.titel}}
{{=post.time}}
{{=XML(post.post)}}
{{pass}}
regards
mmlado
On Saturday 25 April 2009 13:0
Thanks, but I meant more something like the wiki markup language.
On Apr 25, 1:07 pm, Mladen Milankovic wrote:
> Hi.
>
> You'll need to add html for formating in the view. You can also add the XML
> helper if you want to have html code in the post. Like:
>
> {{for post in posts:}}
>
>
Yes the book is wonderful, the only problem I met is the format - pdf,
it would be very useful if the book is in chm format, so that search
and index tabs are available.
I tried with different psd2chm converters, but they didn't work as
expected.
On Apr 24, 11:11 pm, JohnMc wrote:
> I note that
No. It is to avoid that the same person clicks twice by mistake
(perhaps because the page is slow to load) and the form is processed
twice. Think of [add chart] and when you click twice you add twice to
chart by mistake.
Massimo
On Apr 25, 4:52 am, Pynthon Pynthon wrote:
> So its for that not t
from gluon.contrib.markdown import WIKI
{{=WIKI(text)}}
On Apr 25, 6:17 am, Pynthon wrote:
> Thanks, but I meant more something like the wiki markup language.
>
> On Apr 25, 1:07 pm, Mladen Milankovic wrote:
>
> > Hi.
>
> > You'll need to add html for formating in the view. You can also add th
Is there a way to use this memcache 'shim' in a web2py app?
If so, would I have to insert the calls in my web2py app source code,
or do I have to modify a low level module in the web2py framework?
Please give details if possible.
Here is the posting link from Alkis Evlogimenos on the GAE forum:
Oh, one more minor suggestion, shouldn't we add some description about
this new feature into the build-in document of "example 6" in this
page?
http://www.web2py.com/examples/default/examples
In fact I tried to write a couple more examples for Massimo to show
the new "info" and "warn" class, bu
[r...@localhost psycopg2-2.0.10]# python setup.py install
running install
running build
running build_py
running build_ext
Traceback (most recent call last):
File "setup.py", line 410, in ?
ext_modules=ext)
File "/usr/lib/python2.4/distutils/core.py", line 149, in setup
dist.run_comman
in Controller/index.py:
def getcities():
citystr = request.vars.values()[0]
if citystr == "Delhi":
output = "Hyderabad"
elif citystr == "Tamil Nadu":
output = "Chennai"
elif citystr == "Andhra Pradesh":
output = "Pune"
else:
output = "mumbai"
# model
db.define_table('a',SQLField('dts','datetime'))
import datetime
now=datetime.datetime.now()
# this works
db(db.a.dts > now).select(db.a.ALL)
# this doesn't work
db(db.a.dts.weekday() == now.weekday()).select(db.a.ALL)
# this also doesn't work
db(db.a.dts.day > now.day).select(db.a.ALL)
Would it be possible to add a Try View to the Design page, rather than
having to Edit then try view?
Mike
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send emai
I do not know about this specific issue but in web2py can do
from gluon.contrib.gae_memcache import
MemcacheClient
cache.ram=cache.disk=MemcacheClient(request)
and then cache any query
db(...).select(...,cache=(cache.ram,3000))
3000 are ms
Massimo
On Apr 25, 6:29 am, dlypka wrote:
> Is ther
This looks like a psycopg issue. Mind that you need python 2.5 to run
web2py.
On Apr 25, 11:53 am, "wengfei2...@163.com"
wrote:
> [r...@localhost psycopg2-2.0.10]# python setup.py install
> running install
> running build
> running build_py
> running build_ext
> Traceback (most recent call last)
Not sure I understand but you can try:
def getcities():
citystr = request.vars.values()[0]
if citystr == "Delhi":
output = "Hyderabad"
elif citystr == "Tamil Nadu":
output = "Chennai"
elif citystr == "Andhra Pradesh":
output = "Pune"
else:
outpu
these will work:
db(db.a.dts.day() > now.day).select(db.a.ALL)
db(db.a.dts.month() > now.day).select(db.a.ALL)
db(db.a.dts.year() > now.day).select(db.a.ALL)
weekday() is not supported. Perhaps we can add it. Let me look into
it.
Massimo
On Apr 25, 4:08 pm, weheh wrote:
> # model
> db.define_
Sorry I do not inderstand. You cannot try a view without an associated
action.
On Apr 25, 4:48 pm, mikech wrote:
> Would it be possible to add a Try View to the Design page, rather than
> having to Edit then try view?
>
> Mike
--~--~-~--~~~---~--~~
You received th
You might want to look at this thread...
http://groups.google.co.nz/group/web2py/browse_thread/thread/405c0bcfc6a2df2f
It shows how you can have several "submit" buttons and then use your
controller to dynamically determine the specific redirect.
On Apr 25, 6:24 pm, jmverm...@xs4all.nl wrote:
On Apr 20, 6:14 pm, Yarko Tymciurak wrote:
> web2py Sphinx doc I think will be hosted on bitbucket - we noticed the
> planned move of Python itself to mercurial, and this is where Sphinx and
> some sphinx books are.
>
> We have discussed moving web2py and web2conf from launchpad to bitbucke
Thanks, Massimo.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to
web2py+unsubsc
Is there a way to append or delete a record to an SQLRow item?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe
I do not understand. You can append or delete from a Table.
db.table.insert(field=value)
db(db.table.field==value).delete()
Massimo
On Apr 25, 9:40 pm, weheh wrote:
> Is there a way to append or delete a record to an SQLRow item?
--~--~-~--~~~---~--~~
You receiv
Sorry, I wasn't clear. I want to do something like this:
x=db(query0).select(db.table.ALL,orderby=something)
x.append(db(query1).select(db.table.ALL,orderby=somethingelse))
I get an error message about not being able to append to an SQLRow
object.
--~--~-~--~~~---~--~
On Sat, Apr 25, 2009 at 11:40 PM, weheh wrote:
> Is there a way to append or delete a record to an SQLRow item?
Why do you want that? Isn't there other way?
--
Álvaro Justen
Peta5 - Telecomunicações e Software Livre
21 3021-6001 / 9898-0141
http://www.peta5.com.br/
--~--~-~--~
On Sun, Apr 26, 2009 at 12:14 AM, weheh wrote:
>
> Sorry, I wasn't clear. I want to do something like this:
>
> x=db(query0).select(db.table.ALL,orderby=something)
> x.append(db(query1).select(db.table.ALL,orderby=somethingelse))
>
> I get an error message about not being able to append to an SQL
Thanks Álvaro, that looks like it would do the trick. How did you
learn this? Did you study the gluon code or did you read about this
elsewhere?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" g
I want to add a feature to the error reporting section of the code.
Where is that part of the code?
In specific, I would like to add something to where it prints out the
final code before running. (When an error happens.)
---
Best Regards,
Jason Brower
--~--~-~--~~~-
On Sat, Apr 25, 2009 at 6:32 PM, Alexei Vinidiktov
wrote:
> On Sat, Apr 25, 2009 at 2:30 PM, Alexei Vinidiktov
> wrote:
>> Hello,
>>
>> I'm beginning to learn user authentication. I've implemented a very
>> basic authentication using the Auth module that works fine on my local
>> machine: I can
I do not understand. Can you post an example?
On Apr 25, 11:26 pm, Jason Brower wrote:
> I want to add a feature to the error reporting section of the code.
> Where is that part of the code?
> In specific, I would like to add something to where it prints out the
> final code before running. (Whe
On Sun, Apr 26, 2009 at 12:45 PM, Alexei Vinidiktov
wrote:
> On Sat, Apr 25, 2009 at 6:32 PM, Alexei Vinidiktov
> wrote:
>> On Sat, Apr 25, 2009 at 2:30 PM, Alexei Vinidiktov
>> wrote:
>>> Hello,
>>>
>>> I'm beginning to learn user authentication. I've implemented a very
>>> basic authenticatio
ceej,
in firefox there is a js error when clicking on the jDiv refresh
button. I found this article:
http://blog.reindel.com/2006/08/11/a-hrefjavascriptvoid0-avoid-the-void/
The idea I liked was using #null.
I just changed javascript:void (2 instances) to #null in jDive.py and
it works like a
How would you describe day() vs. day in db.a.dts.day() vs. now.day?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubsc
for a field, field.day() represents the function that extacts the day
from a date. It is not a value.
for a date, date.day is the day of the date. It is a value.
There should not be any confusion.
Massimo
On Apr 26, 12:05 am, weheh wrote:
> How would you describe day() vs. day in db.a.dts.day(
do you mean add something to the ticket? or to a response.flash?
On Sat, Apr 25, 2009 at 10:26 PM, Jason Brower wrote:
>
> I want to add a feature to the error reporting section of the code.
> Where is that part of the code?
> In specific, I would like to add something to where it prints out the
Hi pals,
I've read "About file upload and renaming" here:
http://mdp.cti.depaul.edu/AlterEgo/default/show/50
I think it is somewhat hard to remember we should do:
form.vars.filename=do_something(request.vars.file.filename)
rather than:
request.vars.filename=do_something(request.vars.file.fi
46 matches
Mail list logo