db.define_table('music',
Field('name',required=True),
Field('filename','upload',required=True),
auth.signature)
" > applications/audio/models/db_audio.py
echo "
response.menu = [('Home',0,URL('index'))]
# allows to browser, search, and upload new music (if logged in)
def index():
# tell web2py that links to music files are to be
# represented as HTML5 audio embedded players
from gluon.contrib.autolinks import expand_one
db.music.filename.represent = lambda v,r: \
XML(expand_one(URL('download',args=v),{}))
return dict(grid = SQLFORM.grid(db.music))
# perform login/logout/registration/etc.
def user():
return dict(form=auth())
if it is for a streaming video that should be put as a code to view ?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.