Skip to content

Fix antipattern with IDOM_WEB_MODULE_PATH #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
Archmonger opened this issue Jan 9, 2022 · 0 comments · Fixed by #45
Closed
1 task done

Fix antipattern with IDOM_WEB_MODULE_PATH #37

Archmonger opened this issue Jan 9, 2022 · 0 comments · Fixed by #45
Assignees

Comments

@Archmonger
Copy link
Contributor

Archmonger commented Jan 9, 2022

Old Behavior

Currently, we expect the user to add IDOM_WEB_MODULE_PATH within the urlpattern, however, this is an antipattern within the Django framework

New Behavior

Follow Django conventions and utilize standard path variables.

Implementation Details

Replace instructions to utilize IDOM_WEB_MODULE_PATH with path("idom/", include("django_idom.http.urls"))

Create django_idom.http.urls that contains a urlpatterns = [...]

Anywhere within django-idom where we need to determine the URL, we need to fetch it using django reverse("idom:web_modules")

This implementation also requires that we remove IDOM_BASE_URL as a variable.

Code of Conduct

@Archmonger Archmonger added triage and removed triage labels Jan 9, 2022
@Archmonger Archmonger self-assigned this Jan 9, 2022
@Archmonger Archmonger changed the title Fix antipattern with IDOM_*_PATH variables Fix antipattern with IDOM_WEB_MODULE_PATH Jan 12, 2022
Archmonger added a commit that referenced this issue Jan 21, 2022
- fix #37
- Follows Django conventions for HTTP URLs. Allows us to add more in the future when needed.
- Major overhaul of the readme to improve readability.
- Expose IdomWebsocket to encourage type hinting
- Removes IDOM_BASE_URL as it was difficult to use in conjunction with Django base URLs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant