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
## Private DB access API | |
class Council(object): | |
@property | |
def members(self): | |
return Institution.objects.get(institution_type=Institution.COUNCIL).institutioncharge_set | |
@property | |
def majority_members(self): | |
pass | |
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 Deliberation(Act): | |
""" | |
WRITEME | |
""" | |
INIZIATIVE_CHOICES = Choices( | |
('COUNSELOR', 'counselor', _('Counselor')), | |
('PRESIDENT', 'president', _('President')), | |
('ASSESSOR', 'assessor', _('City Government Member')), | |
('GOVERNMENT', 'government', _('City Government')), | |
('MAYOR', 'mayor', _('Mayor')), |
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 django.http import Http404 | |
from rest_framework.mixins import ListModelMixin | |
from rest_framework.response import Response | |
class ShortListModelMixin(ListModelMixin): | |
""" | |
Extends ListModelMixin, | |
allowing the specification of the list_fields arguments for the .list() method | |
different fields can be shown for list and detail views | |
""" |
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
## Models | |
class Place(models.Model): | |
name = models.CharField(max_length=255, blank=True) | |
slug = models.SlugField(max_length=255, null=True, blank=True) | |
class PlaceAcronym(models.Model): | |
place = models.ForeignKey('Place', related_name="acronyms") | |
acronym = models.CharField(_("acronym"), max_length=128, | |
help_text=_("An acronym for the place, e.g. 'PV'") | |
) |
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
# simple uWSGI script | |
description "uwsgi emperor" | |
start on runlevel [2345] | |
stop on runlevel [06] | |
exec /usr/local/bin/uwsgi --emperor /etc/uwsgi/vassals --uid www-data --gid www-data --daemonize=/var/log/uwsgi/emperor.log |
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
# | |
# According to AWS Docs - http://docs.aws.amazon.com/ses/latest/DeveloperGuide/postfix.html | |
# | |
# Rewrites all sender addresses to a single canonical ses verified address. | |
# | |
# Expects a vars files at ../vars/PostfixSES-vars.yml with the following variables: | |
# - ses_host: email-smtp.us-west-x.amazonaws.com | |
# - ses_port: 587 | |
# - ses_username: ses-smtp-username | |
# - ses_password: ses-smtp-password |
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
Homebrew build logs for homebrew/science/graph-tool on macOS 10.11.6 | |
Build date: 2017-02-28 08:19:11 |
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
# Assume we are in your home directory | |
cd ~/ | |
# Clone the repo from GitLab using the `--mirror` option | |
$ git clone --mirror [email protected]:guglielmo/my-repo.git | |
# Change into newly created repo directory | |
$ cd ~/my-repo.git | |
# Push to GitHub using the `--mirror` option. The `--no-verify` option skips any hooks. |
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
license: gpl-3.0 | |
height: 600 |
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
license: gpl-3.0 | |
height: 600 |
OlderNewer