Hi there. I am a bit stuck here. ANy help greatly appreciated. I have
this:
@auth.requires_login()
def crear_project_location():
project_id=request.args(0)
project=db.project[project_id]
if project:
db.project_location.project.default=project_id
db.project_location.project.writable=False
form=crud.create(db.project_location)
projects=db(db.project_location.project==project.id).select(orderby=db.project_location.project)
else:
form=None
projects=db(db.project_location.id>0).select(orderby=db.project_location.name)
return dict(project=project,projects=projects,form=form)
It works perfect BUT it will always get me to a blank editable form
due to the crud.create. I tried putting a crud.read. I want the user
to click on the link and if there is already a project _location for a
project then just display it (crud.read), if the project has no
location associated, then it will give me crud.write. I know it must
be simple but I cant figure it out.
THanks