Example #1
0
from django.conf.urls import url
from push_notifications.api.rest_framework import GCMDeviceAuthorizedViewSet, APNSDeviceAuthorizedViewSet
from rest_framework.urlpatterns import format_suffix_patterns
from users.views import *

urlpatterns = [
    url("^$", MainPageView.as_view()),
    url(r"^api/user/$", UserView.as_view()),
    url(r"^api/user/exchange/$", UserExchangeView.as_view()),
    url(r"^api/user/duration/$", UserSessionView.as_view()),
    url(r"^home/$", HomeView.as_view()),
    url(r"^exchange/$", ExchangeView.as_view()),
    url(r"^contact/$", ContactView.as_view()),
    url(r"^about/$", AboutView.as_view()),
    url(r"^gtm/$", GTMView.as_view()),
    url(r"^agreement/$", AgreementView.as_view()),
    url(r"^device/android/$", GCMDeviceAuthorizedViewSet.as_view({"post": "create"})),
    url(r"^device/ios/$", APNSDeviceAuthorizedViewSet.as_view({"post": "create"})),
]

urlpatterns = format_suffix_patterns(urlpatterns)
Example #2
0
        name='friend_tracking_list'),

    url(r'^userTrackingList/([\w].+)/$',
        views.UserTrackingList.as_view(),
        name='user_tracking_list'),

    url(r'^friendTracking/([\w].+)/([\w].+)/$',
        views.FriendTracking.as_view(),
        name='friend_tracking'),

    url(r'^updateFriendTracking/(?P<lookupField>.+)/$',
        views.UpdateFriendTracking.as_view(),
        name='update_friend_tracking'),
		
    url(r'^device/GCM/?$', 
	GCMDeviceAuthorizedViewSet.as_view({'post': 'create'}), 
	name='create_gcm_device'),

    url(r'^notifications/$',
        views.AddNotifications.as_view(),
        name='add-notification'),

    url(r'^notifications/([\w].+)/$',
        views.NotificationsList.as_view(),
        name='notifications_list'),

    url(r'^notifications_update_delete/(?P<timestamp>.+)/$',
        views.NotificationsUpdateDelete.as_view(),
        name='notifications_update_delete'),

    url(r'^add_event/$',
Example #3
0
from django.conf.urls import include, url
from rest_framework.authtoken.views import obtain_auth_token
from push_notifications.api.rest_framework import GCMDeviceAuthorizedViewSet

from accounts.views import whoami, google_login, facebook_login, farmnet_signup

urlpatterns = [
    url(r'^api-auth/', include('rest_framework.urls',
                               namespace='rest_framework')),
    url(r'whoami/', whoami, name='whoami'),
    url(r'google-login/', google_login, name='google-login'),
    url(r'facebook-login/', facebook_login, name='facebook-login'),
    url(r'farmnet-login/', obtain_auth_token, name='farmnet-login'),
    url(r'farmnet-signup/', farmnet_signup, name='farmnet-signup'),
    url(r'add-gcm-device/', GCMDeviceAuthorizedViewSet.as_view(
        {'post': 'create'}), name='create-gcm-device')
]
Example #4
0
from push_notifications.api.rest_framework import GCMDeviceAuthorizedViewSet


# Wire up our API using automatic URL routing.
# Additionally, we include login URLs for the browsable API.
urlpatterns = [

	url(r'^admin/', admin.site.urls),
	url(r'^o/', include('oauth2_provider.urls', namespace='oauth2_provider')),
	url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
	url(r'^events/$', EventList.as_view(), name='event-list'),
	url(r'^create_event/$', EventCreate.as_view(), name='event-create'),
	url(r'^update_participant/$',EventParticipantUpdate.as_view(), name='eventparticipant-update'),
	url(r'^events/(?P<pk>[0-9]+)/$', EventDetail.as_view(), name='event-detail'),
	url(r'^users/$', UserViewSet.as_view({'get': 'list'}), name='myuser-list'),
	url(r'^users/(?P<pk>[0-9]+)/$', UserDetail.as_view(), name='myuser-detail'),
	# url(r'^api/hello', ApiEndpoint.as_view()),  # and also a resource server!
	url(r'^sign_up/$', SignUp.as_view(), name="sign_up"),
	url(r'^upload/(?P<filename>[^/]+)/(?P<user_pk>[0-9]+)/$', FileUploadView.as_view()), # support for dealing with uploading profile_pictures
	url(r'^u_pk/(?P<pk>[0-9]+)/$', GetUserByPk.as_view(), name='getuserbypk-detail'),
	url(r'^u/(?P<email>[\w.%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4})', GetUserByMail.as_view(), name="getuserbymail-detail"),
	url(r'^device/gcm/?$', GCMDeviceAuthorizedViewSet.as_view({'post': 'create'}), name='create_apns_device'),
]


#urlpatterns += router.urls
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

"""url(r'^find_close_events/(?P<email_of_x>[\w.%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4})/(?P<current_latitude>-?\d{2,3}.\d{5})/(?P<current_longitiude>-?\d{2,3}.\d{5})/$', v.find_close_events, name='event-list-local'),"""