Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import coreapi
- class EventCreateView(View):
- form_class = EventCreate
- template_name = 'BulkRaceManagement/new.html'
- def get(self, request):
- auth = coreapi.auth.BasicAuthentication(username='username', password='password', domain='https://racecheckbe.herokuapp.com/docs/')
- client = coreapi.Client(auth=auth)
- print("~~~~~~~~~~~~~~~~")
- print(client.get('https://racecheckbe.herokuapp.com/api/attributes/genders/'))
- print("~~~~~~~~~~~~~~~~")
- print(client.get('https://racecheckbe.herokuapp.com/api/attributes/age_ranges/'))
- print("~~~~~~~~~~~~~~~~")
- print(client.get('https://racecheckbe.herokuapp.com/api/organisations/?page=1'))
- print("~~~~~~~~~~~~~~~~")
- return render(request, self.template_name, {'form': self.form_class(None)})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement