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
#!/usr/bin/python | |
import pprint | |
import inspect | |
from copy import deepcopy | |
class NimbisActionPluginMeta(type): | |
# we use __init__ rather than __new__ here because we want | |
# to modify attributes of the class *after* they have been | |
# created |
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
# use secret from environment or make a random one exactly once | |
SECRET_KEY = os.environ.get( | |
'DJANGO_SECRET', | |
os.environ.update({ | |
'DJANGO_SECRET': ''.join([random.SystemRandom().choice( | |
string.digits + string.letters + string.punctuation) | |
for i in range(50)])})) |
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
#!/usr/bin/env ansible-playbook | |
# Borrowed heavily from: | |
# https://github.com/64BitsPerMinute/ansible-elasticsearch-ec2-example/blob/master/deploy_elasticsearch.yml | |
--- | |
- name: Provision the system modeler grid | |
hosts: localhost | |
gather_facts: False | |
connection: local | |
vars: | |
ec2_access_key: '{{ nimbis_wolfram_aws_access_key }}' |
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
{# place this at templates/pages/menus/dropdown.html to override the mezzanine dropdown menu #} | |
{% load i18n pages_tags %} | |
{% spaceless %} | |
{% if page_branch_in_menu %} | |
{% if branch_level == 0 %} | |
<ul class="nav pull-right"> | |
{% for page in page_branch %} | |
{% if page.in_menu %} | |
{% if page.login_required and request.user.is_authenticated or not page.login_required %} |