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
python -c "import django; print(django.__path__)" |
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
class BuscaPaciente(ListView): | |
model = Paciente, Cita | |
template_name = 'paciente/paciente_front.html' | |
def get_queryset(self): | |
query = self.request.GET.get('busca') | |
if query is not None: | |
object_list = Paciente.objects.filter(Q(curp__icontains=query)) | |
# Lo que necesito en esa linea es que apartir del id que me filtre los objetos del segundo modelo que tiene mi relacion foranea por eso utilize 'select_related' | |
pac = Cita.objects.select_related('paciente').filter(paciente_id=object_list.id).all() |
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
Installing an official release manually | |
1. Download the latest release | |
2. Untar the downloaded file (e.g. tar xzvf Django-X.Y.tar.gz, where X.Y is the version number of the latest release). | |
If you’re using Windows, you can download the command-line tool bsdtar to do this, or you can use a GUI-based tool such as 7-zip. | |
3. Change into the directory created in step 2 (e.g. cd Django-X.Y). | |
4. Start a command shell with administrator privileges and run the command 'python setup.py install' | |
This will install Django in your Python installation’s site-packages directory. |
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
1- para que marcar: | |
basta con ponerlo en la tabla PERSONAL | |
2- para que pueda tomar asistencia a sus alumnos | |
aidngar su codigo de personal en la tabla INSTRUCTOR | |
colocar su cod de carreras en el campo idcertificacion | |
para garaycochea idGA/idSA | |
Y EN LA TABLA usuario | |
luego agregarlo a la tabla USUARIOA |
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
body { | |
background-color: #e6e6e6; | |
color :#444; | |
font-family: "Open Sans","Source Sans Pro","Helvetica Neue",Helvetica,sans-serif; | |
margin : 5px 8%; | |
} | |
a { | |
color: #32f; | |
text-decoration:none; | |
font-style: italic; |
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
el mejor modo creo que es | |
# primero | |
buscar en el archivo de conf de apache (q puede ser C:/ > MAMP > conf > apache > httpd.conf) | |
la linea que originalmente dice: | |
~~~ | |
DocumentRoot "{$path}/www" | |
~~~ | |
cambiarla para la nueva ruta |
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
https://stackoverflow.com/questions/43991306/angular-4-5-6-global-variables/43991457 |
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
/* aproximadamente es en a linea 26 */ | |
/* | |
cod original: | |
$page_meta[ 'sidebar' ] = 'smt_default_sidebar'; | |
$page_meta[ 'sidebar_position' ] = smt_getOption( 'layout', 'pagelayout' );*/ | |
/* la correcion: */ |
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
1.- primero identificar que el archivo que contiene el codigo molestoso es del tema en: js/smthemes.js | |
2.- todo el contenido de archivo se puede desencriptar en http://deobfuscatejavascript.com/ | |
3.- eso aunque parece que ya podemos corregirlo y usarlo.. no funciona, hay algunas funcoines de la pagina que desaparece si simplemente lo usamos así | |
sin embargo nos da una idea de como se puede evitar que cumpla su cometido. | |
4.- asi que mejor NO lo des ofuscamos, solo en algu servico web gratuito le damos orden (beauty it) x ejemplo en | |
https://www.danstools.com/javascript-beautify/ | |
5.- luego así como queda lo pegamos y reemeplzamos con el resultado todo el contenido del archivo js/smthemes.js | |
6.- luego con CTRL+F buscamos **la segunda vez** (la primera sería cuando declara esa variable) que aparece la palabra ```embeded``` y la reemplazamos por ```true``` | |
7.- y volvemos a subir el nuevo archivo a js/smthemes.js | |
aunque el intellije me dice que el archvio perdera los cambios al ser regenerado, p |
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
# CSS | |
## Respecto la sintaxis | |
- Usar tabs suaves, con solo dos espacios | |
- Cuando se indiquen grupos de selectores, colocar uno por línea | |
~~~ css | |
/* Good CSS */ | |
.selector, | |
.selector-secondary, | |
.selector[type="text"] { |