This file contains hidden or 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 datetime import date | |
| from django.contrib.auth.mixins import LoginRequiredMixin | |
| from django.db.models import Q | |
| from django.http import JsonResponse | |
| from django.shortcuts import render | |
| from django.views.generic import View | |
| from .models import ( | |
| Orders, |
This file contains hidden or 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 asyncio | |
| import asyncpg | |
| QUERY_CREATE_TABLE = """ | |
| CREATE TABLE IF NOT EXISTS some_test_table ( | |
| first integer, | |
| second integer, | |
| third integer | |
| ) | |
| """ |
(from Understanding Nginx Server and Location Block Selection Algorithms - https://goo.gl/YyzshP)
server {
We need to create a virtual env for our app to run in: More Here Run this command in whatever folder you want to create your venv folder
python -m venv ./venv
This file contains hidden or 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 mysql.connector | |
| from mysql.connector import errorcode | |
| config = { | |
| 'user': 'root', | |
| 'password': '', | |
| 'host': 'localhost', | |
| 'database': 'acme' | |
| } |
