You are the bread and the knife, The crystal goblet and the wine...
—Jacques Crickillon
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>Title of the document</title> | |
</head> | |
<body> | |
<table> | |
<thead> | |
<tr> |
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
def test_tenant_create(self): | |
kwargs = {'id': TEST_TENANT_ID, | |
'description': 'aDescription', | |
"enabled": True} | |
tenant = keystoneclient_tenants.Tenant(self.request, kwargs) | |
keystoneclient = self.stub_keystoneclient() | |
keystoneclient.tenants = self.mox.CreateMockAnything() | |
keystoneclient.tenants.create(*kwargs.values()).AndReturn(tenant) | |
self.mox.ReplayAll() |
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 DeleteGroup(tables.Action): | |
name = "delete" | |
verbose_name = _("Delete") | |
verbose_name_plural = _("Delete Security Groups") | |
classes = ('danger',) | |
def allowed(self, request, security_group=None): | |
if not security_group: | |
return True | |
return security_group.name != 'default' |
This is an opinionated step-by-step guide for how to not screw up working with Gerrit as a code review tool.
This presumes a setup where you're working on a forked copy of the repository and have created an "upstream" remote repository which points to the original.
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
from horizon import api | |
from horizon.dashboards.nova.keypairs import forms as keypair_forms | |
from nebula_dashboard.utils import tables | |
def DeleteKeyPairs(tables.TableAction): | |
name = "delete" | |
def handle(self, data_table, request, object_ids): |
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
# Copyright 2011 Gabriel Hurley <[email protected]> | |
# | |
# Licensed under the OSI-approved Fair License: | |
# | |
# Usage of this work is permitted provided that this | |
# instrument is retained with the work, so that any | |
# entity that uses the work is notified of this instrument. | |
# | |
# DISCLAIMER: THIS WORK IS WITHOUT WARRANTY. |
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
""" | |
Backports the ``register.assignment_tag`` functionality from Django 1.4 to | |
Django 1.3. | |
This code is almost entirely reproduced from | |
https://code.djangoproject.com/browser/django/trunk/django/template/base.py | |
and is the work of Django's authors: | |
https://code.djangoproject.com/browser/django/trunk/AUTHORS | |
It is licensed under Django's BSD license, available here: |
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
<div id='new_comment' class='fade modal'> | |
<form class='form-stacked' action="{% comment_form_target %}" method="POST">{% csrf_token %} | |
<div class='modal-header'> | |
<a href="#" class="close">x</a> | |
<h3>Discuss Activity</h3> | |
</div> | |
<div class='modal-body'> | |
<p>Have a question? Need more information? Add a new comment to the discussion using the form below:</p> | |
{{ comment_form.as_custom }} | |
<input type='hidden' name='name' value='{{ profile }}'/> |