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.request import Request | |
from django.http import HttpRequest | |
from django.contrib.auth.models import User | |
from apps.base.views import SampleViewSet | |
django_request = HttpRequest() | |
# create HTTP request skipping token here | |
django_request.method = 'GET' | |
drf_request = Request(django_request) |
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
# Author: Manoj jadhav | |
from __future__ import print_function | |
import json | |
import urllib | |
import boto3 | |
import uuid | |
import base64 | |
sqs = boto3.client("sqs") |
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
I got this error: | |
In file included from src/docstrings.c:4:0: | |
src/pycurl.h:4:20: fatal error: Python.h: No such file or directory | |
#include <Python.h> | |
^ | |
compilation terminated. |
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
# in DRF DestroyModelMixin delete row. Using Same DELETE method I can soft delete object. | |
# ex: URL - DELETE https://<hostnam>/api/v1/books/1/ | |
from rest_framework import mixins, permissions, viewsets | |
from rest_framework.response import Response | |
from rest_framework import status | |
class SlSoftDeleteMixin(mixins.DestroyModelMixin): | |
""" As we are deleting soft""" |