Some required (basic) features of vweb module, please reply below for features not listed here.
/post/<int:post_id>. At least string, int should be supported, additionally, float, path, uuid and more.@app.route('/login', methods=['GET', 'POST'])Syntax like Python Jinja2 is popular nowadays, if vweb template engine is fully compatible, that would be very easy for web developers to migrate from Jinja2 style template (including Django) to vweb - rewriting all existing html template files in a big project is too much work and pain.
make a request.
- Request forward.
- Support uploading files.
- Security in any request.
I added File uploading support. Thanks for sharing.
It would be better to explain with more details of other 2 features so that others can easily understand what they're.
Hi @iredmail , Sorry for confusing you, maybe I have a problem in my words.
This is redirecting a request. When I'm in /profile page, I can redirect /login page. I think vweb should have this ability.
This is a commonly base concept.
When user upload a image, vweb should validate the image's security simply(fg check the file's header...).
Or if I have a uri like /user/\
Hi all, for redirect I think it's redirect from clients, right ?
Even forward (redirect to another URL at server side) could be useful too ...
On uploads, to avoid attacks and other stuff, please set a default buffer dimension and the ability to override it if needed.
Adding to the routing->Rules, i'd like to see a way to make files without extensions show up (+ define custom mime types without editing vweb.v)
Anyone interested in the most recent vweb changes should check the gitly source: https://github.com/vlang/gitly
For redirects on the server side, you just use vweb.redirect().
To specify http methods, use attributes [get], [post], etc.
If the route contains pieces starting with :, these are passed as variables into your function, like so:
[post]
['/:user/:repo/settings']
pub fn (mut app App) update_repo_settings(user, repo string) vweb.Result {
Most helpful comment
Anyone interested in the most recent vweb changes should check the gitly source: https://github.com/vlang/gitly
For redirects on the server side, you just use
vweb.redirect().To specify http methods, use attributes
[get],[post], etc.If the route contains pieces starting with
:, these are passed as variables into your function, like so: