Skip to content

Instantly share code, notes, and snippets.

View Chukslord1's full-sized avatar
🏠
Working from home

Chukslord Chukslord1

🏠
Working from home
View GitHub Profile
@Chukslord1
Chukslord1 / style.css
Created February 6, 2021 15:28
The css file for the django music player
*:focus{
outline: none;
}
html {
background: #f2f2f2;
}
body {
margin: 0;
font-family: "Raleway",sans-serif;
}
@Chukslord1
Chukslord1 / create_api_key.md
Created April 5, 2021 21:14
create_api_key

For your python app to interact with fauna, you need to create an API key for the database. To do this, go to the security tab on the left side of your screen.

Click on New Key to generate a secret key. To create the key, you will need to provide a name for your key and save it. Your secret key will now be displayed to you, as seen in the image below. Copy and paste it somewhere you can easily retrieve it.

@Chukslord1
Chukslord1 / index.html
Created July 31, 2021 13:46
Agora Video Application
{% load static %}
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Video Call</title>
<link rel="stylesheet" href="{% static 'index.css' %}">
</head>
<body>
@Chukslord1
Chukslord1 / schedule.html
Created July 31, 2021 13:45
Agora Video Application
{% load static %}
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Schedule</title>
<link rel="stylesheet" href="{% static 'index.css' %}">
</head>
<body>
@Chukslord1
Chukslord1 / success.html
Created July 31, 2021 13:44
Agora Video Application
{% load static %}
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Success</title>
<link rel="stylesheet" href="{% static 'index.css' %}">
</head>
<body>
@Chukslord1
Chukslord1 / step1.py
Created July 31, 2021 13:43
Agora Video Application
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'App',
'agora',
]
@Chukslord1
Chukslord1 / step2.py
Created July 31, 2021 13:42
Agora Video Application
from agora.views import Agora
@Chukslord1
Chukslord1 / step3.py
Created July 31, 2021 13:41
Agora Video Application
urlpatterns = [
path('agora/',Agora.as_view(
app_id=app_id,
channel=channel)),
]
@Chukslord1
Chukslord1 / app-urls.py
Created July 31, 2021 13:40
Agora Video Application
from django.conf import settings
from django.conf.urls.static import static
from django.urls import path, include
from django.conf.urls.static import static
from . import views
app_name = "APP"
urlpatterns = [
@Chukslord1
Chukslord1 / index.py
Created July 31, 2021 13:38
Agora Video Application
def index(request):
app_id="replace_with_app_id"
if request.method=="POST":
channel=request.POST.get("channel")
new=request.POST.get("new")
if new:
dir(secrets)
channel=secrets.token_urlsafe()
url="agora/?channel="+channel
save_channel=Channel.objects.create(channel=channel,app_id=app_id)