Comments (2)
I can apply you PR if you guarrantee me that you made some test and it works properly... You have to know (if you don't already know it) that CRUD is "deprecated" we leaving there, but it not maintain anymore and the core team has no intention to maintaining it in the future. At some point it will disapear... The only usage a developer should have of it is rapid prototyping as proof of concept, but even so, there is not so much advantage not using SQLFORM knowing that you will have to refactoring it if your demonstration is validated... The extra mile involve in using SQLFORM from the start doesn't worth the extra work you will have to refactor you code...
Also in your example I doubt that someone who intent to use next with URL('index') would ever pass the ID of the created record with crud.create() except if your form would be inside your index page controller function, which is not the case in the following example you showed us...
So maybe with :
def people():
form = crud.create(db.person, next=URL('people/[id]'),
message=T("record created"))
It would make some sens... But I am curious what the default behavior of :
form crud.create(db.person, message=T("record created")) # without specifiying the "next" argument
from web2py-book.
I didn't know CRUD is not maintained anymore. However I don't see what needs testing here, it is just a side note in the documentation. I've noted this issue while using a CRUD form in an old application a year ago and solved it using url_encode=False
.
Also, URL("index")
is just an example. It is logical to redirect to the record once created, then you need to know its ID. I can edit the issue and put next=URL("show_the_just_created_record/[id]")
so it is self-explanatory.
from web2py-book.
Related Issues (20)
- Can someone can securely stop setting "auth.settings.hmac_key"? HOT 1
- Typo in response.download documentation
- Hidden field documentation bug HOT 1
- Document the table_name argument of Field.Virtual()
- Book update TODO-List HOT 4
- Document how to insert 4-byte characters using MySQL connector HOT 1
- wsgihandler.py should be mentioned in the nginx deployment recipe HOT 1
- typo in chapter 05
- Book correction in Spanish version
- Parameters of the ajax() function are not documented in full
- DAL chapter on CSV Export -
- Reference to pdf resource HOT 1
- Book correction in italian version
- Web2py online book page is returning an error HOT 2
- Suggestion: Consider adding this recipe to add offline icons to buttons
- Apache AliasMatch recommendation from the book is still required/applies?
- Correction for mOTP code on Python 3
- PyWin32 download location
- Foreign Key constraint error with custom date/datetime fields HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from web2py-book.