Skip to content

Instantly share code, notes, and snippets.

View psychok7's full-sized avatar

Nuno Khan psychok7

View GitHub Profile
@psychok7
psychok7 / gist:36d7e0b78abcb95a9741
Created March 2, 2015 21:26
Django Rest Framework + Django Hvad Usage Example
class MissionSerializer(TranslatableModelSerializer):
mission = serializers.CharField(source='mission')
class Meta:
model = Mission
class MissionViewSet(viewsets.ModelViewSet):
queryset = Mission.objects.language().all()
serializer_class = MissionSerializer
authentication_classes = (NoAuthentication,)
@psychok7
psychok7 / docker_commands.sh
Last active May 13, 2018 20:51
Docker commands
Source: https://vimeo.com/133154447
Source: https://realpython.com/blog/python/django-development-with-docker-compose-and-machine/
# if you run into problems when creating try docker-machine regenerate-certs dev
docker-machine create --driver virtualbox dev
# run commands in your created VM
eval "$(docker-machine env dev)"
# List available machines and check their Ip's
docker-machine ls