Usage:
sqlite3 <sqlite3_filename> .dump | sqlite3-to-mysql.py | mysql <params>
or
sqlite3 <sqlite3_filename> .sch | sqlite3-to-mysql.py | mysql <params>
import random | |
consonants = 'bcdfghjlmnpqrstvxz' | |
vowels = 'aeiou' | |
def new_word(syllables=None): | |
if syllables is None: | |
syllables = random.randint(2, 5) | |
result = '' | |
for i in range(syllables): |
Usage:
sqlite3 <sqlite3_filename> .dump | sqlite3-to-mysql.py | mysql <params>
or
sqlite3 <sqlite3_filename> .sch | sqlite3-to-mysql.py | mysql <params>
# coding: utf-8 | |
__author__ = "Augusto Men" | |
__version__ = "$Revision: 0.1 $" | |
__date__ = "$Date: 2014/09/29 $" | |
DESCRIPTION = """Builds a tree of template files based on inheritance.""" | |
import os | |
import re |
from django.template import loader, loader_tags | |
def get_template_block(template_name, block_name): | |
"""Searchs a returns a single block inside a template. | |
Useful for ajax reloading inside a template. | |
- template_name can be a filename or a list of filenames. | |
- block_name is the name of the block to look for: | |
{% block block_name %} | |
This function returns a BlockNode instance, which can be rendered to |
import operator | |
from django.db.models import Q | |
from selectable.base import LookupBase, ModelLookup | |
# if term is 'foo - bar', the middle '-' is ignored | |
SEARCH_IGNORED = (',', '.', '-', '/', ';', ':', '=', '\\',) | |
def split_terms(get_query): | |
""" This decorator breaks a single string received in the request by a | |
list of strings. |