Advertisement
Guest User

Untitled

a guest
Oct 17th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. import coreapi
  2.  
  3. class EventCreateView(View):
  4. form_class = EventCreate
  5. template_name = 'BulkRaceManagement/new.html'
  6.  
  7. def get(self, request):
  8. auth = coreapi.auth.BasicAuthentication(username='username', password='password', domain='https://racecheckbe.herokuapp.com/docs/')
  9. client = coreapi.Client(auth=auth)
  10. print("~~~~~~~~~~~~~~~~")
  11. print(client.get('https://racecheckbe.herokuapp.com/api/attributes/genders/'))
  12. print("~~~~~~~~~~~~~~~~")
  13. print(client.get('https://racecheckbe.herokuapp.com/api/attributes/age_ranges/'))
  14. print("~~~~~~~~~~~~~~~~")
  15. print(client.get('https://racecheckbe.herokuapp.com/api/organisations/?page=1'))
  16. print("~~~~~~~~~~~~~~~~")
  17.  
  18. return render(request, self.template_name, {'form': self.form_class(None)})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement