5 5 ERROR: test_submit_form (mysite.base.tests.Unsubscribe)
6 6 ERROR: test (mysite.profile.tests.EditBio)
7 7 ERROR: test (mysite.profile.tests.EditContactBlurb)
8 8 ERROR: test_blurb_with_irc_info (mysite.profile.tests.EditContactBlurb)
9 9 ERROR: test (mysite.profile.tests.EditHomepage)
10 10 ERROR: test (mysite.profile.tests.EditIrcNick)
11 11 ERROR: test (mysite.profile.tests.EditLocation)
12 12 ERROR: test_settings_page_form (mysite.profile.tests.EditYourName)
13 13 ERROR: test_tag_edit_once (mysite.profile.tests.Info)
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
I'm not quite sure how to use the settings.TEMPLATE_LOADERS in L110: | |
settings.TEMPLATE_LOADERS = ( | |
('django.template.loaders.cached.Loader', ( | |
'django.template.loaders.filesystem.Loader', | |
) | |
), | |
) | |
Inside the test_loaders.py, I do a dir(loader) using pdb. And here are its methods: |
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
Susans-MacBook-Air:tests susantan$ ./runtests.py template_tests | |
Creating test database for alias 'default'... | |
Creating test database for alias 'other'... | |
..............................................................E............................. | |
====================================================================== | |
ERROR: test_missing_template_is_cached (template_tests.test_loaders.CachedLoader) | |
Check that the missing template is cached. | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/Users/susantan/Projects/django/tests/template_tests/test_loaders.py", line 136, in test_missing_template_is_cached |
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
# Cited Source: Raymond Hettinger's tweet on 9/13/2013 at 11:00PM. | |
from datetime import timedelta, date | |
friday_the_13ths = filter(lambda d: d.day==13, (date(2013, 9, 13)+timedelta(days=7)*i for i in range(1000))) | |
>>> friday_the_13ths | |
[datetime.date(2013, 9, 13), datetime.date(2013, 12, 13), datetime.date(2014, 6, 13), | |
datetime.date(2015, 2, 13), datetime.date(2015, 3, 13), datetime.date(2015, 11, 13), | |
datetime.date(2016, 5, 13), datetime.date(2017, 1, 13), datetime.date(2017, 10, 13), | |
datetime.date(2018, 4, 13), datetime.date(2018, 7, 13), datetime.date(2019, 9, 13), |
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
# Problem Statement: | |
# You have mulitple copies (or clones) of upstream repositories in your local drive. | |
# Your local cloned repos need to be updated against the upstream master repos on a regular basis. | |
# Here's one solution that uses the IPython notebook. | |
# Open up your IPython notebook browser in your working directory and then paste the following into a code cell. | |
# Press SHIFT+ENTER to run the code cell. | |
# Create a list of projects located in the working directory. | |
list_of_projects = ["django", "ipython", "oh-mainline"] |
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
<html> | |
<head> | |
<script src="Brython1.4/src/brython.js"></script> | |
<link rel="stylesheet" type="text/css" href='css/pagination.css'> | |
</head> | |
<body onload="brython(2)"> | |
<div class ="preloaded_comment" id="comment1">some sample comment #1 here</div> | |
<div class ="preloaded_comment" id="comment2">some sample comment #2 here</div> | |
<div class ="preloaded_comment" id="comment3">some sample comment #3 here</div> |
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
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:025883229740ec0da175d59088cac88b2347cda445f6eb3bb7b65c99a2e43892" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
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
I was so inspired by https://medium.com/queer-life/do-something-useful-with-those-recruiting-emails-f62d82e13c2d, | |
so here's my template that you can feel free to use, copy and/or edit -- | |
Hello $RECRUITER_NAME of $COMPANY_NAME, | |
Thanks so much for reaching out. Quick questions before we set anything up: | |
1. Are the company's health plans fully trans-inclusive? Are transition surgeries and medical expenses related to transgender transitions 100% covered by the employer’s medical plans? | |
Unless an employer explicitly negotiates otherwise, health insurance companies will refuse to cover any medical treatment related to being transgender. This includes labs, hormone replacement, therapy and psychiatry, surgery, and more. Many plans include language that specifically excludes these treatments from coverage; those that don’t will often exclude them on the grounds that they’re “cosmetic.” |
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
# I use both django web-test AND django's client session to test that a user can be logged in and then logged out. | |
class Login(WebTest): | |
# {{{ | |
fixtures = ['user-paulproteus', 'person-paulproteus'] | |
def test_login(self): | |
user = authenticate(username='paulproteus', password="paulproteus's unbreakable password") | |
self.assert_(user and user.is_active) | |
def test_logout_web(self): |
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
GET v1/hosts | |
{ | |
"hosts": [ | |
{ | |
blah blah blah blah | |
blah blah blah blah | |
"uuid": "00000172-0017-0001-0010-000000000000", | |
"version": "4.3.42", | |
"frameworks": ["openstack", "spark"] | |
}, |
OlderNewer