[web2py] Image from Video

2012-02-11 Thread Web2Py Freak
Dear ALL,

How Can i Make Plugin Wiki Player Have an Image From the video Before
its played ?

Best Regards ,


[web2py] Re: How to change menu colors?

2012-02-11 Thread Web2Py Freak
Just Check the Css 'superfish.css'  form the css folder in web2py/
applications/your application/static /css .. and Edit the colors Its
easy :)

Good luck

Best Regards,
Hassan ALnatour.


[web2py] Select Where first letter is A

2012-02-09 Thread Web2Py Freak
Dear All ,

How Can i select everything in the table the starts with A

Best Regards,
Hassan Alnatour


[web2py] response.google_analytics_id

2012-02-09 Thread Web2Py Freak
Dear ALL,

How do i use response.google_analytics_id in menu.py : my google
analytics id is Tracking ID: UA-29069723-1 ,


[web2py] response.google_analytics_id

2012-02-09 Thread Web2Py Freak
Dear All,

How can i use response.google_analytics_id in menu.py  as i understand
i need to have a script with my analytics id  , but why is the
response.google_analytics_id in menu.py and how can i use it ?


[web2py] Re: Debugging in web2py

2012-02-05 Thread Web2Py Freak
i am trying to use wing but how can i use it on a application that is
deployed on apache


[web2py] Debugging in web2py

2012-02-02 Thread Web2Py Freak
Dear All ,

how can i use debugging in web2py are they any easy to use debugging
tools ?


[web2py] Re: Debugging in web2py

2012-02-02 Thread Web2Py Freak
What i want to do is to use debugging in an application that i
integrated with PayPal and its working on Apache , i get some vars in
the url from paypal and am trying to save them in the database but
something happens   .. so any ideas how can i debug that !!


[web2py] auth registration redirect

2012-01-31 Thread Web2Py Freak
Dear All,

How can redirect anyone who register at my website to the profile page


[web2py] Re: auth registration redirect

2012-01-31 Thread Web2Py Freak
i added it to the db.py and its not working and i used this one from
the book and it didnt work two :

auth.settings.register_next = URL('user', args='profile')   


[web2py] using Janrain Oauth and normal login at the same time

2012-01-26 Thread Web2Py Freak
Dear all ,

how can i use Janrain Oauth and normal login at the same time ??


[web2py] Re: using Janrain Oauth and normal login at the same time

2012-01-26 Thread Web2Py Freak
Ok i did it  its like this , with the help of 
http://www.web2pyslices.com/slices/take_slice/124
:

db.py :


from gluon.contrib.login_methods.rpx_account import RPXAccount
from gluon.contrib.login_methods.extended_login_form import
ExtendedLoginForm
url = http://localhost:8000/%s/default/user/login; %
request.application
rpxform = RPXAccount(request,
api_key='a096b5b9ccb5cdecb2d29ab993746e10338b4d3b',
domain='hassanalnator',
url = url,
embed=True
)


in the controller :

