-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Switched to ruff * Enabled eslint * Stop using get_user_model * Finish updating template * add diff_url to pull request model * Set last_run_at for task * refactored submit_bill * Updated dependencies * Squashed db migrations * added diff_url to frontend * update docs * Started using django_model_utils * Improve status choices documentation * Improved coverage
- Loading branch information
Showing
88 changed files
with
1,307 additions
and
1,341 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,16 @@ | ||
from django.conf import settings | ||
from rest_framework.routers import DefaultRouter, SimpleRouter | ||
from rest_framework.routers import DefaultRouter | ||
from rest_framework.routers import SimpleRouter | ||
|
||
from democrasite.users.api.views import UserViewSet | ||
from democrasite.webiscite.api.views import BillViewSet | ||
|
||
router: SimpleRouter | DefaultRouter | ||
if settings.DEBUG: | ||
router = DefaultRouter() | ||
else: | ||
router = SimpleRouter() | ||
router = DefaultRouter() if settings.DEBUG else SimpleRouter() | ||
|
||
router.register("users", UserViewSet) | ||
router.register("bills", BillViewSet) | ||
|
||
# Unfortunately if we want to automatically create links between models we can't use a namespace | ||
# app_name = "api" | ||
# Unfortunately if we want automatical links for models we can't use a namespace | ||
# but I may reconsider anyway | ||
# app_name = "api" # noqa: ERA001 | ||
urlpatterns = router.urls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.