This file contains hidden or 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
| latitude = forms.CharField(widget=GoogleMapsWidget(attrs={'map_width': 640, 'map_height': 480, 'longitude_id': 'id_longitude'}), | |
| error_messages={'required': 'Please select a location on the map.'}, | |
| label='Location' | |
| ) | |
| longitude = forms.CharField(widget=forms.HiddenInput()) |
This file contains hidden or 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 import forms | |
| from django.conf import settings | |
| from django.utils.safestring import mark_safe | |
| class GoogleMapsWidget(forms.HiddenInput): | |
| # Media to be includes with the widget | |
| class Media: | |
| js = ( |
This file contains hidden or 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
| [{"phonenumber": "(09) 7533 100", "name": "3. linja", "address": "Kolmas linja 6", "latitude": 60.1817299628, "tags": ["olutravintola"], "homepage": "", "longitude": 24.9509723639, "description": "Minikokoinen kivijalkapubi 3:nnella linjalla, jota Fredikin kulki takaisin. Baarissa kaksi televisiota. Halpa tuoppi."}, {"phonenumber": "(09) 343 2814", "name": "4 Vuodenaikaa", "address": "Rusthollarintie 2", "latitude": 60.2122766079, "tags": [""], "homepage": "", "longitude": 25.0960335589, "description": ""}, {"phonenumber": "0400 211 921", "name": "A21", "address": "Annankatu 21", "latitude": 60.1662143231, "tags": ["cocktail", "drinkkej\u00e4", "drinkkibaari", "juhlapaikka", "kokoustila"], "homepage": "http://www.a21.fi/", "longitude": 24.9378044239, "description": "Cocktail Lounge A21 keskittyy hyviin drinkkeihin eli ns. \"Fine Drinkingiin\". Cocktail-lista on jaettu nelj\u00e4\u00e4n kategoriaan, joiden kautta cocktailien laaja kirjo aukeaa maallikollekin. Tarjolla on makuja suomalaisesta luonnosta, kauden |
This file contains hidden or 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.template import Library | |
| from django.core.serializers import serialize | |
| from django.core.serializers.json import DjangoJSONEncoder | |
| from django.utils import simplejson | |
| from django.utils.safestring import mark_safe | |
| register = Library() | |
| @register.filter |
This file contains hidden or 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 import template | |
| register = template.Library() | |
| class GridViewNode(template.Node): | |
| def __init__(self, item_template_name, objects_list): | |
| self.item_template_name = item_template_name | |
| self.objects_list = template.Variable(objects_list) | |
| self.grid_template = template.loader.get_template('common/grid/grid-view.html') |
This file contains hidden or 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
| # Colors | |
| declare -A Colors | |
| Colors[black]="\[\033[0;30m\]" | |
| Colors[red]="\[\033[0;31m\]" | |
| Colors[green]="\[\033[0;32m\]" | |
| Colors[yellow]="\[\033[0;33m\]" | |
| Colors[blue]="\[\033[0;34m\]" | |
| Colors[magenta]="\[\033[0;35m\]" | |
| Colors[cyan]="\[\033[0;36m\]" | |
| Colors[white]="\[\033[0;37m\]" |
This file contains hidden or 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
| # Colors | |
| declare -A Colors | |
| Colors[black]="\[\033[0;30m\]" | |
| Colors[red]="\[\033[0;31m\]" | |
| Colors[green]="\[\033[0;32m\]" | |
| Colors[yellow]="\[\033[0;33m\]" | |
| Colors[blue]="\[\033[0;34m\]" | |
| Colors[magenta]="\[\033[0;35m\]" | |
| Colors[cyan]="\[\033[0;36m\]" | |
| Colors[white]="\[\033[0;37m\]" |
This file contains hidden or 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
| #!/bin/bash | |
| # Paths | |
| DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
| VIRTUALENV_DIR="${DIR}/venv" | |
| APPLICATION_DIR="${DIR}/Source/bender" | |
| REQUIREMENTS_DIR="${APPLICATION_DIR}/requirements" | |
| # Text formatting variables | |
| UNDERLINE=$(tput sgr 0 1) |
This file contains hidden or 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
| # | |
| # Mirras Runescape IRC Bot | |
| # Author: Clooth <zenverse@gmail.com> | |
| # Feature: InviteJoiner | |
| # Somewhat fun way to allow the bot to join channels on invite | |
| # | |
| class InviteJoiner | |
| include Cinch::Plugin | |
| include Authentication |
This file contains hidden or 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
| # | |
| # Mirras Runescape IRC Bot | |
| # Author: Clooth <zenverse@gmail.com> | |
| # Feature: InviteJoiner | |
| # Somewhat fun way to allow the bot to join channels on invite | |
| # | |
| class InviteJoiner | |
| include Cinch::Plugin | |
| include Authentication |