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
<?php | |
namespace App\Http\Controllers; | |
use DB; | |
use Illuminate\Http\Request; | |
use Illuminate\Support\Facades\Auth; | |
use Illuminate\Support\Facades\Input; | |
use Illuminate\Support\Facades\Config; | |
use Illuminate\Support\Facades\Response; |
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
import React, {Component} from 'react' | |
import FileReaderInput from 'react-file-reader-input' | |
import { connect } from "react-redux" | |
import { | |
Modal, | |
ModalHeader, | |
ModalTitle, | |
ModalBody, | |
ModalFooter | |
} from 'react-modal-bootstrap' |
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
import json | |
import copy | |
import urllib | |
import urlparse | |
import geocoder | |
from apps.businesses.forms import ReviewForm | |
from apps.businesses.helpers import Pagination | |
from apps.businesses.models import Business, Address, CustomBusinessServicePackage | |
from apps.geos.models import State, GeoPoint | |
from apps.utils.states import states |
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
import os | |
import uuid | |
import urllib | |
import json | |
from urlparse import urlparse | |
from django.urls import reverse | |
from django.db import models | |
from django.db.models import Avg, Q | |
from django.db.models.functions import Length | |
from django.contrib.gis.measure import D |
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
{ | |
"level1": [ | |
{ | |
"id": 1, | |
"name": "Level1: # 1" | |
}, | |
{ | |
"id": 2, | |
"name": "Level1: # 2" | |
} |
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
import base64 | |
from django.core.files.base import ContentFile | |
from rest_framework import serializers | |
class Base64ImageField(serializers.ImageField): | |
def from_native(self, data): | |
if isinstance(data, basestring) and data.startswith('data:image'): | |
# base64 encoded image - decode |