def user():
rpx = ''
registerurl=URL('default','user',args='register',vars=dict(_next='/
%s/default/index'%request.application))
if request.vars.token:
auth.settings.login_form = rpxform
return dict(form=auth())
if 'login' in request.args:
rpx = rpxform.login_form()
html = DIV(H1('Login'),
   rpx,BR(),BR(),
   H1(A('Click here to register',
   _href=registerurl),BR(),
   'Or sign-in using your email and password'),
   auth(),
  )
else:
html = auth()

return dict(form=html)


and in the user view :

{{extend 'layout.html'}}
{{title=dict(
 login='',
 register=H1('Register'),
 logout=H1('Logged out'),
 profile=H1('Change your profile'),
 change_password=H1('Change your password'),
 request_reset_password=H1('Reset your password'),
 reset_password=H1('Define a new password'),
 verify_email=H1('Verification mail'),
 retrieve_username=H1('Request username'),
 not_authorized=H1('Denied!')
 )}}
{{=title[request.args(0)]}}
{{=form}}
{{if request.args(0)=='login':}}
{{if not 'request_reset_password' in auth.settings.actions_disabled:}}
br/a
href={{=URL(r=request,args='request_reset_password')}}Remember
Password/a
{{pass}}
{{pass}}



Enjoy ...


[web2py] language translation in web2py

2012-01-26 Thread Web2Py Freak
Dear All,

How can i change the language of my website with a click of a button
or how can i use the translation plugin  in my site or can make Google
translate my site


[web2py] menu.py loop

2012-01-25 Thread Web2Py Freak
Dear All ,

i want to get some stuff from the database and add to the menu , like
i have music instruments am trying to get the instruments from the
database and add to the menu  , but its not working :

menu.py :

instruments = db().select(db.Instruments.ALL)
myins = []
for ins in instruments:
myins.append((T(Instrument_name), False,
URL('default','Instruments',args=Instrument_name),)


response.menu = [
(T('Home'), False, URL('default','index'), [])
(T('Instruments'), False, URL('default','Instruments'), [
myins
])
]


how can i do this ?

Best Regards


[web2py] Re: menu.py loop

2012-01-25 Thread Web2Py Freak
i Fixed a bug its now

instruments = db().select(db.Instruments.ALL)
myins = []
for ins in instruments:
myins.append((T(ins.Instrument_name), False,
URL('default','Instruments',args=ins.Instrument_name),)
response.menu = [
(T('Home'), False, URL('default','index'), [])
(T('Instruments'), False, URL('default','Instruments'), [
myins
])
]

but still the same problem


[web2py] Question About Streaming

2012-01-25 Thread Web2Py Freak
Dear ALL,

I am building an online video training center , i really don't
understand what streaming is and why use it  , and do i need to use it
considering that  my website is built for videos  ..

and How can i use streaming if i need to ?

Best Regards


[web2py] Re: menu.py loop

2012-01-25 Thread Web2Py Freak
it keep giving me en error in the response.menu failed to compile file
because:
SyntaxError at line 30 at char 7
invalid syntax (C:/web2py/applications/a3zif/models/menu.py, line
30)  , this is my code :


instruments = db().select(db.Instruments.ALL)
myins = []
for ins in instruments:
  myins.append((T(ins.Instrument_name), False,
URL('default','Instruments',args=ins.Instrument_name),)


response.menu =
[  ### it
gives me the error highlighter here ##
(T('Home'), False, URL('default','index'), []),
(T('Instruments'), False, URL('default','Instruments'), myins)
]


[web2py] Re: Question About Streaming

2012-01-25 Thread Web2Py Freak
how would i use this , can you show me a little example please ?


[web2py] Re: Question About Streaming

2012-01-25 Thread Web2Py Freak
ohh that is great Thank you Massimo ..

Best Regards
Hassan alnator


[web2py] Re: menu.py loop

2012-01-25 Thread Web2Py Freak
oh Dam , i didnt see that  , Thank you anthony :)  its working well
now


[web2py] PowerPack

2012-01-22 Thread Web2Py Freak
Dear All ,


How can i just use the Comments and blog system from web2py
PowerPack ??


[web2py] Integration with OpenID, Facebook

2012-01-19 Thread Web2Py Freak
Dear All,

I am using the Integration with OpenID, Facebook from the book , now
what i want to do is to get users images from facebook and anyother
accounts that use to register , so any ideas ?


[web2py] Re: Paypal Mass Pay API

2012-01-19 Thread Web2Py Freak
How will i use it ?


[web2py] use the VideoLibrary from web2py appliances

2012-01-18 Thread Web2Py Freak
Dear all ,
how can i use the  VideoLibrary from web2py appliances  , i installed
the pack to my web2py but its not converting any videos !! , how can
i
fix it  and is this application can be used in in a website and i can
deploy it ??


[web2py] What is google app engine , and how to use it with web2py

2012-01-18 Thread Web2Py Freak
Dear All ,

i am going to build a online music training center , so a lot have
recommended me with the GAE , i dont know what is it and , i really
dont know from where to start  , i need help guys because this is
something so big for python and web2py and us the web2py developers
so we can prove to others how strong web2py is .. and i want to use a
lot of plugins and stuff that are tested  , so any ideas guys and i
really dont understand what is gae , and why to use it ? so if anyone
have an idea from where should i start ??


[web2py] Web2py and Paypal

2012-01-18 Thread Web2Py Freak
Dear All ,

What is the best way to integrate Paypal with web2py ?


[web2py] For trick

2012-01-16 Thread Web2Py Freak
Dear all ,

i am geting some images from the database and viewing them in the
page  i am using a for loop for the images and i want to have a br/
after every 4 images  ,, how can i do somthing like this ??


[web2py] Re: For trick

2012-01-16 Thread Web2Py Freak
Thnx Anthony , thank you all guys  its working well now :)


[web2py] using the calender in appadmin

2012-01-16 Thread Web2Py Freak
Dear All,

How can i use the calender from the appadmin in another page ?


[web2py] The deference between router.example and routes.example ??

2012-01-15 Thread Web2Py Freak
Dear All ,

What is The deference between router.example and routes.example ??

and how can i use this :

 domains = {   domain.com : app,
 x.domain.com : appx,
 },


[web2py] Re: The deference between router.example and routes.example ??

2012-01-15 Thread Web2Py Freak
i am using routes.py to clean my urls now i want to route every domain
to its website , how can i do that exactly ?


[web2py] Re: The deference between router.example and routes.example ??

2012-01-15 Thread Web2Py Freak
are you saying that i cant  use  routes_in , routes_out with
domains ??


[web2py] Re: The deference between router.example and routes.example ??

2012-01-15 Thread Web2Py Freak
i dont understand ,can explain some more please ?


[web2py] Re: Get the URL

2012-01-14 Thread Web2Py Freak
Thank you all guys its working great now , i used this

{{MyUrl = http://www.mydomain.com/%s/%s;
%request.url,request.env.query_string}}
{{=MyUrl}}


Best Regards,
Hassan Al-Natuor


[web2py] Re: Routes error

2012-01-14 Thread Web2Py Freak
Thank you Guys its working now very well ..


[web2py] Re: Routes error

2012-01-13 Thread Web2Py Freak
Dear all ,

am still trying and its not working  , am just trying to change the
default app , i renamed the router.example.py to router.py and changed
the the welcome app and added another one  , and then i entered the
admin and clicked reload routes ,and then i restarted the sever , but
nothing happend !!

what to do ?


[web2py] Get the URL

2012-01-13 Thread Web2Py Freak
Dear ALl ,

How can i get the URL of the page am in ?


[web2py] Re: Get the URL

2012-01-13 Thread Web2Py Freak
ok i did request_uri and got None ?? i want the full url with tha
domain and args because i want to use it for the facebook like


[web2py] Routes error

2012-01-11 Thread Web2Py Freak
Dear all ,

i am trying to use routes.py  , but its not working , i even tryed to
change the default app  and it didnt work  , why ?


[web2py] setup web2py with a virtual host on apache

2012-01-10 Thread Web2Py Freak
Dear all,

i have a server  and i have a apache installed how can i tell apache
to  the when someone asks for www.domain.com  , apache gives it the
website at my localhost:8080 ..  how can i do that


[web2py] Re: setup web2py with a virtual host on apache

2012-01-10 Thread Web2Py Freak
i have IIS on port 80  i want it on port 8080 !!


[web2py] Re: setup web2py with a virtual host on apache

2012-01-10 Thread Web2Py Freak
 i did all that :

LoadModule wsgi_module modules/mod_wsgi.so

Listen 8080
servername : localhost:8080

NameVirtualHost *:8080
VirtualHost *:8080
DocumentRoot C:/web2py/applications
ServerName localhost

Directory C:/web2py
Order allow,deny
Deny from all
/Directory

Location /
Order deny,allow
Allow from all
/Location

LocationMatch ^(/[\w_]*/static/.*)
Order Allow,Deny
Allow from all
/LocationMatch

WSGIScriptAlias / C:/web2py/wsgihandler.py

LogFormat %h %l %u %t \%r\ %s %b common
CustomLog logs/access.log common
/VirtualHost

what i want now is to have a domain that access localhost:8080 that
has web2py


[web2py] Re: setup web2py with a virtual host on apache

2012-01-10 Thread Web2Py Freak
its not working !!


[web2py] Re: setup web2py with a virtual host on apache

2012-01-10 Thread Web2Py Freak
i did what Kenneth said , and i am restarting the Apache everything i
change anything , i am using a VPS at arvixe.com  i have IIS running
on localhost:80 and apache running on localhost:8080 and its really
good locale now i just want to make a domain go to localhost:8080 and
then i will handle it from routes.py , this is what i did :

Listen 8080
servername : localhost:8080
NameVirtualHost *:8080
VirtualHost *:8080
DocumentRoot C:/web2py/applications
ServerName www.domain.com
ServerAlias www.domain.com
Directory C:/web2py
Order allow,deny
Deny from all
/Directory
Location /
Order deny,allow
Allow from all
/Location
LocationMatch ^(/[\w_]*/static/.*)
Order Allow,Deny
Allow from all
/LocationMatch
WSGIScriptAlias / C:/web2py/wsgihandler.py
LogFormat %h %l %u %t \%r\ %s %b common
CustomLog logs/access.log common
/VirtualHost


[web2py] Re: setup web2py with a virtual host on apache

2012-01-10 Thread Web2Py Freak
i want when someone go to www.mydomain.com  he will go to localhost:
8080


[web2py] Re: setup web2py with a virtual host on apache

2012-01-10 Thread Web2Py Freak

 how can i use an HTTP proxy ?


[web2py] Domain and DNS

2012-01-09 Thread Web2Py Freak
Dear All ,
 i have a private server at ARVIXE and i am using wamp server   , i
used the deployment for apache in the book but now how can i assign
domains to a virtual host  , how can i get the reqested domain  , i
dont know what to do new  , web2py is working at localhost:8080  now
whats next ??!


[web2py] Web2py instant admin

2012-01-09 Thread Web2Py Freak
Dear all,

i am trying to use web2py instant admin  , i installed it  like in the
documentation but when i use the username a and pass a it dosent login
and when i use my own authentication it enters the admin interface but
i cant see any of my tables ?? how can i fix this ???


[web2py] Apache and routes

2012-01-08 Thread Web2Py Freak
Dear All ,
i have a private server i am using Apache  for deployment i used the
steps in the book , and its working on a certain IP   and now how can
i tell web2by  that when this is requested (ex.www.koko.com) give at a
certain application ??


[web2py] apache Error

2012-01-04 Thread Web2Py Freak
Dear Guys,

i am trying to deploy web2py using apache and mod_wsgi , i loaded
mod_wsgi.so and i added  this :

NameVirtualHost *:443
VirtualHost *:443
  DocumentRoot C:/web2py/applications
  ServerName server1

  Directory C:/web2py
Order allow,deny
Deny from all
  /Directory

  Location /
Order deny,allow
Allow from all
  /Location

  LocationMatch ^(/[\w_]*/static/.*)
Order Allow,Deny
Allow from all
  /LocationMatch

  WSGIScriptAlias / C:/web2py/wsgihandler.py

  #SSLEngine On
  #SSLCertificateFile conf/server.crt
  #SSLCertificateKeyFile conf/server.key

  LogFormat %h %l %u %t \%r\ %s %b common
  CustomLog logs/access.log common
/VirtualHost

and adding the listing 443 under the listing 8080
and i dont want to use SSLEngine

i even try to run  the apache Test configuration and i didnt get any
error but when i try to start apache it keeps giving me an error : the
requested operation has field ...


what to do guys !!



best regards ,
Hassan alnator,


[web2py] Re: deployment problem with mod_wsgi

2011-12-19 Thread Web2Py Freak
i think there is somthing wrong with the way i installed mod_wsgi ,,
can you please tell me how to install it ??


[web2py] deployment problem with mod_wsgi

2011-12-18 Thread Web2Py Freak
Dear All,
i am trying to use mod_wsgi with apache on fedora  i installed
web2py
in var/www/ and i unzipped it , and i edited the httpd.conf and added
the virtual host script but it keeps giving me this error with i do
$
service httpd start 
the error is :
bad user name : root@linux
what to do  i tryed  everything !!! please help
Best Regards,
Hassan Al-natour


[web2py] problem with mod_wsgi deployment

2011-12-15 Thread Web2Py Freak
Dear All,
i am trying to use mod_wsgi with apache on fedora  i installed  web2py
in var/www/ and i unzipped it , and i edited the httpd.conf and added
the virtual host script but it keeps giving me this error with i do $
service httpd start 

the error is :

bad user name : root@linux


what to do  i tryed  everything !!! please help

Best Regards,
Hassan Al-natour



[web2py] Using Fast CGI

2011-11-24 Thread Web2Py Freak
Dear ALL,

I want to use a normal python host and i want to know how can i use
fast CGI for this  ??


[web2py] Re: Using Fast CGI

2011-11-24 Thread Web2Py Freak
i want to use arvix and i picked python as my language   , now what i
want to know is what would i upload  to the host  the full framework
or my website , i dont know where to start


[web2py] Re: Make an image Thumb

2011-11-20 Thread Web2Py Freak
Dear All,
How can i install the PIL to my project  i tried pbreit code but i
didn't get i thumb i think maybe because am not using PIL in the
correct way , i just Downloaded the PIL in source and copied it to the
modules folder , how can i do it ??



Best regards,
Hassan alnator


[web2py] Using Python Imaging Library(PIL)

2011-11-20 Thread Web2Py Freak
Dear All,

How can i use the python PIL in my project ?


[web2py] Rss Reader

2011-11-20 Thread Web2Py Freak
Dear All,

How can i use an RSS reader in my website to get feeds from another
website ??


[web2py] Re: Using Python Imaging Library(PIL)

2011-11-20 Thread Web2Py Freak
i want to use this code but i dont know how to import the PIL ??? can
you tell me how ?


[web2py] Re: Using Python Imaging Library(PIL)

2011-11-20 Thread Web2Py Freak
i dont know how to install it


[web2py] Re: Using Python Imaging Library(PIL)

2011-11-20 Thread Web2Py Freak
windows 7


[web2py] Re: Using Python Imaging Library(PIL)

2011-11-20 Thread Web2Py Freak
i will try it , but when i upload my project to a host , how would the
PIL work if its just installed to my PC ?


[web2py] Re: Using Python Imaging Library(PIL)

2011-11-20 Thread Web2Py Freak
how do i install it in the host ???


[web2py] Re: Using Python Imaging Library(PIL)

2011-11-20 Thread Web2Py Freak
i am using Webfaction


[web2py] Re: Using Python Imaging Library(PIL)

2011-11-20 Thread Web2Py Freak
i just used ssh to get into webfaction terminal and tested import
Image on its python and its working .. thanx :)


[web2py] Make an image Thumb

2011-11-17 Thread Web2Py Freak
Dear All,

i am trying to make a Thumb and i used this code here :

Model:

db.define_table('uploads',
Field('name','string'),
Field('mainfile','upload'),
Field('thumb','upload',writable=False,readable=False),
)


Controller:

def makeThumbnail(dbtable,ImageID,size=(150,150)):
try:
thisImage=db(dbtable.id==ImageID).select()[0]
import os, uuid
from PIL import Image
except: return
im=Image.open(request.folder + 'uploads/' + thisImage.mainfile)
im.thumbnail(size,Image.ANTIALIAS)
thumbName='uploads.thumb.%s.jpg' % (uuid.uuid4())
im.save(request.folder + 'uploads/' + thumbName,'jpeg')
thisImage.update_record(thumb=thumbName)
return

def uploadimage():
dbtable = db.uploads  #uploads table name
if len(request.args):
records = db(dbtable.id==request.args[0]).select()
if len(request.args) and len(records):
form = SQLFORM(dbtable, records[0], deletable=True)
else:
form = SQLFORM(dbtable)
if form.accepts(request.vars, session):
response.flash = 'form accepted'
makeThumbnail(dbtable,form.vars.id,(175,175))
elif form.errors:
response.flash = 'form has errors'
## Quick list just to demonstrate...
list = crud.select(dbtable)
return dict(form=form,list=list)


But after i upload an image i don't get a thumb i don't know why just
the original image and the thumb Field in the database stays empty , i
don't know why  so help me guys ...

Best regards,


[web2py] Import Python Imaging Library(PIL)

2011-11-17 Thread Web2Py Freak
Dear All,

am trying to use the PIL and i am using this code :


class RESIZE(object):
def __init__(self,nx=160,ny=80,error_message='niepoprawny plik'):
(self.nx,self.ny,self.error_message)=(nx,ny,error_message)
def __call__(self,value):
if isinstance(value, str) and len(value)==0:
return (value,None)
from PIL import Image
import cStringIO
try:
img = Image.open(value.file)
img.thumbnail((self.nx,self.ny), Image.ANTIALIAS)
s = cStringIO.StringIO()
img.save(s, 'JPEG', quality=100)
s.seek(0)
value.file = s
except:
return (value, self.error_message)
else:
return (value, None)

def THUMB(image, nx=120, ny=120):
from PIL import Image
import os
img = Image.open(request.folder + 'uploads/' + image)
img.thumbnail((nx,ny), Image.ANTIALIAS)
root,ext = os.path.splitext(image)
thumb='%s_thumb%s' %(root, ext)
img.save(request.folder + 'uploads/' + thumb)
return thumb


db.define_table('gallery',
Field('image', 'upload', required=True, notnull=True,
requires=[IS_IMAGE(), RESIZE(650, 650)]),
Field('image_thumb', 'upload', compute=lambda r:
THUMB(r['image'])))



but i keep getting this error :

type 'exceptions.ImportError'(No module named PIL)


i added the folder of the PIL in the models folder in the project is
this how i import or not  ??


[web2py] Re: Rss

2011-11-15 Thread Web2Py Freak
http://www.ammonnews.net/rss.aspx?sectionid=50sectionName=%D8%A7%D8%AE%D8%A8%D8%A7%D8%B1%20%D8%A7%D9%84%D8%A7%D8%B1%D8%AF%D9%86%20RSS


[web2py] Re: Rss

2011-11-15 Thread Web2Py Freak
Dear Massimo ,

i want to get some feeds through RSS from this website (http://
www.ammonnews.net) , can you show me how ? i sow the example and still
i cant apply it ,

Best Regards,


[web2py] Controlling Rss in View

2011-11-15 Thread Web2Py Freak
Dear All,

I used this code in controller to get me RSS feeds from a website and
it did but i dont know how to use it in view :

this is the code i used :

def index():

import gluon.contrib.feedparser as feedparser
d = feedparser.parse(
http://www.ammonnews.net/rss.aspx?sectionid=50sectionName=
%D8%A7%D8%AE%D8%A8%D8%A7%D8%B1%20%D8%A7%D9%84%D8%A7%D8%B1%D8%AF
%D9%86%20RSS)
return dict(title=d.channel.title,
link = d.channel.link,
description = d.channel.description,
created_on = request.now,
entries = [
  dict(title = entry.title,
  link = entry.link,
  description = entry.description,
  created_on = request.now) for entry in d.entries])



and in default/index i got some feeds but how can i make it look like
what i want ?




[web2py] Multiple upload

2011-11-13 Thread Web2Py Freak
Dear All,

Is it possible to have multiple uploads for on Field ??

Best Regards,
Hassan Alnatour


[web2py] Re: Webfaction: Memory usage way over your limit ; again.

2011-11-13 Thread Web2Py Freak
Dear Annet,

I had the same problem as you Remember but there is one thing that was
helpful to me ,

First : i am using now one application  for all my websites .

second : i prepared the welcome app to be like a router  and its
working fine
in welcome/default.py:


def index():
if request.env.http_host.endswith('Your domain'):
 redirect(URL(a='Your domain',c='default',f='index'))
 and so on ...


Best Regards,
Hassan alnatour..


[web2py] Rss

2011-11-13 Thread Web2Py Freak
Dear All,

can anyone give me an example of using Rss in web2py ? and how can i
control things in  it ? what dose it return ??


[web2py] WebFactions Applications

2011-10-30 Thread Web2Py Freak
Dear All ,

 I am using WebFaction for hosting , i install the web2py app in a
custom script , now do i have to install an app for every website or
use just one app , and if using one app how can i point the domain to
it ??


Best Regards ,
Hassan Alnator


[web2py] Re: WebFactions Applications

2011-10-30 Thread Web2Py Freak
i understand it but i really dont know how to do it


[web2py] Re: WebFactions Applications

2011-10-30 Thread Web2Py Freak
My app name is 'Web2py'  and in it i have two 'web2py app':

1- welcome
2-maestro

now i have a domain and in the site app i selected web2py and there is
nothing in the path so it takes the welcome app

and now i have some other domain and i want it to start mastro web2py
app  .. i will select web2py and then what to add in the URL path ???


[web2py] comparing datatime Fields

2011-10-20 Thread Web2Py Freak
Dear All ,

i have a table called events which looks like this :

db.define_table('events',Field('title'),Field('description','text'),Field('datetime','datetime',default=request.now,readable=False,writable=False))


and in my default/events.html  i want to get the event the the
datetime in it is less that now , am trying to do it like this  :

events=db(db.event.datetime  request.now ).select(db.events.ALL)


but its not working , do you have any idea how to do it ??


Best reagards,
Hassan alnatour


[web2py] Re: comparing datatime Fields

2011-10-20 Thread Web2Py Freak
Dear Richard ,

its working now  i just had db.event insted of db.events  now its
working will  , thank you ,

Best Regards,


[web2py] language

2011-10-18 Thread Web2Py Freak
Dear All ,

I want to button the can change the language of the website ? Is it
possible ?

Best Regards.


[web2py] Complicated form

2011-10-13 Thread Web2Py Freak
Dear All ,

i want to make a form that has name Field , email Field , Comment
Field ,and 15 radio buttons but i dont want it to come from the
database and when its accepted send a email with its content  and i
have a design for it  so i need to control its places.

is this possible and how can i do something like this  ?!


[web2py] on Crud accept

2011-10-13 Thread Web2Py Freak
Dear All ,

i have a crud.create form and i want to send an email on its accept  ,
how can i do that ??


[web2py] Re: on Crud accept

2011-10-13 Thread Web2Py Freak
can i do it like this :

crud.create(...,onaccept=lambda
form:mail.send('halna...@gardeniatelco.com','Contact Us form by : '
+form.vars.your_email,'htmlh4Full Name :'+form.vars.your_name+'/
h4h4 Email :'+form.vars.your_email+'/h4/brph3Comment is :/
h3'+ form.vars.comment+'/p/brp Band is:'+form.vars.your_band+'/
p/html'))


this is right ???


[web2py] Re: on Crud accept

2011-10-13 Thread Web2Py Freak
thnx its working now  but i want to ask you somthing  , how can i do
it in a function :

def send_mail():
mail.send('halna...@gardeniatelco.com','Contact Us form by : '
+form.vars.your_email,'htmlh4Full Name :'+form.vars.your_name+'/
h4h4 Email :'+form.vars.your_email+'/h4/brph3Comment
is :/
h3'+ form.vars.comment+'/p/brp Band is:'+form.vars.your_band
+'/
p/html')

return None


but when i do it like this the function dose not understand what is
'form'


[web2py] Re: on Crud accept

2011-10-13 Thread Web2Py Freak
but how can i bass it then ? how the function know what to pass ?


[web2py] Static forms

2011-10-11 Thread Web2Py Freak
Dear All ,

i want to build a form in html and when the form is accepted  send its
content  in a Email , i know how to email it  but i want to know how
can i catch it in the controler and see if its accepted  , how can i
do that ??


[web2py] Re: Static forms

2011-10-11 Thread Web2Py Freak
when using  sqlform-in-html  ,do i have to use a table in the db ,,
and how can i create a radio button from there ?


[web2py] Re: Static forms

2011-10-11 Thread Web2Py Freak
am trying to use SQLFORM.factory with a widget but its not working :

def booking():
content=db(db.page.title=='booking').select(db.page.ALL)
form = SQLFORM.factory(
Field('your_name', requires=IS_NOT_EMPTY()),
Field('your_email'),
Field('like',widget=SQLFORM.widgets.radio.widget)
)
if form.accepts(request.vars,session):
response.flash = 'form accepted'

elif form.errors:
response.flash = 'form has errors'
return dict(content=content,form=form)



the error is :

type 'exceptions.SyntaxError'(widget cannot determine options of
no_table.like)


what to do ??!


[web2py] Re: Static forms

2011-10-11 Thread Web2Py Freak
oh thnx richard  its working  , and its a radio now but tell me how
can i get its valu when accepted ??


[web2py] logged in user

2011-10-07 Thread Web2Py Freak
Dear All ,

How Can I get the name of the user who is logged in my website ??


[web2py] Re: logged in user

2011-10-07 Thread Web2Py Freak
thnx guys its working now ..


[web2py] Crazy problem !!

2011-10-07 Thread Web2Py Freak
Dear All ,

i am making an E-learning  application  and am using
auth.user.first_name  but when i logout an error happens :

type 'exceptions.AttributeError'('NoneType' object has no attribute
'first_name')



this is the controller :

def index():

example action using the internationalization operator T and flash
rendered by views/default/index.html or views/generic.html

meterials=db().select(db.addmaterial.ALL)
 
metforteacher=db(db.addmaterial.techer==auth.user.first_name).select(db.addmaterial.ALL)
return dict(meterials=meterials,metforteacher=metforteacher)

what is happening ??


[web2py] Re: Crazy problem !!

2011-10-07 Thread Web2Py Freak
So what to do ??


[web2py] Email Form

2011-10-06 Thread Web2Py Freak
Dear all ,

can anyone tell me how can i make a email form to send to my email
am using webfaction for hosting  .. so tell me what to do ??


[web2py] Re: Email Form

2011-10-06 Thread Web2Py Freak
ok , but i want to use my gmail hassanalna...@gmail.com to send mail
so i did :

mail.settings.server ='smtp.gmail.com:587'  # your SMTP server
mail.settings.sender = 'hassanalna...@gmail.com' # your email
mail.settings.login = None   # your credentials or None


and :

 form=SQLFORM(db.blogcomments,separator=False)
  if form.accepts(request.vars,session):
  response.flash=response.flash_formsent
  mail.send(to=['hassan_alna...@hotmail.com'], subject='A blog
comment has been posted by ' +
form.vars.author,message=form.vars.comment)
  form=['Your Comment Has Been Made']
  elif form.errors:
  response.flash=response.flash_formerror
  else:
  response.flash=response.flash_form




so what is wrong here ???


[web2py] Re: Email Form

2011-10-06 Thread Web2Py Freak
what user name and password ??


[web2py] roles

2011-10-02 Thread Web2Py Freak
hey guys ,


 i want to use somthing like this in my page but with ROLES:

{{if auth.is_logged_in():}}

{{pass}}


[web2py] Re: roles

2011-10-02 Thread Web2Py Freak
i have a role called reg

i tryed :
{{ if auth.has_membership('reg')

content for reg .

{{pass}}

but it didnt work 


[web2py] Re: Fast CGI

2011-09-27 Thread Web2Py Freak
windows


[web2py] top 5

2011-09-27 Thread Web2Py Freak
Hey guys ,

how can i get to 5 records from a table ??


[web2py] Re: top 5

2011-09-27 Thread Web2Py Freak
thnx , its working well , i want to ask you if there is a Field in a
table type text how can i get some of it not all the text ??


  1   2   >