A veces podemos acumular muchas ramas de git en nuestro repositorio local. Se asume el uso de [git flow o similar][git-flow].
Para poder eliminarlas sin eliminarlas en el repositorio remoto podemos usar este comando:
Sacado de aquí: https://stackoverflow.com/a/503435/3377046.
You can put your tests in a tests/
subdirectory of the app (rather than a tests.py
file), and include a tests/models.py
with the test-only models.
Then provide a test-running script ([example][1]) that includes your tests/
"app" in INSTALLED_APPS
. (This doesn't work when running app tests from a real project, which won't have the tests app in INSTALLED_APPS
, but I rarely find it useful to run reusable app tests from a project, and Django 1.6+ doesn't by default.)
(NOTE: The alternative dynamic method described below only works in Django 1.1+ if your test case subclasses TransactionTestCase
- which slows down your tests significantly - and no longer works at all in Django 1.7+. It's left here only for historical interest; don't use it.)
Múltiples snippets sobre flex y sus usos.
import json | |
import os | |
from django.contrib.postgres.fields import JSONField | |
from django.core.exceptions import ValidationError | |
from django.utils.deconstruct import deconstructible | |
from jsonschema import validate, exceptions as jsonschema_exceptions | |
@deconstructible |
Pretendemos obtener la ruta absoluta real del sistema en base a la ubicación actual del fichero en el que estamos trabajando.
En este gist tienes explicado completamente el comando que usaremos a continuación: https://gist.github.com/mrroot5/0a3aff9d758beb44d77814eb74a59e49
# Intro | |
Pretendemos tener la opción de una instalación de múltiples versiones de node usando el mismo programa. | |
Para ello vamos a usar el magnífico NVM. Para mayor compatabilidad expondremos enlaces a documentos oficiales. | |
## Instalación | |
Para el primer paso necesitaremos tener instalado `curl` o `wget` para descargar e instalar el script de instalación. | |
Hay más métodos de instalación pero este es el más simple de todos: |