Skip to content
Snippets Groups Projects
Commit e2362adb authored by Tanner Prestegard's avatar Tanner Prestegard Committed by GraceDB
Browse files

Adding v2 for API

Instantiating a second version for the API.  For now, it's identical
to v1, but can be customized as needed in the future.
parent 0b8bd53a
No related branches found
No related tags found
1 merge request!8Superevents
Showing
with 20 additions and 2 deletions
......@@ -336,7 +336,7 @@ REST_FRAMEWORK = {
'api.versioning.NestedNamespaceVersioning',
#'rest_framework.versioning.NamespaceVersioning',
'DEFAULT_VERSION': 'default',
'ALLOWED_VERSIONS': ['default', 'v1'],
'ALLOWED_VERSIONS': ['default', 'v1', 'v2'],
'DEFAULT_PAGINATION_CLASS':
'rest_framework.pagination.LimitOffsetPagination',
'PAGE_SIZE': 1e7,
......
......@@ -5,5 +5,5 @@ app_name = 'api'
urlpatterns = [
url(r'^', include('api.v1.urls', namespace='default')),
url(r'^v1/', include('api.v1.urls', namespace='v1')),
#url(r'^v2/', include('api.v2.urls', namespace='v2')),
url(r'^v2/', include('api.v2.urls', namespace='v2')),
]
from ...v1.events.fields import *
from ....v1.events.tests.mixins import *
from ...v1.events.throttles import *
from ...v1.events.urls import *
from ...v1.events.views import *
from ..v1.fields import *
from ..v1.filters import *
from ...v1.main.views import *
from ..v1.mixins import *
from ..v1.paginators import *
from ..v1.settings import *
API_VERSION = 'v2'
from ...v1.superevents.filters import *
from ...v1.superevents.paginators import *
from ...v1.superevents.permissions import *
from ...v1.superevents.serializers import *
from ...v1.superevents.settings import *
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment