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
# -*- coding:UTF-8 -*- | |
from ttk import * | |
from Tkinter import * | |
import tkMessageBox | |
import sqlite3 | |
import ttk | |
import os | |
raiz=Tk() | |
def dic_bd(bd, tabela): |
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
# // Init personal configs | |
# adding alias for decreases path virtualenv and exit the project | |
alias er='source .venv/bin/activate; PS1="(`basename \"$VIRTUAL_ENV\"`):/\W$ "' | |
alias deac='deactivate' | |
# Start virtualenvs | |
function Envs(){ | |
# used to create virtualenvs | |
alias wait_env='echo wait creating the env... && sleep 2 && clear' | |
alias done_env='echo done! && sleep 2 && clear' |
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
## utils.py | |
from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator | |
def get_paginator(qs, page_size, page, count, paginated_type, **kwargs): | |
""" | |
Method to paginate with some basics parameters in the query. | |
@page: get current page | |
@pages: show total of pages | |
@count: show the total of items in the query | |
@page_size: the page size param |