コード例 #1
0
    def setUp(self):
        super(UpdateTimingsEndpointTests, self).setUp()

        self.view = TimingsRetrieveUpdateDestroyEndpoint.as_view()

        self.timing = mommy.make('timings.Timing', user=self.user)

        self.params = {'time': 5014, 'distance': 10500, 'date': '2014-09-21'}
コード例 #2
0
    def setUp(self):
        super(UpdateTimingsEndpointTests, self).setUp()

        self.view = TimingsRetrieveUpdateDestroyEndpoint.as_view()

        self.timing = mommy.make('timings.Timing', user=self.user)

        self.params = {
            'time': 5014,
            'distance': 10500,
            'date': '2014-09-21'
        }
コード例 #3
0
    def setUp(self):
        super(DestroyTimingsEndpointTests, self).setUp()

        self.view = TimingsRetrieveUpdateDestroyEndpoint.as_view()

        self.timing = mommy.make('timings.Timing', user=self.user)
コード例 #4
0
    def setUp(self):
        super(DestroyTimingsEndpointTests, self).setUp()

        self.view = TimingsRetrieveUpdateDestroyEndpoint.as_view()

        self.timing = mommy.make('timings.Timing', user=self.user)
コード例 #5
0
# coding: utf-8

from django.conf.urls import patterns, include, url

from timings.endpoints import (
    TimingsListCreateEndpoint, TimingsRetrieveUpdateDestroyEndpoint)


urlpatterns = patterns('',
    url(r'^timings/$', TimingsListCreateEndpoint.as_view(), name='timings-list-create'),
    url(r'^timings/(?P<pk>\d+)/$', TimingsRetrieveUpdateDestroyEndpoint.as_view(), name='timings-retrive-update-destroy'),
)
コード例 #6
0
# coding: utf-8

from django.conf.urls import patterns, include, url

from timings.endpoints import (TimingsListCreateEndpoint,
                               TimingsRetrieveUpdateDestroyEndpoint)

urlpatterns = patterns(
    '',
    url(r'^timings/$',
        TimingsListCreateEndpoint.as_view(),
        name='timings-list-create'),
    url(r'^timings/(?P<pk>\d+)/$',
        TimingsRetrieveUpdateDestroyEndpoint.as_view(),
        name='timings-retrive-update-destroy'),
)