Skip to content

Instantly share code, notes, and snippets.

@robcmills
robcmills / multi-tenancy-migration.py
Last active August 29, 2015 14:18
Mezzanine site tree multi-tenancy data migration
# execfile('/Users/gogamedesign/newsite/website-bravo/misc/09ee79d18f126006216d/multi-tenancy-migration.py')
from gogame_app.models import *
from gogame_gallery.models import *
from mezzanine.blog.models import *
from django.contrib.sites.models import Site
from django.conf import settings
from django.contrib.redirects.models import Redirect
from mezzanine.pages.models import Page
@robcmills
robcmills / gist:d18b5244731047ed5749
Created April 1, 2015 19:59
Go Game Flavors Organizations Migration
from models.models import Flavor, Organization
organizations = Organization.objects(title__ne='Go Game USA')
flavor_ids = ['54e394b30df8257c2019fa19', '53ffbf1c129d7c22a3c98981', '54dd3fd80df8257c2019f9e9', '541fb9b7129d7c0a54f63c21', '549467030df8252dd18c64df']
flavors = Flavor.objects(id__in=flavor_ids)
for org in organizations:
@robcmills
robcmills / forge.gg.getVideo.md
Last active August 29, 2015 14:17
Go Game Custom Forge Camera Module API Specification

GoGame Custom Forge Video Module Specification

V-0.3

Author: rob@thegogame.com

forge.gg.getVideo([options], success, error) iOS

@robcmills
robcmills / gist:cd93175f9d3d5a22eea5
Last active August 29, 2015 14:17
how the Go Game app gets media

user clicks on HTML file input element

<form enctype="multipart/form-data" class='media-upload-form'>
<div class='upload_container'>
  <input type="file" name="file" 
    id="fileUpload{{unbound view.elementId}}"
    accept="{{unbound view.accept}}">
</div>

where view.accept = 'video/*' or 'image/*'