from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.shortcuts import render

from tastypie.api import Api
from events import resources as eventResources

admin.autodiscover()


def index(request):
    return render(request, 'base-ang.html')

v1_api = Api(api_name='v1')
v1_api.register(eventResources.EventResource())


urlpatterns = patterns(
    '',
    url(r'^admin/', include(admin.site.urls)),
    url(r'^api/', include(v1_api.urls)),
    url(r'', include('social_auth.urls')),
    url(r'^$', index),
)
