Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View ankit11421's full-sized avatar
♥️
Focusing

Ankit Chaudhary ankit11421

♥️
Focusing
View GitHub Profile
const express = require("express");
const bodyParser = require("body-parser");
const ejs = require("ejs");
const mongoose = require("mongoose");
const app = express();
app.set("view engine", "ejs");
app.use(bodyParser.urlencoded({extended: true}));
app.use(express.static("public"));
Paste this at the bottom of settings.py file
STATIC_URL = '/static/'
STATICFILES_DIRS = [
os.path.join(BASE_DIR, "static_my_proj"),
]
STATIC_ROOT = os.path.join(os.path.dirname(
<form action="" method='post'>
{% csrf_token %}
<p><label for="id_phone">Phone:</label> <input type="number" name="phone" required id="id_phone"></p>
<span id='msg'></span>
<br>
<p><label for="id_otp">Otp:</label> <input type="number" name="otp" required id="id_otp"></p>
import string
from django.utils.text import slugify
def random_string_generator(size=10, chars=string.ascii_lowercase + string.digits):
return ''.join(random.choice(chars) for _ in range(size))
def unique_slug_generator(instance, new_slug=None):
@ankit11421
ankit11421 / SocialAuth
Created March 1, 2019 17:42
SocialAuth
1. pip install social-auth-app-django
2.
Add the social_django to your INSTALLED_APPS
3.
python manage.py migrate