def cargar(self): self.config.read(os.path.join(_config.get_data_path(), 'config', 'gestionacademia.conf')) for variable in self.lista_variables_general: setattr(self,variable,self.config.get('general',variable)) for variable in self.lista_variables_tecnicos: setattr(self,variable,self.config.get('tecnicos',variable)) for variable in self.lista_variables_financieros: setattr(self,variable,self.config.get('financieros',variable))
def __init__(self): """Constructor for GestionacademiaView reads a graphical representation of the view from a glade file. """ # Look for the ui file that describes the ui. ui_filename = os.path.join(_config.get_data_path(), 'ui', 'GestionacademiaWindow.ui') if not os.path.exists(ui_filename): ui_filename = None # Initialise the view. View.__init__(self, builder=ui_filename, top='gestionacademia_window') return
def __init__(self, parent=None, stand_alone=True): """Constructor for CursoView reads a graphical representation of the view from a glade file. parent: The name of the window that spawned this one stand_alone: If true, this view is a window unto itself. If not, it is embedded in another window. """ # Look for the ui file that describes the ui. ui = os.path.join(_config.get_data_path(), 'ui', 'CursoDialog.ui') if not os.path.exists(ui): ui = None # Top window/widget check. if stand_alone: top_widget = 'curso_dialog' else: top_widget = 'sw_scroller' View.__init__(self, builder=ui, parent=parent, top=top_widget) return
def __init__(self, parent=None, stand_alone=True): """Constructor for PreferencesView reads a graphical representation of the view from a glade file. parent: The name of the window that spawned this one """ View.__init__(self, parent=parent) # Look for the ui file that describes the ui. ui = os.path.join(_config.get_data_path(), 'ui', 'PreferencesGestionacademiaDialog.ui') # Top window/widget check. if stand_alone: top_widget = 'preferences_gestionacademia_dialog' else: top_widget = 'vbox_dialog' View.__init__(self, builder=ui, parent=parent, top=top_widget) return
from reportlab.lib.styles import getSampleStyleSheet from reportlab.lib.styles import ParagraphStyle from reportlab.lib.pagesizes import A4,A5,landscape from reportlab.lib import colors from reportlab.lib.units import cm,mm from reportlab.pdfbase import pdfmetrics from reportlab.pdfbase.ttfonts import TTFont from reportlab.pdfbase.pdfmetrics import registerFontFamily ##from PIL import Image PAGE_HEIGHT=29.7*cm PAGE_WIDTH=21*cm capitulo = 'Cap %d' % 1 tema = 'Descripcion General del Edificio' ##logo = Image.open('./icons/logo.png') logo = os.path.join(_config.get_data_path(), 'media', 'banner_eide.png') ##logo = 'el logo de 40x40pixels' arquitecto = 'Nombre del arquitecto' empresa = 'nombre de la empresa' proyecto = 'Descripcion del proyecto' situacion = 'poblacion, municipio' referencia = 'referencia interna' l1 = (1*cm, PAGE_HEIGHT-2.3*cm, PAGE_WIDTH-1.5*cm, PAGE_HEIGHT-2.3*cm) l2 = (1*cm, 1.5*cm, PAGE_WIDTH-1.5*cm, 1.5*cm) lineas = [l1,l2] estiloencabezado = ParagraphStyle('', fontName = 'DejaVuBd', fontSize = 10, alignment = 0,
#!/usr/bin/python # -*- coding: utf-8 -*- ### BEGIN LICENSE # This file isls .. in the public domain ### END LICENS import os os.sys.path.append('/home/patataman/Dropbox/Trabajo/gestionacademia') from gestionacademia.utils import _config mypath = _config.get_data_path() import datetime from sqlobject import * from gestionacademia.models.database_model import * def inicializar_cursos(): print "Inicializamos la tabla de cursos con los datos buenos" Curso(nombre="Juniors 1", examen=None,nivel=None,precio=100) Curso(nombre="Juniors 2", examen=None,nivel='A1',precio=100) Curso(nombre="Juniors 3", examen=None,nivel='A1',precio=100) Curso(nombre="Juniors 4", examen=None,nivel='A1',precio=100) Curso(nombre="Begginers 1", examen=None,nivel='A1',precio=100) Curso(nombre="Begginers 1", examen=None,nivel='A1',precio=100) Curso(nombre="Begginers 1", examen=None,nivel='A2',precio=100) Curso(nombre="Begginers 1", examen='KET',nivel='A2',precio=100) Curso(nombre="Elementary Jov.", examen=None,nivel='A1',precio=140) Curso(nombre="Elementary Adu.", examen=None,nivel='A1',precio=140) Curso(nombre="Lower Intermediate Jov.", examen='KET',nivel='A2',precio=140)