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
(function () { | |
$(function () { | |
var jwtUI = | |
'<div class="input"><input placeholder="JWT Token" id="input_jwt" name="jwt" type="text" size="20"></div>'; | |
$(jwtUI).insertBefore('#api_selector div.input:last-child'); | |
$("#input_apiKey").hide(); | |
$('#input_jwt').change(addAuthorization); | |
}); | |
function addAuthorization() { | |
var token = $('#input_jwt').val(); |
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
DELETE FROM catalogue_category; | |
INSERT INTO catalogue_category (path, depth, numchild, name, description, slug) values ("000J", 1, 13, "category 182", "", "category-182"); | |
INSERT INTO catalogue_category (path, depth, numchild, name, description, slug) values ("000M", 1, 35, "category 1300", "", "category-1300"); | |
INSERT INTO catalogue_category (path, depth, numchild, name, description, slug) values ("000D", 1, 10, "category 101", "", "category-101"); | |
INSERT INTO catalogue_category (path, depth, numchild, name, description, slug) values ("0006", 1, 1, "category 56", "", "category-56"); | |
INSERT INTO catalogue_category (path, depth, numchild, name, description, slug) values ("000B", 1, 69, "category 96", "", "category-96"); | |
INSERT INTO catalogue_category (path, depth, numchild, name, description, slug) values ("000E", 1, 22, "category 114", "", "category-114"); | |
INSERT INTO catalogue_category (path, depth, numchild, name, description, slug) values ("0008", 1, 1, "category 66", "", "category-66"); | |
INSERT INT |
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
@view_config(route_name='my-route') | |
def my_view(request): | |
# here i want to know if path-1 or path-2 was taken, preferably via a var n matchdict? | |
config.add_route('my-route', '/path-1/view') | |
config.add_route('my-route', '/path-2/view') |
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 datetime | |
import uuid | |
import psycopg2.extras | |
from sqlalchemy import Column, MetaData, Table | |
from sqlalchemy.types import Integer, DateTime, TypeDecorator | |
from sqlalchemy.dialects.postgresql import ARRAY, array | |
from sqlalchemy.dialects.postgresql import UUID | |
from sqlalchemy.sql.expression import cast, literal, select |
NewerOlder