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 / 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)
@Chukslord1
Chukslord1 / schedule.py
Created July 31, 2021 13:37
Agora Video Application- The Shedule View
def schedule(request):
context={}
try:
if request.method =="POST":
channel = request.POST.get("channel_name")
meeting_title = request.POST.get("meeting_title")
meeting_subject = request.POST.get("meeting_subject")
start_time = request.POST.get("start_time")
end_time = request.POST.get("end_time")
date = request.POST.get("date")
@Chukslord1
Chukslord1 / views.py
Created July 31, 2021 13:35
Agora Video Application -The success view
def success(request):
return render(request,"app1/success.html")