-
Global Job Opportunities
- Technology transcends borders, offering job opportunities worldwide.
- Remote positions allow you to work for international companies without relocating.
-
Flexible Schedules/Remote Work
- Many tech roles offer the flexibility to work from anywhere.
- Create a schedule that suits your lifestyle and personal needs.
This file contains 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
import hmac | |
import hashlib | |
import json | |
def makeHash(): | |
secret = "zzdfQr_HSb41O-chk9MEDDeLr_snDO3EiEZ6i5IEwZkgEwdF0W3VTtIHIQsEx-TQe1TZHesmcRGnS5Ss9MyCDw" | |
payload = json.dumps( | |
{ | |
"phone_number": "254787876541", |
This file contains 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
# messages | |
MESSAGE_TAGS = { | |
messages.ERROR: 'danger' | |
} |
This file contains 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
{% if messages%} {% for message in messages%} | |
<div class="alert alert-{{message.tags}}">{{message}}</div> | |
{%endfor%} {% endif %} | |
This file contains 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
<html> | |
<head> | |
<title>developers</title> | |
<link | |
rel="stylesheet" | |
href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" | |
/> | |
</head> |
This file contains 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
SWAGGER_SETTINGS = { | |
'USE_SESSION_AUTH': True, | |
'REFETCH_SCHEMA_ON_LOGOUT': True, | |
'LOGIN_URL': '/', | |
'LOGOUT_URL': '/logout', | |
'SECURITY_DEFINITIONS': { | |
'Bearer': { | |
'type': 'apiKey', | |
'name': 'Authorization', | |
'in': 'header' |
This file contains 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
path('', WelcomeView.as_view(), name='welcome'), | |
path('logout/', LogoutView.as_view(), name='logout'), | |
path('swagger/api.json', schema_view.without_ui(cache_timeout=0), name='schema-json'), | |
path('swagger', schema_view.with_ui('swagger', cache_timeout=0), name='api-documentation'), | |
path('redoc', schema_view.with_ui('redoc', cache_timeout=0), name='schema-redoc'), |
This file contains 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 rest_framework import permissions | |
from drf_yasg.views import get_schema_view | |
from drf_yasg import openapi | |
from drf_yasg.generators import OpenAPISchemaGenerator | |
from rest_framework.authentication import SessionAuthentication | |
class CustomOpenAPISchemaGenerator(OpenAPISchemaGenerator): |
This file contains 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
class LogoutView(View): | |
def get(self, request): | |
logout(request) | |
return redirect('welcome') | |
class WelcomeView(View): | |
def get(self, request): | |
if request.user.is_authenticated: | |
return redirect('api-documentation') |
~<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
NewerOlder