Skip to content

Instantly share code, notes, and snippets.

Avatar

Muhammad Saqib unknownArtist

View GitHub Profile
View python_code
from django.views.generic import CreateView, ListView, UpdateView, DeleteView
from django.shortcuts import redirect, render
from django.http import JsonResponse
from .forms import ProductForm
from .models import Product
from helper.views import get_user_franchise, user_is_employee
from django.shortcuts import HttpResponse, get_object_or_404
from django.utils.decorators import method_decorator
from django.contrib.auth.decorators import permission_required
from django.utils.timezone import datetime
View gist:e26091bac90bbb905060
<?php
return [
/*
|--------------------------------------------------------------------------
| PDO Fetch Style
|--------------------------------------------------------------------------
|
| By default, database results will be returned as instances of the PHP