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

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions