mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
Fix etesync tests
This commit is contained in:
parent
cc54ed6e7c
commit
2b0492fe5e
2 changed files with 12 additions and 12 deletions
2
Makefile
2
Makefile
|
|
@ -21,7 +21,7 @@ endif
|
||||||
|
|
||||||
ifeq ($(ETESYNC_TESTS), true)
|
ifeq ($(ETESYNC_TESTS), true)
|
||||||
TEST_EXTRA_PACKAGES += git+https://github.com/etesync/journal-manager
|
TEST_EXTRA_PACKAGES += git+https://github.com/etesync/journal-manager
|
||||||
TEST_EXTRA_PACKAGES += django djangorestframework wsgi_intercept
|
TEST_EXTRA_PACKAGES += django djangorestframework wsgi_intercept drf-nested-routers
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CI), true)
|
ifeq ($(CI), true)
|
||||||
|
|
|
||||||
|
|
@ -13,26 +13,26 @@ Including another URLconf
|
||||||
1. Import the include() function: from django.conf.urls import url, include
|
1. Import the include() function: from django.conf.urls import url, include
|
||||||
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
|
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
|
||||||
"""
|
"""
|
||||||
from django.conf import settings
|
|
||||||
from django.conf.urls import include, url
|
from django.conf.urls import include, url
|
||||||
from django.contrib import admin
|
|
||||||
|
|
||||||
from rest_framework import routers
|
from rest_framework_nested import routers
|
||||||
from rest_framework.authtoken import views as token_views
|
|
||||||
|
|
||||||
from journal import views
|
from journal import views
|
||||||
|
|
||||||
router = routers.DefaultRouter()
|
router = routers.DefaultRouter()
|
||||||
router.register(r'journals', views.JournalViewSet)
|
router.register(r'journals', views.JournalViewSet)
|
||||||
router.register(r'journal/(?P<journal>[^/]+)', views.EntryViewSet)
|
router.register(r'journal/(?P<journal_uid>[^/]+)', views.EntryViewSet)
|
||||||
|
router.register(r'user', views.UserInfoViewSet)
|
||||||
|
|
||||||
|
journals_router = routers.NestedSimpleRouter(router, r'journals', lookup='journal')
|
||||||
|
journals_router.register(r'members', views.MembersViewSet, base_name='journal-members')
|
||||||
|
journals_router.register(r'entries', views.EntryViewSet, base_name='journal-entries')
|
||||||
|
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
url(r'^api/v1/', include(router.urls)),
|
url(r'^api/v1/', include(router.urls)),
|
||||||
url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')), # noqa
|
url(r'^api/v1/', include(journals_router.urls)),
|
||||||
url(r'^api-token-auth/', token_views.obtain_auth_token),
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if settings.DEBUG:
|
# Adding this just for testing, this shouldn't be here normally
|
||||||
urlpatterns += url(r'^reset/$', views.reset, name='reset_debug'),
|
urlpatterns += url(r'^reset/$', views.reset, name='reset_debug'),
|
||||||
|
|
||||||
urlpatterns += url(r'^admin/', admin.site.urls),
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue