豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Have a JSON file for routes shared with Vue and Django #408

@davinotdavid

Description

@davinotdavid

The problem

We have a Vue app that gets rendered in a specific route within the Django app. However, some of the routes in the Vue app should be guarded (/dashboard, for example) whereas others should not be guarded (/privacy, for example).

We can simply hard-code / duplicate the routes that are supposed to be guarded in the Django urls.py but that is not super maintainable long term and prone for errors since one would need to remember to add a public route in both sides.

A possible solution

We could potentially attempt to have a single JSON file that would represent routes to be consumed both by the Vue app and the Django app. This would eliminate the duplication and avoid errors in the future.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions