Last active
          March 8, 2019 19:18 
        
      - 
      
- 
        Save craigderington/0820eaba5bd9c97eeb4ef9529ac8b1fd to your computer and use it in GitHub Desktop. 
    DRF by Example URLs Module
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | from django.urls import path | |
| from rest_framework.urlpatterns import format_suffix_patterns | |
| from . import views | |
| urlpatterns = [ | |
| path('', views.LocationList.as_view(), name='location-list'), | |
| path('<int:pk>/', views.LocationDetail.as_view()), | |
| path('geolocate/<str:ip_addr>', views.get_location, name='geolocate') | |
| ] | |
| urlpatterns = format_suffix_patterns(urlpatterns) | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment