Skip to content

Instantly share code, notes, and snippets.

View evildmp's full-sized avatar

Daniele Procida evildmp

  • Canonical
  • Cardiff, Wales
View GitHub Profile
Rules for using technical words in documentation
------------------------------------------------
There should be one consistent way of rendering any technical word. Please follow these rules:
In general use, simply use the word as if it were any ordinary word, with no capitalisation or
highlighting: "Your placeholder can now be used."
At the start of sentences or titles, capitalise in the usual way: "Placeholder management guide".
The 2015 edition of DjangoCon Europe, the biggest event in the international Django community’s calendar, will be held in Cardiff (Wales) 2nd-7th June.
<http://2015.djangocon.eu>
We’re putting a huge emphasis on diversity and accessibility at this event, to encourage more women and members of other minorities in the field to attend and submit proposals for talks.
<http://2015.djangocon.eu/welcome/diversity/>
<http://2015.djangocon.eu/welcome/accessibility/>
We’ve also taken the unusual step of opening registration only to members of under-represented groups for the first month: <http://2015.djangocon.eu/news/registration-opens/>.
py26 installdeps: -r/Users/divio/Arkestra/Arkestra/REQUIREMENTS.txt, -e.[test]
/Users/divio/Arkestra/Arkestra$ /Users/divio/Arkestra/Arkestra/.tox/py26/bin/pip install -r/Users/divio/Arkestra/Arkestra/REQUIREMENTS.txt -e.[test] >/Users/divio/Arkestra/Arkestra/.tox/py26/log/py26-1.log
ERROR: invocation failed (exit code 1), logfile: /Users/divio/Arkestra/Arkestra/.tox/py26/log/py26-1.log
ERROR: actionid=py26
msg=getenv
cmdargs=[local('/Users/divio/Arkestra/Arkestra/.tox/py26/bin/pip'), 'install', '-r/Users/divio/Arkestra/Arkestra/REQUIREMENTS.txt', '-e.[test]']
env={'LESS': '-R', 'LC_CTYPE': 'en_GB.UTF-8', 'TERM_PROGRAM_VERSION': '343.7', 'TMPDIR': '/var/folders/0s/8b2x6bm945zfk9ft69rmt3dh0000gn/T/', 'DOCKER_HOST': 'tcp://192.168.59.103:2376', 'LOGNAME': 'divio', 'USER': 'divio', 'PATH': '/Users/divio/Arkestra/Arkestra/.tox/py26/bin:/Users/divio/Arkestra/Arkestra/.env/bin:/Users/divio/bin:/Users/divio/.local/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sb

Subject: Your DjangoCon Workshop proposal

Hello ,

Firstly, I would like to apologise for how long we took to get back to you. We received so many workshop proposals that the scheduling took longer than we expected

We'd love to run your workshop at the conference, and we have been able to give you a slot for it.

Can you send us a black and white photograph for the website please?

f = open(...)
try:
json.loads(f.read())
except ValueError:
print "Invalid JSON"
raise
finally:
f.close()
About the event
PyCon Namibia is an initiative of the Namibian Python community.
The event aims to bring together 180 attendees from Namibia and around the world, including professional software developers, scientists, academics and students.
Location and dates
PyCon Namibia will be hosted at the main Windhoek campus of the University of Namibia, from the 1st to the 5th February.
Supporters
The event is supported by:
@evildmp
evildmp / convert_to_placeholders.html
Created January 13, 2011 15:39
Convert to Placeholders is a routine that converts text fields in other applications to Django CMS placeholders.
<h3>Summary</h3>
{% if not execute %}
<p>This is a <strong>dry run</strong>. Nothing has been changed.</p>
<p>Please check the results. If you are satisfied, <a href="/convert_to_placeholders/True/">perform the actions listed below</a>, or <a href="/convert_to_placeholders/">do another dry run</a>.</p>
{% else %}
<p><a href="/convert_to_placeholders/">Perform a dry run instead</a>. It's probably too late though.</p>
{% endif %}
<ul>
@evildmp
evildmp / inserts.py
Created July 2, 2011 17:59
Inserts for Django CMS - freestanding placeholders for templating
The easiest thing is to explain how you use them:
1. define an insertion point in your template(s) using
{% insert "my_insertion_point" %}
The {% insert %} templatetag will then get_or_create() the appropriate
Insert in the database
2. the user visits the Insert in the admin, and adds plug-based
@evildmp
evildmp / gist:1328038
Created October 31, 2011 17:14
Attempt to understand the menu system
=========================
How the menu system works
=========================
Basic concepts
==============
Registration
------------
def test_login_required_on_descendants(self):
# checks that the descendants of a page requiring authorisation also require it
parent_page = create_page("page", "nav_playground.html", "en", published=True,
login_required=True)
create_page("childpage", "nav_playground.html", "en", parent=parent_page,
published=True, login_required=False)
request = self.get_request('/')
response = details(request, '')
self.assertEqual(response.status_code, 302)
self.assertEqual(response['Location'], '%s?next=/en/' % settings.LOGIN_URL)