Comments (4)
Hey @almet ! :)
There is nothing formal like blueprints included in Roll so far. We did discuss this needs (mainly from the "generical roll app" point of view), but for now didn't get the simple and generic solution to handle that.
IIRC, the option we evaluated was to have a route
that would point to another app
.
So you're stuck with plain python :p
Until now, I've myself used those structures:
- either a plain file with app and views
- either a
base.py
(or core.py orβ¦) that would be the entry point, with the app, maybe some views, and importing views from other "subfiles" (where other files are just for keeping the code base organized) - either a
base.py
that would contain only theapp
and it's configuration, then many views files dedicated to various needs, that would be then imported from the__init__.py
(or any other intermediate to prevent those to be imported at install)
Hope it helps! :)
from roll.
Hey, thanks for the quick response, and for the pointers.
Turns out my python started to be a bit rusty, and I managed to do what I wanted thanks to your help π. If this can help anybody, it's as simple as what's described in this gist.
from roll.
Hi :)
It might be worth a dedicated example in the docs? π€
from roll.
Right! Let's reopen this then :-)
from roll.
Related Issues (20)
- 404 missing from logger
- websockets HOT 4
- Roll on Curio HOT 2
- Catch HttpParserInvalidMethodError HOT 2
- HTTP/2 support HOT 1
- ImportError: cannot import name 'HttpParserUpgrade' from 'httptools' HOT 6
- Cors wildcard does not allow some methods
- Headers HOT 5
- View HOT 4
- Access-Control-Allow-Headers wildcard rejected in Firefox HOT 3
- Illegal escape sequences in string
- Allow websockets 8.0.2
- File API for streamed Response ?
- url_for helper to build URLs HOT 2
- Custom exceptions
- url_for `already exist` errors when using decorators HOT 1
- url_for and routes defined twice HOT 2
- Accessing request.form in a @app.listen("request") raises a LazyBody error. HOT 1
- Dependabot couldn't authenticate with https://pypi.python.org/simple/
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 roll.