Is it some additional file?
I can't find JS/jQuery folder in web2py installation version.
On 22 Wrz, 15:31, mdipierro wrote:
> in JS/jQuery if the request.vars.no_1 matckesform.record.no_1 change
> the jQuery('#no_1').attr('background-color','red'
y=reduce(lambda a,b:a&b,[db.numbers['no_
> %i'%i]==form.vars['no_%i'%i])
> for i in keys])
>
> On Sep 21, 8:35 pm, elfuego1 wrote:
>
>
>
> > Thank you Massimo!!!
>
> > It works on my end as well! ;-)
>
> > Could you yet tell me how
form.accepts(request.vars,keepvalues=True):
> keys=(1,2,3,4)
> s=[int(form.vars['no_%i'%i]) for i in keys if form.vars['no_
> %i'%i]!=None]
> query=reduce(lambda a,b:a|b,[db.numbers['no_%i'%i].belongs(s)
> for i in keys])
> i
x27;%i]) for i in keys if form.vars['no_
> %i'%i]!=None]
> query=reduce(lambda a,b:a|b,[db.numbers['no_%i'%i].belongs(s)
> for i in keys])
> items=db(query).select()
> if not items: response.flash="There are no matching records in
> D
Hello,
Did you manage to find a cause of the problem?
Why the db search is not working?
Best wishes,
On 19 Wrz, 18:26, mdipierro wrote:
> My office email server appears to be done. Maintenance perhaps.
>
> On Sep 19, 11:13 am, elfuego1 wrote:
>
>
>
> > Ok. I've
Ok. I've sent it again.
Should be there right now.
On 19 Wrz, 16:42, mdipierro wrote:
> nope
>
> On Sep 19, 4:52 am, elfuego1 wrote:
>
> > Has my message reached your e-mail?
> > The email topic: "Simple search form"
>
> > On 17 Wrz, 23:37,
Has my message reached your e-mail?
The email topic: "Simple search form"
On 17 Wrz, 23:37, elfuego1 wrote:
> I did as you suggested.
> The mail should be in your mail box.
>
> On 17 Wrz, 15:55, mdipierro wrote:
>
> > You need to help some bore with debuggi
app and I will take a look.
>
> On Sep 17, 8:47 am, elfuego1 wrote:
>
> > OK. Both parts are there in the view.
> > The input fields are not evaluated against Database though.
> > Even if I enter numbers that are there in DB, form responses with:
> > "There are n
{extend 'layout.html'}}
> {{=form}}
> {{=SQLTABLE(items,headers="fieldname:capitalize") if items else
> "nothing to see here"}}
>
> On Sep 16, 4:15 pm, elfuego1 wrote:
>
>
>
> > OK. Both parts are there in the view.
>
> &
gt; {{=form}}
> {{=SQLTABLE(items,headers="fieldname:capitalize") if items else
> "nothing to see here"}}
>
> On Sep 16, 4:15 pm, elfuego1 wrote:
>
> > OK. Both parts are there in the view.
>
> > Now, when I go from index.html to search.html I get an e
e view.
> You should just have
>
> {{extend 'layout.html'}}
> {{=form}}
> {{=SQLTABLE(items,headers="fieldname:capitalize") if items else
> "nothing to see here"}}
>
> On Sep 16, 4:15 pm, elfuego1 wrote:
>
> > OK. Both parts are there
=[]
> return dict(form=form,items=items)
>
> you need to but both
>
> {{=form}}
>
> and
>
> {{=SQLTABLE(items,headers="fieldname:capitalize") if items else
> "nothing to see here"}}
>
> in the view
>
> On Sep 16, 2:25 pm, elfuego1 wro
t()
> else: items=[]
> return dict(form=form,items=items)
>
> you need to but both
>
> {{=form}}
>
> and
>
> {{=SQLTABLE(items,headers="fieldname:capitalize") if items else
> "nothing to see here"}}
>
> in the view
>
> On Sep
}{{=BEAUTIFY(response._vars)}}
> {{pass}}
>
> and you should remove it.
>
> The code I suggested:
>
> {{=SQLTABLE(items,headers="fieldname:capitalize") if items else
> "nothing to see here"}}
>
> is working all right but it is only producing
SQLTABLE(items,headers="fieldname:capitalize")}}
>
> with
>
> {{=SQLTABLE(items,headers="fieldname:capitalize") if items else
> "nothing to see here"}}
>
> On Sep 15, 5:12 pm, elfuego1 wrote:
>
> > items=db(db.numbers.no_1.contains(
but a list.
> What is items?
>
> On Sep 15, 3:57 pm, elfuego1 wrote:
>
> > That doesn't work as planned.
>
> > First scenario.
> > I added the code you provided above and got error:
>
> > Error traceback
>
> > Traceback (most recent call last
gt;
> {{try:}}{{=H2(message)}}{{except:}}{{=BEAUTIFY(response._vars)}}
> {{pass}}
>
> Add this:
>
> {{=SQLTABLE(items,headers="fieldname:capitalize")}}
>
> On Sep 13, 10:41 pm, elfuego1 wrote:
>
> > Where do you suggest I should add it? In search.html ?
&
You mean in items. That depends on how you display them. Perhaps one
> of these:
>
> {{=SQLTABLE(items,headers={'numbers.no_1':'No1'})}}
>
> or
>
> {{=SQLTABLE(items,headers='fieldname:capitalize'}}}
>
> On Sep 13, 12:56 pm, elfuego1 wrote:
&
cked against DB at all...
On 13 Wrz, 04:11, mdipierro wrote:
> There is no colnames
>
> form=SQLFORM.factory(Field('no_1','integer'),
> Field('no_2','integer',label="Alias name for col2"),
> Field('no_3&
cked against DB at all...
On 13 Wrz, 04:11, mdipierro wrote:
> There is no colnames
>
> form=SQLFORM.factory(Field('no_1','integer'),
> Field('no_2','integer',label="Alias name for col2"),
> Field('no_3&
orm=SQLFORM.factory(INPUT('no_1','integer'), <= line 57
> INPUT('no_2','integer'),
> INPUT('no_3','integer'),
> INPUT('no_4','integer'))
>
> but
>
> form=SQLFORM.factory(Fiel
One more thing.
Where should I add this message to have it shown after form submition,
if there are no matches?
print "There are no matching records in Database."
Best wishes.
On 12 Wrz, 09:50, elfuego1 wrote:
> That works!
>
> I'd like to use some aliasing for co
> form=SQLFORM.factory(INPUT('no_1','integer'), <= line 57
> INPUT('no_2','integer'),
> INPUT('no_3','integer'),
> INPUT('no_4','integer'))
>
> but
>
> form=SQLFORM.
> form=SQLFORM.factory(INPUT('no_1','integer'), <= line 57
> INPUT('no_2','integer'),
> INPUT('no_3','integer'),
> INPUT('no_4','integer'))
>
> but
>
> form=SQLFO
> def search():
> form=SQLFORM.factory(INPUT('no1','integer'),
> INPUT('no2','integer'),
> INPUT('no3','integer'),
> INPUT('no4','integer'))
> if form.accepts(request.vars,keepvalu
of the no_x fields
> be None or other than a number?
>
> On Sep 11, 12:12 am, elfuego1 wrote:
>
> > Hello,
>
> > I need to create a search form.
> > In my DB I have fields with numbers. Now I need to look up the DB and
> > find out if the numbers I enter are t
Hello,
I need to create a search form.
In my DB I have fields with numbers. Now I need to look up the DB and
find out if the numbers I enter are there already or not.
db.define_table('numbers',
Field('no_1', length=18),
Field('no_2', length=18),
Field('no_3', length=18),
Field('no
Hi,
I've implemented on my page cascading dropdown widget from
http://web2pyslices.com/main/slices/take_slice/86. It allows you to
select state, city, zipcode data using dropdowns. BUT it saves into
database value only from the last dropdown. I'd like to store in my db
values (id) from all three o
" type="password" value="" />{{if
> form.errors.password_two:}}NO MATCH{{pass}}
>
> Make the change and it will work.
>
> There should really be a form.custom.widget.password_two... I will
> think about adding one.
>
> Massimo
>
> On Aug 14, 9:4
I did as you asked.
Message should be at your email box.
On 14 Sie, 15:55, mdipierro wrote:
> Please email it to me.
>
> On Aug 14, 8:30 am, elfuego1 wrote:
>
> > I can't send data from registration form to DB. I'm stuck on the same
> > page. I'm not red
I would move on
with my coding?
On 14 Sie, 15:11, mdipierro wrote:
> My mistake. It is
>
> {{=form.custom.submit}}
>
> not {{=form.custom.widget.submit}}
>
> On Aug 14, 8:02 am, elfuego1 wrote:
>
> > How do I fix that?
>
> > On 14 Sie, 15:01, elfuego1
How do I fix that?
On 14 Sie, 15:01, elfuego1 wrote:
> In user.html I have now:
>
> {{if request.args(0)=='login':}}{{=auth.login()}}
>
> {{elif request.args(0)=='register':}}
> {{=form.custom.begin}}
> {{=form.custom.widget.first_na
>
> insert any HTML you need. Use CSS and jQuery to style it.
>
> On Aug 14, 5:03 am, elfuego1 wrote:
>
> > OK. Then can you PLEASE tell me how should I write registration part
> > to use full power of the framework?
>
> > In controllers/default.py I have my c
> the same data filtered by validators.
>
> 2)
>
> you are bypassing a lot of login that is normally performed by auth.
> For example you do not get default groups for new users. Eventually
> this will bite you.
>
> Massimo
>
> On Aug 14, 4:43 am, elfuego1 wrote:
>
>
ing called
> for you. I am very puzzled by this.
> How do you check the passwords are not hashed?
> Can you make a minimalist app to reproduce the problem and and email
> it to me?
>
> On Aug 13, 6:39 pm, elfuego1 wrote:
>
> > Requiremen
c97830',
None)
On 14 Sie, 00:16, mdipierro wrote:
> can you try
>
> print CRYPT(auth.settings.hmac_key)('hello world')
>
> what do you get? Did you set
>
> auth.settings.hmac_key='sha512:somerandompasphrase'
>
> On Aug 13, 12
ower=None,special=None,number=None,error_message='Too short'),
> > CRYPT(auth.settings.hmac_key)]
>
> > Perhaps the defaults should be less aggressive. Not sure on the
> > CRYPT, it hashes the password for me.
>
> > On Aug 12, 9:53 pm
Hi,
I have a problem with two things in registration form.
1. Definition for password field in database looks as follows:
db.auth_user.password.requires = [IS_STRONG(min=8 ,error_message='Your
password is too short!'), CRYPT(auth.settings.hmac_key)]
But the form is not accepting passwords. Each
gt; use FORM at all, you should just place the {{=form.cutsom.widget}}s in
> the view.
>
> On Jul 26, 3:47 pm, elfuego1 wrote:
>
>
>
> > In default.py I had defined my registration form
>
> > lbl=form.custom.label
> > wdgt=form.custom.widget
>
> >
In default.py I had defined my registration form
lbl=form.custom.label
wdgt=form.custom.widget
def register():
form=FORM(TABLE(TR(lbl.username), TD(wdgt.username),
TR(lbl.password), TD(wdgt.password),
TR(lbl.first_name), TD(wdgt.first_name),
nt() and 'yes' or
'no'
response._vars=response._caller(user)
On 24 Lip, 00:55, "mr.freeze" wrote:
> Sorry, that's {{=lbl.username}}:{{=wdgt.username}} td>
>
> On Jul 23, 5:16 pm, "mr.freeze" wrote:
>
> > I noticed that some of y
:
> Sorry, that's {{=lbl.username}}:{{=wdgt.username}} td>
>
> On Jul 23, 5:16 pm, "mr.freeze" wrote:
>
> > I noticed that some of your table is malformed.
> > {{=lbl.username}}:{{=wdgt.username}}
> > should be
> > {{=lbl.username}}:{{=wdgt
ur javascript that you are basically cancelling the submit with
> this code:
> var submit = false;
> $(document).ready(function(){
> $("form").submit(function() {
> return submit;
> });
> });
>
> On Jul 23, 12:37 pm, elfuego1
Can I count on some help?
On 23 Lip, 15:50, elfuego1 wrote:
> First submit button on login page works like a charm.
> But submit button on registration page - doesn't.
>
> Content of my user.html
>
is is used for on the fly username checking in the DB.
On 23 Lip, 15:14, mdipierro wrote:
> Please show us the form and the customization. {{=form.custom.submit}}
> should just produce . The problem is somewhere
> else.
>
> On Jul 22, 6:37 pm, elfuego1 wrote:
>
>
>
> >
Does anyone know how to do that?
On 23 Lip, 01:37, elfuego1 wrote:
> Hi,
>
> I had made my custom form, but adding {{=form.custom.submit}} doesn't
> let me send the form.
> How should I add submit button to the page, so I would get a default
> fields validation and for
Hi,
I had made my custom form, but adding {{=form.custom.submit}} doesn't
let me send the form.
How should I add submit button to the page, so I would get a default
fields validation and form submit functionallity?
Best regards.
turns out to be nothing because some times it is
> not nothing and something needs to be fixed.
>
> Massimo
>
> On 1 Lug, 13:08, elfuego1 wrote:
>
> > Finally! Happy news.
> > I have found an error. It was my fault.
>
> > In db.py I had defined
ou can make specific forms
>
> form=auth.login()
> form=auth.register()
> form=auth.profle()
> etc.
>
> Make the form you what. Where you want and customize them.
> Just do NOT CALL form.accepts(). because this is done automatically,
> as in CRUD.
>
> Massimo
>
I'm just wondering why it has to be so tedious and hard to get to know
things. Usualy Python alone is rather instinctive to me, but I can'f
find a decent follow up or tutorial how to customize a simple form...
On 11 Lip, 00:45, elfuego1 wrote:
> But where do I have to put
).
I don't know where and how to insert my own code?!
On 11 Lip, 00:38, mdipierro wrote:
> No. I am assuming the regular user method. I think it should work.
>
> On 10 Lug, 17:37, elfuego1 wrote:
>
> > Should I somehow define my registration form in the Control
Should I somehow define my registration form in the Controller (in
user method)?
On 11 Lip, 00:31, elfuego1 wrote:
> Now I have registration form on login and registration pages.
>
> On 11 Lip, 00:27, mdipierro wrote:
>
> > {{if request.args(0)=='login':
Now I have registration form on login and registration pages.
On 11 Lip, 00:27, mdipierro wrote:
> {{if request.args(0)=='login':}}{{=auth.register()}}{{pass}}
>
> {{=T( 'Registration form' )}}
> {{=form}}
>
> ?
>
> On 10 Lug, 11:39, elfuego1 wrote:
wo login forms.
One generated by this:
{{if request.args(0)=='login':}}{{=auth.login()}}{{pass}}
Second generated by:
{{=form}}
But without {{=form}} I won't see any registration form.
SO WHAT TO DO TO SORT THIS OUT FINALLY?
PLEASE HELP!!
On 10 Lip, 17:49, elfuego1 wrote:
> Where
Where do I have to insert code of my customized registration form to
have it work properly with default login form?
On 10 Lip, 13:57, elfuego1 wrote:
> I did it this way:
> In my user.html I had added: {{if request.args(0)=='login':}}
> {{=auth.login()}}{{pass}}
> Now whe
tend 'layout.html'}}
> {{=form}}
> {{if request.args(0)=='login':}}{{=auth.register()}}{{pass}}
>
> On 10 Lug, 02:55, elfuego1 wrote:
>
> > I also have problem with submit button. It doesn't work.
>
> > My user.html content:
>
> > {{e
; Can you show the user.html?
>
> On 10 Lug, 02:18, elfuego1 wrote:
>
>
>
> > One more thing.
> > At the bottom of my registration form there is {{=form}} code.
> > It seems that I need to redirect login link to completly different
> > page.
> >
One more thing.
At the bottom of my registration form there is {{=form}} code.
It seems that I need to redirect login link to completly different
page.
Can you show where do I need to make changes to have it working?
On 10 Lip, 08:50, elfuego1 wrote:
> Hi everybody,
>
> I had cust
Hi everybody,
I had customized my registration form, but when I go to login page my
registration form shows up there too?!
It looks like that:
Fields like password, password verification and e-mail have valid
description in label field.
All the other fields are marked "None".
Below my custom form
l.password}} label>
> {{=wdgt.password}}
>
>
> ...{{if form.errors.password2:}}
> NO MATCH{{pass}}
>
>
> 2) serverside you just do
>
> form.append(INPUT(_name='password2',requires=IS_EXPR('value=%s' %
> repr(request.vars.password)))
>
you just do
>
> form.append(INPUT(_name='password2',requires=IS_EXPR('value=%s' %
> repr(request.vars.password)))
>
> On 6 Lug, 18:30, elfuego1 wrote:
>
> >Passwordfield in my form looks like this:
>
> >
> > {{=lbl.password}} > lab
}
>
>
> ...{{if form.errors.password2:}}
> NO MATCH{{pass}}
>
>
> 2) serverside you just do
>
> form.append(INPUT(_name='password2',requires=IS_EXPR('value=%s' %
> repr(request.vars.password)))
>
> On 6 Lug, 18:30, elfuego1 wrote:
>
>
>
&
ur form instead, Massimo's solution
> probably won't help you much (and neither will CSS or AJAX).
>
> On Jul 6, 1:27 am, elfuego1 wrote:
>
> > No, I don't.
> > So does TD supposed to work as a variable or list?
> > And what if I'd like to use form.eleme
e?
Is out there some description or example of this syntax?
Best regards.
On 6 Lip, 07:35, KR wrote:
> Do you have somewhere in your code TD=something ?
>
> On 6 juil, 01:18, elfuego1 wrote:
>
>
>
> > Can you please tell me yet how to implement it, so it would start
&g
uch
> element, the TD()
>
> form.element(_name='password').parent().append(...) appends something
> to the TD()
>
> INPUT(_name='password2',) is the appened
> field
>
> This:
> requires=IS_EXPR('value=%s' % repr(request.vars.password)
ed
> return ''
>
> which means you will need to enable mail to get this working.
>
> Richard
>
> On Jun 26, 6:59 am, elfuego1 wrote:
>
> > Hello,
>
> > I try to enable "request_reset_password" function but every time I
> > enter t
of your custom form?
>
> On 5 Lug, 03:19, elfuego1 wrote:
>
>
>
> > Hello,
>
> > I try to give my custom form sense of order. Unfortunatelly all the
> > input fields are out of order.
> > When I generate form usign {{=form}} syntax, all fields are displa
Hello,
I try to give my custom form sense of order. Unfortunatelly all the
input fields are out of order.
When I generate form usign {{=form}} syntax, all fields are displayed
nice and clean but in custom form it's all shifted, skew. Input fields
are glued to the label.
How can I align input field
; sets the attribute _size. This is equivalent
>
> form.element('input[name=first_name]')['_size']='20'
>
> This may be better done with CSS
>
> input#table_field { width:200px; }
>
> On 4 Lug, 10:07, elfuego1 wrote:
>
>
>
> >
Hi,
Can you show me how to customize a form?
How do I use this piece of code to make the input field 20 signs wide:
form.element('input',_name='first_name',_size='20')
How do I use form.element syntax? Should I put into html code somehow
or just into {{}} brackets?
I ask because this syntax:
{{=
e show me how to do that because there is no example in
documentation, no properly written piece of code to meke use of.
On 2 Lip, 12:25, elfuego1 wrote:
> Thank you for your speedy help!!!
>
> On 2 Lip, 12:13, mdipierro wrote:
>
> > you can do for example (assuming trunk)
>
Is it really?
I want to make sure because that's the syntax in the manual for
creating fields in MySql database.
On 2 Lip, 14:08, mdipierro wrote:
> P.S. Please use Field, SQLFIeld is deprecated.
>
> On 2 Lug, 06:47, Rick wrote:
>
>
>
> > Hi,
>
> > I want to generate a table like this:
>
> >
ot use trunk instead of IS_EQUAL_TO(request.vars.password)
> you can use
>
> IS_EXPR('value=%s' % repr(request.vars.password))
>
> On 2 Lug, 04:58, elfuego1 wrote:
>
>
>
> > Since I am customizing my registration form, can you tell me what to
> > do to have password ve
Since I am customizing my registration form, can you tell me what to
do to have password verification functionality? I don’t know how to
implement it in my form. I have password input field in the form and
corresponding field in my database. Do I have to add additional field
for password2 and someh
uot;gluon/sql.py", line 1329, in __getattr__
> \nKeyError: \'auth_user\'\n'
>
> What is in default.py line 60-70?
>
> I think it tells that db.auth_useris not defined. Something is wrong
> in the models then.
>
> On 30 Giu, 16:30, elfuego1 wrote:
>
ceback (most recent call last):\n File "gluon/restricted.py",
line 178, in restricted\n File "F:\\Programy\\web2py\\applications\
\myapplication/controllers/default.py", line 67, in \n File
"gluon/globals.py", line 96, in \n File "F:\\Programy\\web2py\
\applications\\my
I have firebug installed. What do you want me to look for?
You want to see some firebug output?
On 30 Cze, 22:25, mdipierro wrote:
> I do not see anything wrong in this. Do you use firebug?
>
> On 30 Giu, 15:18, elfuego1 wrote:
>
> > I hope I don't make your eyes bleed
Login:
On 30 Cze, 22:12, mdipierro wrote:
> This should give you an error because the print(username) is outside
> the funciton the function that defines username, after the function
> returns. How are you passing the username to the
):
> username = request.vars.values()[0]
> return db(db.auth_user.login==username).count() and 'yes' or
> 'no'
>
> although it will not solve your problem.
> There is nothing special in table auth_user so the problem is
> somewhere else.
>
> I
> 0:
> return 'yes'
> else:
> return 'no'
>
> I know I've returned searches on auth_user it's no different than
> other tables. Just gotta find whey your getting no results. Might
> help if you post the exact search code th
on auth_user before... I think.
>
> On Jun 30, 1:44 pm, elfuego1 wrote:
>
> > Unfortunatelly it doesn't.
> > I can access any other table that's available through my application
> > but I can't get any value out of auth_user table.
> > Is it someho
one', 'string', length=30, default=''),
)
On 30 Cze, 20:59, Chris S wrote:
> And you've defined auth in db.py with:
>
> from gluon.tools import Auth
> auth = Auth(globals(), db)
> auth.define_tables()
>
> I've done searches on auth_user before
return 'no'
>
> So I"m saying your querry should be:
> query = (db.auth_user.username==username)
>
> Hope that helps
>
> On Jun 29, 5:34 pm, elfuego1 wrote:
>
> > Hello,
>
> > On this page:http://web2pyslices.com/main/slices/take_slice/5
Hello,
On this page: http://web2pyslices.com/main/slices/take_slice/53 I have
found a great pice of code which allows to check on the fly if there
is an exact value already in database.
Oryginal code:
def ajaxuserexist():
username = request.vars.values()[0]
query = db.users.name.like(us
Hello,
I try to enable "request_reset_password" function but every time I
enter this page:
http://127.0.0.1:8000/project/default/user/request_reset_password I
receive message that the function is disabled.
Can you please tell me what should I do and where to get it working?
Thank you in advance
85 matches
Mail list logo