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
#!/usr/bin/env bash | |
docker volume rm $(docker volume ls -qf dangling=true) | |
docker rmi $(docker images --filter "dangling=true" -q --no-trunc) | |
docker rmi $(docker images | grep "none" | awk '/ / { print $3 }') | |
docker rm $(docker ps -qa --no-trunc --filter "status=exited") |
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 rest_framework import viewsets | |
from rest_framework.response import Response | |
from rest_framework import serializers | |
from rest_framework.authentication import SessionAuthentication, BasicAuthentication | |
from rest_framework.permissions import IsAuthenticated | |
class Cart(object): | |
def __init__(self, **kwargs): | |
fields = ('id', 'price', 'quantity', 'total') | |
for field in fields: |