from django.conf.urls import url, include
from django.views.generic import TemplateView

from rest_framework import routers

from .views import EventListView, EventViewSet, EventCreateView

router = routers.DefaultRouter()
router.register(r'events', EventViewSet)

urlpatterns = [
    url(r'^$', EventListView.as_view(), name='timeline'),

    url(r'^add/$', EventCreateView.as_view(), name='event_create'),

    url(r'^api/', include(router.urls)),
]