Hi,
I've another question:
Every user should upload files and i create a table called
projectfile.
db.define_table('projectfile',
SQLField('userid', default=auth.user.id if auth.user
else 0, writable=False, readable=False),
SQLField('procreator', default=auth.user.last_name if
auth.user else 0, writable=False, readable=False),
SQLField('projectname'),
SQLField('filename'),
SQLField('format'),
SQLField('cdate', 'date', default=now),
SQLField('datei','upload'),
SQLField('description','text'))
db.projectfile.procreator.requires=IS_IN_DB(db,'auth_user.last_name')
db.projectfile.userid.requires=IS_IN_DB(db,'auth_user.id')
db.projectfile.projectname.requires=IS_IN_DB(db,'project.pname')
db.projectfile.filename.requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB
(db,'projectfile.filename')]
db.projectfile.format.requires=[IS_NOT_EMPTY()]
db.projectfile.cdate.requires=[IS_NOT_EMPTY(), IS_DATE()]
db.projectfile.datei.requires=IS_NOT_EMPTY()
--------------------------------------------------------------------------------------------------------------------------------------------
def projectfile():
if auth.is_logged_in():
form=SQLFORM(db.projectfile,fields=['projectname',
'filename',
'format',
'description',
'datei'])
--------------------------------------------------------------------------------------------------------------------------------------------
now my question: how can i show on the website in the field
'projectname' only the projects from the user not all projects in the
table?
thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---