PYTHON SOCIAL AUTH: CUSTOM PIPELINE
Creating a user profile in Python Social Auth in Django
# original by micah carrick | |
from django.contrib.auth.models import User, check_password | |
class EmailAuthBackend(object): | |
""" | |
Email Authentication Backend | |
Allows a user to sign in using an email/password pair rather than | |
a username/password pair. |
// @sklyarov-ivan | |
'a,b,asd;2,c'.match(/[\w+\,]+/); |
index d72589a..b5d5604 100644 (file) | |
--- a/debian/NEWS | |
+++ b/debian/NEWS | |
@@ -157,7 +157,8 @@ debmirror (20060907) unstable; urgency=low | |
combination of arch, suite and section that does not exist locally | |
and is not listed in the Release file for the suite. This | |
obsoletes the previously hardcoded exceptions and should allow to | |
- mirror unknown archives like Ubuntu without problems. | |
+ mirror unknown archives like the Debian derivative from Canonical that | |
+ cannot be named without problems. |
echo 'deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main' | sudo tee -a /etc/apt/sources.list.d/pgdg.list | |
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | |
sudo apt-get update |
<snippet> | |
<content><![CDATA[import pdb; pdb.set_trace()]]></content> | |
<tabTrigger>debug</tabTrigger> | |
<scope>source.python</scope> | |
</snippet> |
mysql> CREATE TABLE products( | |
-> id INT PRIMARY KEY NOT NULL auto_increment, | |
-> name VARCHAR(255) NOT NULL, | |
-> quantity INT NOT NULL | |
-> ); | |
Query OK, 0 rows affected (0.22 sec) | |
mysql> INSERT INTO products(name) VALUES("First product"); | |
Query OK, 1 row affected, 1 warning (0.02 sec) |
#!/bin/bash | |
ffprobe -v quiet -print_format json -show_streams $1 |
MariaDB [(none)]> create database testing; | |
Query OK, 1 row affected (0.00 sec) | |
MariaDB [(none)]> use testing; | |
Database changed | |
MariaDB [testing]> CREATE TABLE products( | |
-> id INT PRIMARY KEY NOT NULL auto_increment, | |
-> name VARCHAR(255) NOT NULL, | |
-> quantity INT NOT NULL | |
-> ); |
testing=> CREATE TABLE products( | |
testing(> id SERIAL PRIMARY KEY NOT NULL, | |
testing(> name VARCHAR(255) NOT NULL, | |
testing(> quantity INT NOT NULL | |
testing(> ); | |
CREATE TABLE | |
testing=> INSERT INTO products(name) VALUES('First product'); | |
ERROR: null value in column "quantity" violates not-null constraint | |
DETAIL: Failing row contains (1, First product, null). |