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 django_otp.oath import TOTP | |
from django_otp.util import random_hex | |
from unittest import mock | |
import time | |
class TOTPVerification: | |
def __init__(self): | |
# secret key that will be used to generate a token, |
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 buckets.fields import S3FileField | |
from datetime import datetime, timezone, timedelta | |
from django.conf import settings | |
from django.db import models | |
from django.dispatch import receiver | |
from django.utils.translation import ugettext as _ | |
from django.core.mail import send_mail | |
from django.template.loader import render_to_string | |
import django.contrib.auth.models as auth | |
import django.contrib.auth.base_user as auth_base |
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 AccountRegister(CreateView): | |
model = User | |
form_class = forms.RegisterForm | |
template_name = 'account/signup.html' | |
success_url = reverse_lazy('account:verify_phone') | |
def form_valid(self, form): | |
user = form.save(self.request) | |
if user.email: |
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 sentaku | |
# Domain object class definition | |
class ObjectCollection(sentaku.modelling.ElementMixiin): | |
create = sentaku.ContextualMethod() | |
ENTITY = ObjectEntity | |
class ObjectEntity(sentaku.modelling.Element): |
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
open /etc/default/grub as admin | |
Append value of GRUB_CMDLINE_LINUX with systemd.unified_cgroup_hierarchy=0 | |
sudo grub2-mkconfig > /boot/efi/EFI/fedora/grub.cfg or | |
sudo grub2-mkconfig > /boot/grub2/grub.cfg | |
reboot | |
sudo grubby --update-kernel=ALL --args="systemd.unified_cgroup_hierarchy=0" |
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
commands: | |
- exec: | |
commandLine: npm install | |
component: runtime | |
group: | |
isDefault: true | |
kind: build | |
workingDir: $PROJECT_SOURCE | |
id: install | |
- exec: |