Mar-09-2018, 04:59 PM
Good Frameworks where you can start
I like flask very much, because the framework is very lightweight. In other frameworks you have for example the one way to do something, if you like it or not. It's a good start point and if you currently don't know classes and the oop behind, this is not a problem. Flask works with decorated functions.
A very easy example:
- https://www.djangoproject.com/
- beside there are many extensions to this project, for example https://www.django-cms.org/en/
- ----->>>>> http://flask.pocoo.org/ <<<<<-----
I like flask very much, because the framework is very lightweight. In other frameworks you have for example the one way to do something, if you like it or not. It's a good start point and if you currently don't know classes and the oop behind, this is not a problem. Flask works with decorated functions.
A very easy example:
from flask import Flask from flask import jsonify from flask import request import jinja2 app = Flask(__name__) html = '<html><head><meta charset="utf8" /><title>{{title}}</title></head><body><p>{{message}}</p></body></html>' template = jinja2.Template(html) @app.route('/') def root(): return 'Hello World' @app.route('/test', methods=['GET', 'POST']) def test(): response = {'method': request.method, 'form': request.form, 'data': request.data} return jsonify(response) @app.route('/test2') def test2(): return template.render(title='/test2', message='This is a test message') if __name__ == '__main__': app.run()
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!