Esempio n. 1
0
from django.conf.urls import patterns, url

from activities.views import ActivityList, ActivityDetail


urlpatterns = patterns(
    '',
    url(r'(?P<pk>\d+)/?$', ActivityDetail.as_view(), name='activity-detail'),
    url(r'$', ActivityList.as_view(), name='activity-list')
)
Esempio n. 2
0
 def setUp(self):
     self.factory = APIRequestFactory()
     self.request = self.factory.get("get_activities/", {"refresh": "true"})
     self.request.user = ExtendedUser.objects.create_user(username="******", password="******")
     self.response = ActivityList.as_view()(self.request)
Esempio n. 3
0
from django.urls import path
from activities.views import ActivityList

urlpatterns = [
    path('', ActivityList.as_view(), name='index'),
]