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 fabric.api import * | |
from fabric.context_managers import * | |
from fabric.contrib.files import * | |
import fabtools.require.git | |
import fabtools | |
def install_packages(): | |
packages = ['build-essential','git-core','python-dev'] | |
with settings(user='root', key_filename='./root-deploy.key'): |
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
display_meeting_instructions = False | |
if user_can_edit: | |
display_meeting_instructions = True | |
if request.user.is_authenticated() and Ticket.objects.filter(event=event, user=request.user).exists(): | |
display_meeting_instructions = True | |
{% if display_meeting_instructions and event.meeting_instructions %} | |
{{ event.meeting_instructions }} | |
{% endif %} |
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
<canvas class="event-image-canvas" width="150" height="140" data-bind="drawCanvas: showImage"></canvas> |
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
# Image inherits from imagekit.models.ImageModel | |
class Image(ImageModel): | |
def retrieve_upload_path(image, filename): | |
fname, dot, extension = filename.rpartition('.') | |
return "images/%s.%s" % ( image.uuid, extension) | |
name = models.CharField(max_length=100, blank=True) | |
image = models.ImageField(upload_to=retrieve_upload_path) | |
num_views = models.PositiveIntegerField(editable=False, default=0) |
NewerOlder