NOTE: This post now lives (and kept up to date) on my blog: http://hakunin.com/rails3-load-paths
Do nothing. All files in this dir are eager loaded in production and lazy loaded in development by default.
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
(defn uuid [] (str (java.util.UUID/randomUUID))) |
from neo4django.db import connections | |
from neo4django.db.models.script_utils import LazyNode | |
from neo4django.db import models | |
from neo4django.db.models.manager import NodeModelManager | |
from django.utils.translation import ugettext_lazy as _ | |
class Country(models.NodeModel): | |
code = models.StringProperty(verbose_name=_('Country code'), max_length=2, indexed=True) | |
name = models.StringProperty(verbose_name=_('Name')) | |
from lxml import etree | |
# This string will contain the models.py file | |
modelsContents = "from neo4django.db import models\n\n" | |
# Enter the name of the OWL file to parse | |
# The relationships in the file should always start with has... | |
owlFile = "ontology.owl" | |
# Gives the ontology URI. Only needed for documentation purposes |
NOTE: This post now lives (and kept up to date) on my blog: http://hakunin.com/rails3-load-paths
Do nothing. All files in this dir are eager loaded in production and lazy loaded in development by default.
# -*- coding: utf-8 -*- | |
from django.core.management.base import BaseCommand, CommandError | |
from django.db.models.loading import get_model | |
class Command(BaseCommand): | |
help = "Reindex a given model." | |
args = 'app.Model' | |
def handle(self, *args, **options): | |
if not args: |
Around 2006-2007, it was a bit of a fashion to hook lava lamps up to the build server. Normally, the green lava lamp would be on, but if the build failed, it would turn off and the red lava lamp would turn on.
By coincidence, I've actually met, about that time, (probably) the first person to hook up a lava lamp to a build server. It was Alberto Savoia, who'd founded a testing tools company (that did some very interesting things around generative testing that have basically never been noticed). Alberto had noticed that people did not react with any urgency when the build broke. They'd check in broken code and go off to something else, only reacting to the breakage they'd caused when some other programmer pulled the change and had problems.