Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1640 Weergaven

I want to know if there is a way in Odoo to assign a base route to a controller.

By that, I mean: Imagine I have a module called "App1", with a controller offering routes for this app.

I want all my routes to start with "/app1". 

Instead of having to repeat this on every '@route' decorator of my controller, can I set it globally so every route will be prefixed with this global one?


fictional example:

@controller_route('/app1'):
class MyController(Controller):
​@route('home')
​app_home():
​# is accessible via /app1/home
Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
mrt. 15
3605
0
mrt. 15
4465
1
jun. 25
2264
2
jun. 25
596
0
mei 25
766