text stringlengths 0 1.05M | meta dict |
|---|---|
from django.shortcuts import render
import random
SECRET_FILE = ''
def get_key_gen(request):
try:
SECRET_KEY = ''.join([random.SystemRandom().choice('abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)') for i in range(50)])
secret = file(SECRET_FILE, 'w')
secret.write(SECRET_KEY)
... | {
"repo_name": "jawbreakyr/webtool",
"path": "src/shorturls/views.py",
"copies": "1",
"size": "1256",
"license": "bsd-3-clause",
"hash": 1508243637281918000,
"line_mean": 28.9047619048,
"line_max": 143,
"alpha_frac": 0.5501592357,
"autogenerated": false,
"ratio": 3.900621118012422,
"config_test"... |
from django.shortcuts import render
import requests as req
import json
import datetime
# Create your views here.
def result(request):
if request.method == 'GET':
return render(request, 'index.html')
if request.method == 'POST':
url = request.POST['address'].split('/')
if len(url) ... | {
"repo_name": "harshitanand/Git-Issue-Tracker",
"path": "track/views.py",
"copies": "1",
"size": "1709",
"license": "mit",
"hash": -3903161867726749000,
"line_mean": 49.2647058824,
"line_max": 210,
"alpha_frac": 0.5851375073,
"autogenerated": false,
"ratio": 3.613107822410148,
"config_test": fa... |
from django.shortcuts import render
import requests, json
# from django.contrib.auth.decorators import login_required
# from django.contrib.auth.models import User
# from django.contrib.auth import authenticate, login
# from django.http import HttpResponseRedirect, Http404, HttpResponse
# from django.core import seria... | {
"repo_name": "sdzharkov/Trip-Split",
"path": "tripapp/views.py",
"copies": "3",
"size": "8918",
"license": "mit",
"hash": 5512162990322323000,
"line_mean": 35.8512396694,
"line_max": 180,
"alpha_frac": 0.5801749271,
"autogenerated": false,
"ratio": 3.6775257731958764,
"config_test": false,
"... |
from django.shortcuts import render
import requests
from bs4 import BeautifulSoup
# Create your views here.
global_list_link=[]
global_list_title=[]
global_list_info=[]
global_address=[]
global_list_ranking=[]
def bing_parser(link):
del global_list_link[:]
del global_list_title[:]
del global_list_ranking[:]
del gl... | {
"repo_name": "rsunder10/PopularityBased-SearchEngine",
"path": "arc_net/redsun/views.py",
"copies": "1",
"size": "3229",
"license": "mit",
"hash": -167802617717650270,
"line_mean": 23.6564885496,
"line_max": 149,
"alpha_frac": 0.6602663363,
"autogenerated": false,
"ratio": 2.51284046692607,
"c... |
from django.shortcuts import render
import requests
from bs4 import BeautifulSoup, SoupStrainer
# Create your views here.
from django.http import HttpResponse, JsonResponse
import re
from django.template import loader
import os
session_map = {}
cp = os.path.dirname(__file__)
pcp = os.path.abspath(os.path.dirname(__fil... | {
"repo_name": "NeZhaaaa/Django_web",
"path": "hello/views.py",
"copies": "1",
"size": "6964",
"license": "apache-2.0",
"hash": -3484998169871201300,
"line_mean": 29.5797101449,
"line_max": 110,
"alpha_frac": 0.5911532385,
"autogenerated": false,
"ratio": 2.7062847370671226,
"config_test": false... |
from django.shortcuts import render
import requests
from django.views.generic.base import View
from jsonview.decorators import json_view
from embedly import Embedly
import nltk
from readability.readability import Readability
from datetime import datetime
from articles.models import Article, Source
from django.forms.mod... | {
"repo_name": "bryankane/EasyRead",
"path": "news_project/search/views.py",
"copies": "1",
"size": "4206",
"license": "mit",
"hash": 1627424373137837800,
"line_mean": 37.9444444444,
"line_max": 99,
"alpha_frac": 0.5451735616,
"autogenerated": false,
"ratio": 4.508038585209003,
"config_test": fa... |
from django.shortcuts import render
import search.forms as forms
import job.models
import event.models
# Create your views here.
# based on http://julienphalip.com/post/2825034077/adding-search-to-a-django-site-in-a-snap
import re
from django.db.models import Q
def _normalize_query(query_string,
findterms=re.... | {
"repo_name": "fishin4guitars/DB_Final_Project_Website",
"path": "website/search/views.py",
"copies": "1",
"size": "2973",
"license": "bsd-2-clause",
"hash": 7141376335597812000,
"line_mean": 28.1470588235,
"line_max": 95,
"alpha_frac": 0.6599394551,
"autogenerated": false,
"ratio": 2.95233366434... |
from django.shortcuts import render
import urllib
from catalogue.models import Post
from home.models import Home
from datetime import datetime, timedelta
import pytz
from django.http import HttpResponse
import requests
import json
from django.http import HttpResponseRedirect
from django.core.management import call_comm... | {
"repo_name": "R-Wolf/CFD_A_library",
"path": "home/views.py",
"copies": "1",
"size": "3979",
"license": "mit",
"hash": -8041757133045438000,
"line_mean": 29.6153846154,
"line_max": 104,
"alpha_frac": 0.642121136,
"autogenerated": false,
"ratio": 2.6264026402640264,
"config_test": false,
"has... |
from django.shortcuts import render
import urllib
from .models import Word
from secret import top_range, mid_range
import random
#Function to randomize pronouns
def pronoun(number):
if number >= top_range:
return "He's "
elif number >= mid_range and number < top_range:
return "Xe's "
else:
... | {
"repo_name": "bluflowr/theywritecode",
"path": "writecode/views.py",
"copies": "1",
"size": "1689",
"license": "mit",
"hash": 5380993493126963000,
"line_mean": 33.4693877551,
"line_max": 93,
"alpha_frac": 0.6299585554,
"autogenerated": false,
"ratio": 3.168855534709193,
"config_test": false,
... |
from django.shortcuts import render
import urllib.request, json
from django.http import HttpResponse, JsonResponse
def _get_request(url):
req = urllib.request.Request(url)
resp_json = urllib.request.urlopen(req).read().decode('utf-8')
return json.loads(resp_json)
def _success(stat, data):
return Jso... | {
"repo_name": "shadowgamefly/news-Digest",
"path": "web/web/views.py",
"copies": "1",
"size": "2706",
"license": "mit",
"hash": 3046984441597596000,
"line_mean": 29.0666666667,
"line_max": 118,
"alpha_frac": 0.5070214339,
"autogenerated": false,
"ratio": 3.4916129032258065,
"config_test": false... |
from django.shortcuts import render
import utils.es
from django.conf import settings
def query(request):
""" This page is the main query interface.
"""
data = {}
params = request.GET
# If we have a blank query, just return everything.
query = params.get("query", "")
if query == "": query ... | {
"repo_name": "jpressnell/Brownian",
"path": "Brownian/view/views.py",
"copies": "1",
"size": "4113",
"license": "bsd-2-clause",
"hash": -8751823373379805000,
"line_mean": 35.0877192982,
"line_max": 122,
"alpha_frac": 0.6070994408,
"autogenerated": false,
"ratio": 3.909695817490494,
"config_tes... |
from django.shortcuts import render
# Let's use some Beautiful Soup
from bs4 import BeautifulSoup
# Python httpLib comes in handy
import httplib2
# Homepage View
def homepage(request):
'''
Displays the homepage and does the work
'''
if request.method == 'GET':
return render(request, 'index... | {
"repo_name": "seanmavley/siyavula",
"path": "main/views.py",
"copies": "1",
"size": "1531",
"license": "mit",
"hash": -8191183711205785000,
"line_mean": 31.5744680851,
"line_max": 66,
"alpha_frac": 0.4572175049,
"autogenerated": false,
"ratio": 5.172297297297297,
"config_test": false,
"has_n... |
from django.shortcuts import render
# -*- coding: utf-8 -*-
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from django.http import HttpResponse
import exifread
from Map.models import In... | {
"repo_name": "smarani/InfraShareMobile",
"path": "InfraShare Online/Map/views.py",
"copies": "1",
"size": "2212",
"license": "apache-2.0",
"hash": 2236939823637036500,
"line_mean": 35.2786885246,
"line_max": 129,
"alpha_frac": 0.6853526221,
"autogenerated": false,
"ratio": 4.1191806331471135,
... |
from django.shortcuts import render
# -*- coding: utf-8 -*-
from django.http import HttpResponse, HttpResponseBadRequest
from rest_framework import permissions
from rest_framework.views import APIView
from tauwebsite.utils import DBUtils
from tauwebsite.serializers import Serializers
class PLACE_TYPES:
FOOD = ... | {
"repo_name": "Tomotz/DBsystems",
"path": "finall/SRC/APPLICAITON-SOURCE-CODE/tauwebsite/places/views.py",
"copies": "2",
"size": "3881",
"license": "mit",
"hash": 1806864124689598200,
"line_mean": 28.1804511278,
"line_max": 68,
"alpha_frac": 0.6614274671,
"autogenerated": false,
"ratio": 3.64071... |
from django.shortcuts import render
# Create your views here.
class appView:
def index(request):
items = ["Toothbrush", "Toothpaste", "Deodorant", "Sponge", "Face Cloth", "Wet Wipes", "Soap", "Hand Cream"]
items2 = ["Tissues", "Ziploc Bags", "Hats", "Socks", "Gloves", "Plasters", "Sanitary To... | {
"repo_name": "Fazer56/Assignment3",
"path": "charitysite/myApp/views.py",
"copies": "1",
"size": "1156",
"license": "mit",
"hash": 7456094346309420000,
"line_mean": 43.4615384615,
"line_max": 254,
"alpha_frac": 0.6089965398,
"autogenerated": false,
"ratio": 3.524390243902439,
"config_test": fa... |
from django.shortcuts import render
# Create your views here.
#coding=utf-8
from django.shortcuts import render,render_to_response
from django.http import HttpResponse,HttpResponseRedirect
from django.template import Context
from django import forms
from blog.models import Tiltle
class TiltleForm(forms.Form):
til... | {
"repo_name": "StolerHua/yantu",
"path": "yantu/blog/views.py",
"copies": "1",
"size": "1184",
"license": "mit",
"hash": 6362749750372387000,
"line_mean": 28.4102564103,
"line_max": 85,
"alpha_frac": 0.6736474695,
"autogenerated": false,
"ratio": 3.3508771929824563,
"config_test": false,
"has... |
from django.shortcuts import render
# Create your views here.
# Create your views here.
from django.template.response import TemplateResponse
from django.core.mail import EmailMessage
from django.contrib import messages
from django.conf import settings
from django.shortcuts import render_to_response
from django.templ... | {
"repo_name": "arbin/aloeveraofforever",
"path": "aloeveraofforever/aloeveraofforever/healthcalc/views.py",
"copies": "1",
"size": "82369",
"license": "mit",
"hash": 5469909122436974000,
"line_mean": 63.3013270882,
"line_max": 123,
"alpha_frac": 0.5110417754,
"autogenerated": false,
"ratio": 2.28... |
from django.shortcuts import render
# Create your views here.
def e_search(type, name):
resp = ["CAS-local-dwh-hourly-summary", "CAS-rmc-hourly"]
return resp
def e_create_process(definition):
with open('/tmp/process_definition.xml','w') as f:
f.write(definition)
pass
def e_definition(type,... | {
"repo_name": "prathik/falcon-web",
"path": "falcon/api/views.py",
"copies": "1",
"size": "3358",
"license": "apache-2.0",
"hash": -7822644050978190000,
"line_mean": 34.3473684211,
"line_max": 110,
"alpha_frac": 0.5381179273,
"autogenerated": false,
"ratio": 3.8377142857142856,
"config_test": f... |
from django.shortcuts import render
# Create your views here.
def search(request):
return render(request, "search/landing.html")
"""
#!/usr/bin/python3
import urllib2
import json
import tweepy
import os
from flask import Flask, request, redirect, url_for, send_from_directory, render_template
app = Flask(__name__... | {
"repo_name": "theshteves/theshteves.me",
"path": "app_search/views.py",
"copies": "2",
"size": "1136",
"license": "mit",
"hash": -8648588495601139000,
"line_mean": 26.7073170732,
"line_max": 89,
"alpha_frac": 0.6399647887,
"autogenerated": false,
"ratio": 2.973821989528796,
"config_test": fals... |
from django.shortcuts import render
# Create your views here.
from api.libs.base import CoreView
from cmdb.models import Asset, BusinessUnit, Cabinet, Tags, EventLog
from django.db.models import Q
from api.libs.cmdb_agent import CmdbCollector
from api.libs.asset_handler import AssetHandler
from guardian.shortcuts impo... | {
"repo_name": "ZhangXiaoyu-Chief/sandwich",
"path": "api/views/server.py",
"copies": "1",
"size": "10374",
"license": "apache-2.0",
"hash": -7320601319889446000,
"line_mean": 47.4952380952,
"line_max": 115,
"alpha_frac": 0.5217989002,
"autogenerated": false,
"ratio": 3.9750195160031225,
"config... |
from django.shortcuts import render
# Create your views here.
#from celery import registry
from django.http import HttpResponse
from django.http import HttpResponseRedirect
from django.shortcuts import render
from django.shortcuts import render_to_response, get_object_or_404
from django.template import RequestContext
... | {
"repo_name": "hollowpoint/hollowpoint",
"path": "hpt/core/views.py",
"copies": "1",
"size": "1993",
"license": "apache-2.0",
"hash": -4654778766003234000,
"line_mean": 29.6615384615,
"line_max": 74,
"alpha_frac": 0.6798795785,
"autogenerated": false,
"ratio": 4.178197064989518,
"config_test": ... |
from django.shortcuts import render
# Create your views here.
from django.conf import settings
from django.core.mail import send_mail
from jobs.models import Job, Employer, Location
from likes.models import UserLike
from matches.models import Match, PositionMatch, EmployerMatch, LocationMatch
from questions.forms imp... | {
"repo_name": "loafbaker/django_matchmaker",
"path": "dashboard/views.py",
"copies": "1",
"size": "1988",
"license": "mit",
"hash": 3673920740361862000,
"line_mean": 35.8333333333,
"line_max": 87,
"alpha_frac": 0.6599597586,
"autogenerated": false,
"ratio": 4.008064516129032,
"config_test": fal... |
from django.shortcuts import render
# Create your views here.
from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from django.views.decorators.cache import cache_page
from django.views.generic import TemplateView
from .mixins import LoginRequiredMixin
class ... | {
"repo_name": "encorehu/django-home",
"path": "home/views.py",
"copies": "1",
"size": "1056",
"license": "mit",
"hash": -95221317998053680,
"line_mean": 31,
"line_max": 90,
"alpha_frac": 0.678030303,
"autogenerated": false,
"ratio": 4.045977011494253,
"config_test": false,
"has_no_keywords": ... |
#from django.shortcuts import render
# Create your views here.
from django.contrib.auth.models import *
from django.contrib.auth import *
from rest_framework import viewsets
from rest_framework.views import APIView
from rest_framework.permissions import AllowAny
from rest_framework.response import Response
from rest_f... | {
"repo_name": "vingle1/AfriCuisine",
"path": "backend/api/controllers.py",
"copies": "1",
"size": "4110",
"license": "mit",
"hash": -3531739273175495000,
"line_mean": 31.3622047244,
"line_max": 95,
"alpha_frac": 0.6737226277,
"autogenerated": false,
"ratio": 3.770642201834862,
"config_test": fa... |
from django.shortcuts import render
# Create your views here.
from django.core.serializers import serialize
from django.http import HttpResponseRedirect,HttpResponse
from django.core.urlresolvers import reverse
from .forms import LocationForm
from django.shortcuts import render_to_response
from .models import *
from d... | {
"repo_name": "bird50/birdproj",
"path": "mapservice/views.py",
"copies": "1",
"size": "1889",
"license": "mit",
"hash": -1325638320595777000,
"line_mean": 36.0392156863,
"line_max": 151,
"alpha_frac": 0.6940179989,
"autogenerated": false,
"ratio": 3.6679611650485437,
"config_test": false,
"h... |
from django.shortcuts import render
# Create your views here.
from django.http import Http404
from django.db.models import Max
from .models import *
from django.shortcuts import render, get_object_or_404
from django.http import HttpResponseRedirect, HttpResponse
from django.urls import reverse
from django.views impor... | {
"repo_name": "dmm34/voteapp",
"path": "voteapp/views.py",
"copies": "1",
"size": "20479",
"license": "mit",
"hash": -8732662571205900000,
"line_mean": 40.1224899598,
"line_max": 199,
"alpha_frac": 0.5867962303,
"autogenerated": false,
"ratio": 4.108124373119358,
"config_test": false,
"has_no... |
from django.shortcuts import render
# Create your views here.
from django.http import Http404
from django.views.decorators.csrf import csrf_exempt
from rest_framework.renderers import JSONRenderer
from rest_framework.parsers import JSONParser
from snippets.models import Snippet
from snippets.serializers import Snippet... | {
"repo_name": "chfw/djangorestframework-tutorial",
"path": "snippets/views.py",
"copies": "1",
"size": "1610",
"license": "mit",
"hash": -2070804450572714500,
"line_mean": 32.5416666667,
"line_max": 83,
"alpha_frac": 0.7937888199,
"autogenerated": false,
"ratio": 4.316353887399464,
"config_test... |
# from django.shortcuts import render
# Create your views here.
from django.http import HttpResponse,Http404
from django.views.generic import TemplateView, ListView
from django.views.generic.edit import CreateView, UpdateView, DeleteView
from django.core.urlresolvers import reverse_lazy
from django.shortcuts import re... | {
"repo_name": "sawardekar/django",
"path": "login/views.py",
"copies": "1",
"size": "3909",
"license": "mit",
"hash": 7767096292426083000,
"line_mean": 33.6017699115,
"line_max": 87,
"alpha_frac": 0.721156306,
"autogenerated": false,
"ratio": 3.4901785714285714,
"config_test": false,
"has_no_... |
from django.shortcuts import render
# Create your views here.
from django.http import HttpResponse, HttpResponseRedirect, Http404
from django import template
import datetime
from django.template.loader import get_template
def error(request):
return HttpResponse("Ohh, error ~~~")
def ctime(req,num):
try:
... | {
"repo_name": "omnbmh/pi6x",
"path": "webapps/weibo/views.py",
"copies": "1",
"size": "1916",
"license": "mit",
"hash": 6981496573863586000,
"line_mean": 27.5970149254,
"line_max": 119,
"alpha_frac": 0.6524008351,
"autogenerated": false,
"ratio": 3.509157509157509,
"config_test": false,
"has_... |
from django.shortcuts import render
# Create your views here.
from django.http import HttpResponse, HttpResponseRedirect
from django.template import Context, loader
from django.shortcuts import render, get_object_or_404
from django.core.urlresolvers import reverse
from polls.models import Poll, Choice
from django.http... | {
"repo_name": "lotosbin/binbin-cms-django",
"path": "polls/views.py",
"copies": "1",
"size": "1060",
"license": "mit",
"hash": -8641026763643550000,
"line_mean": 38.2592592593,
"line_max": 75,
"alpha_frac": 0.6896226415,
"autogenerated": false,
"ratio": 4.2063492063492065,
"config_test": false,... |
from django.shortcuts import render
# Create your views here.
from django.http import HttpResponse, HttpResponseRedirect
from rango.models import Category, Page
from rango.forms import CategoryForm, PageForm
from rango.forms import UserForm, UserProfileForm
from django.contrib.auth import authenticate, login, logout
f... | {
"repo_name": "shawdon/django-learning",
"path": "rango/views.py",
"copies": "1",
"size": "8943",
"license": "mit",
"hash": -5634193372421777000,
"line_mean": 40.2119815668,
"line_max": 103,
"alpha_frac": 0.6443028067,
"autogenerated": false,
"ratio": 4.473736868434217,
"config_test": false,
... |
from django.shortcuts import render
# Create your views here.
from django.http import HttpResponse,HttpResponseRedirect
from restaurante.models import Bar, Tapa
#from restaurante.forms import UserForm, UserProfileForm
from restaurante.forms import UserForm,login_form, BarForm, TapaForm
from django.contrib.auth.decorat... | {
"repo_name": "javiergarridomellado/proyectodai",
"path": "restaurante/views.py",
"copies": "1",
"size": "9899",
"license": "apache-2.0",
"hash": 7474755551939693000,
"line_mean": 35.5276752768,
"line_max": 244,
"alpha_frac": 0.6520860693,
"autogenerated": false,
"ratio": 3.5814037626628075,
"c... |
from django.shortcuts import render
# Create your views here.
from django.http import HttpResponse, HttpResponseRedirect
import sys
from .forms import NameForm
class Entry(object):
def __init__(self, key, val):
self.key = key
self.val = val
def __unicode__(self):
return u'%s:%s' % (s... | {
"repo_name": "da1z/intellij-community",
"path": "python/helpers/pydev/tests_pydevd_python/my_django_proj_17/my_app/views.py",
"copies": "24",
"size": "1252",
"license": "apache-2.0",
"hash": 7874994471323258000,
"line_mean": 28.1395348837,
"line_max": 76,
"alpha_frac": 0.6014376997,
"autogenerated... |
from django.shortcuts import render
# Create your views here.
from django.http import HttpResponse, HttpResponseRedirect
import sys
from .forms import NameForm
class Entry(object):
def __init__(self, key, val):
self.key = key
self.val = val
def __unicode__(self):
return u'%s:%s' % (... | {
"repo_name": "fabioz/Pydev",
"path": "plugins/org.python.pydev.core/pysrc/tests_python/my_django_proj_17/my_app/views.py",
"copies": "2",
"size": "1817",
"license": "epl-1.0",
"hash": -742698404084935300,
"line_mean": 23.8904109589,
"line_max": 76,
"alpha_frac": 0.6053935058,
"autogenerated": fals... |
from django.shortcuts import render
# Create your views here.
from django.http import HttpResponse, HttpResponseRedirect
from django.template import Context, loader
from .forms import CustomerForm, ConfirmForm
from django.contrib.auth.models import User
from django.contrib.auth import authenticate, login
from placeo... | {
"repo_name": "georgeha/software_engineering",
"path": "aws/restolingo/online_booking/views.py",
"copies": "1",
"size": "1622",
"license": "mit",
"hash": 8073557975749595000,
"line_mean": 28.4909090909,
"line_max": 93,
"alpha_frac": 0.6572133169,
"autogenerated": false,
"ratio": 4.158974358974359... |
from django.shortcuts import render
# Create your views here.
from django.http import HttpResponse, JsonResponse, HttpResponseForbidden
from models import *
import json
from django.core import serializers
from django.views.decorators.csrf import csrf_exempt
@csrf_exempt
def index(request):
return HttpResponse("H... | {
"repo_name": "Gainzzz/backend",
"path": "gainzzz/muscles/views.py",
"copies": "1",
"size": "2916",
"license": "apache-2.0",
"hash": 7966485279200562000,
"line_mean": 30.6956521739,
"line_max": 110,
"alpha_frac": 0.6436899863,
"autogenerated": false,
"ratio": 3.3633217993079585,
"config_test": ... |
from django.shortcuts import render
# Create your views here.
from django.http import HttpResponse, JsonResponse, HttpResponseNotAllowed
from models import *
import json
import oauth2
from django.core import serializers
import urllib2, urllib
from django.views.decorators.csrf import csrf_exempt
import xml.etree.Elemen... | {
"repo_name": "MySage/backend",
"path": "sage/consumer/views.py",
"copies": "1",
"size": "7272",
"license": "apache-2.0",
"hash": 8213776709960895000,
"line_mean": 37.8877005348,
"line_max": 189,
"alpha_frac": 0.6234873487,
"autogenerated": false,
"ratio": 3.4480796586059745,
"config_test": fal... |
from django.shortcuts import render
# Create your views here.
from django.http import HttpResponse
from authomatic import Authomatic
from authomatic.adapters import DjangoAdapter
from config import CONFIG
authomatic = Authomatic(CONFIG, 'iMatch, super secret random string')
def home(request):
return HttpRespon... | {
"repo_name": "srsree/iMatch",
"path": "iMatch/authMe/views.py",
"copies": "1",
"size": "5694",
"license": "apache-2.0",
"hash": -7154238521878028000,
"line_mean": 44.56,
"line_max": 88,
"alpha_frac": 0.4815595364,
"autogenerated": false,
"ratio": 4.88336192109777,
"config_test": false,
"has_... |
from django.shortcuts import render
# Create your views here.
from django.http import HttpResponse
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from models import Person
from models import Message
import datetime
def current_time(request):
now = datetime.datetime.now()... | {
"repo_name": "merfii/PythonExercises",
"path": "llluiop/0023/MyDjango/web/views.py",
"copies": "37",
"size": "1037",
"license": "mit",
"hash": -4610704423720187400,
"line_mean": 20.6041666667,
"line_max": 58,
"alpha_frac": 0.6885245902,
"autogenerated": false,
"ratio": 3.8550185873605947,
"con... |
from django.shortcuts import render
# Create your views here.
from django.http import HttpResponse
from django.shortcuts import render_to_response, redirect
from django.template import RequestContext
from django.core.exceptions import ValidationError
from django.middleware import csrf
from django.views.decorators.csrf... | {
"repo_name": "laDanz/Naschpunkte",
"path": "NaschpunkteDP/NaschpunkteApp/views.py",
"copies": "1",
"size": "7180",
"license": "apache-2.0",
"hash": -5166370389894321000,
"line_mean": 34.9,
"line_max": 141,
"alpha_frac": 0.6484679666,
"autogenerated": false,
"ratio": 3.7969328397673188,
"config... |
from django.shortcuts import render
# Create your views here.
from django.http import HttpResponse
from django.shortcuts import render_to_response, render
from . import tinderbot
import operator
import argparse
import sys
import pynder
import urllib
#rake stuff
import re
import operator
sys.path.insert(0, 'src/')
... | {
"repo_name": "ckjoshi9/Auto-Mate-for-Tinder",
"path": "Django App/tinderapp/views.py",
"copies": "1",
"size": "10734",
"license": "mit",
"hash": -682340742306477400,
"line_mean": 34.5430463576,
"line_max": 290,
"alpha_frac": 0.6130054034,
"autogenerated": false,
"ratio": 3.585170340681363,
"co... |
from django.shortcuts import render
# Create your views here.
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from rest_framework.renderers import JSONRenderer
from rest_framework.parsers import JSONParser
from snippets.models import Snippet
from snippets.serializers import Sn... | {
"repo_name": "qianyu668899/Django",
"path": "tutorial/snippets/views.py",
"copies": "2",
"size": "2147",
"license": "apache-2.0",
"hash": 8048405433091313000,
"line_mean": 33.0952380952,
"line_max": 64,
"alpha_frac": 0.6339077783,
"autogenerated": false,
"ratio": 4.568085106382979,
"config_tes... |
from django.shortcuts import render
# Create your views here.
from django.http import HttpResponse
from rest_framework import status
from rest_framework.renderers import JSONRenderer
from rest_framework.parsers import JSONParser
from goals.models import Category, Goal, Win
from goals.serializers import CategorySeriali... | {
"repo_name": "gnufede/results",
"path": "results/goals/views.py",
"copies": "1",
"size": "8658",
"license": "mit",
"hash": 6590909584688607000,
"line_mean": 33.632,
"line_max": 83,
"alpha_frac": 0.6528066528,
"autogenerated": false,
"ratio": 3.9861878453038675,
"config_test": false,
"has_no_... |
from django.shortcuts import render
# Create your views here.
from django.http import HttpResponse
from rest_framework import viewsets, views, response
from .models import *
class TestViewSet(views.APIView):
def get(self, request):
say = request.query_params.get('q', 'test one two three')
print('... | {
"repo_name": "nimiq/dartexa",
"path": "darting/views.py",
"copies": "1",
"size": "14078",
"license": "apache-2.0",
"hash": 4726928499946937000,
"line_mean": 32.2028301887,
"line_max": 99,
"alpha_frac": 0.5230146328,
"autogenerated": false,
"ratio": 3.9346003353828953,
"config_test": false,
"... |
from django.shortcuts import render
# Create your views here.
from django.http import HttpResponseRedirect, HttpResponse
from django.shortcuts import get_object_or_404, render
from django.urls import reverse
from django.db.models import F
#from django.views import generic
from django.utils import timezone
from django.... | {
"repo_name": "gavmain/django_demo",
"path": "demo/polls/views.py",
"copies": "1",
"size": "2185",
"license": "mit",
"hash": 6345710619346164000,
"line_mean": 32.1060606061,
"line_max": 82,
"alpha_frac": 0.6887871854,
"autogenerated": false,
"ratio": 4.218146718146718,
"config_test": false,
"... |
from django.shortcuts import render
# Create your views here.
from django.http import HttpResponseRedirect, HttpResponse
from django.shortcuts import render, get_object_or_404
from django.core.urlresolvers import reverse
from django.template import RequestContext, loader
from django.views import generic
from django.ut... | {
"repo_name": "davidaparicio/django_officialtutorial",
"path": "creationPackage/polls/views.py",
"copies": "2",
"size": "2354",
"license": "mit",
"hash": 1414953812181009000,
"line_mean": 33.6176470588,
"line_max": 75,
"alpha_frac": 0.6652506372,
"autogenerated": false,
"ratio": 3.796774193548387... |
#from django.shortcuts import render
# Create your views here.
from django.shortcuts import get_object_or_404, render
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from django.views import generic
from django.http import HttpResponse
from django.template import loader
from ... | {
"repo_name": "gmoulard/OpenStack_Tenant_Doc",
"path": "django/architools/views.py",
"copies": "1",
"size": "1597",
"license": "apache-2.0",
"hash": -7070282269074528000,
"line_mean": 29.1509433962,
"line_max": 80,
"alpha_frac": 0.7219787101,
"autogenerated": false,
"ratio": 3.604966139954853,
... |
from django.shortcuts import render
# Create your views here.
from django.shortcuts import redirect
from django.utils import timezone
from django.contrib import messages
import time
from django.contrib.auth.decorators import login_required
from django.db import connection
#apps internas y externas
from datospersonale... | {
"repo_name": "anderson7ru/bienestarues",
"path": "signosvitalesapp/views.py",
"copies": "1",
"size": "3882",
"license": "mit",
"hash": -2775503635613027000,
"line_mean": 51.472972973,
"line_max": 341,
"alpha_frac": 0.7138073158,
"autogenerated": false,
"ratio": 3.14331983805668,
"config_test":... |
from django.shortcuts import render
# Create your views here.
from django.shortcuts import render, get_object_or_404
from django.http import HttpResponse, HttpResponseRedirect
from django.core.urlresolvers import reverse
from django.views import generic
from django.utils import timezone
from models import Poll, Choic... | {
"repo_name": "paleocore/django_polls",
"path": "polls/views.py",
"copies": "1",
"size": "1679",
"license": "mit",
"hash": 3907176565422684700,
"line_mean": 31.9215686275,
"line_max": 90,
"alpha_frac": 0.6813579512,
"autogenerated": false,
"ratio": 3.9599056603773586,
"config_test": false,
"h... |
from django.shortcuts import render
# Create your views here.
from django.shortcuts import render, get_object_or_404
from .models import Post,Comment
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.views.generic import ListView
from .forms import EmailPostForm,CommentForm
from djan... | {
"repo_name": "z-yz/DjangoDyExample_learn",
"path": "chap_2_blog/blog/views.py",
"copies": "1",
"size": "3161",
"license": "mit",
"hash": 3319848836971836400,
"line_mean": 38.024691358,
"line_max": 114,
"alpha_frac": 0.5741853844,
"autogenerated": false,
"ratio": 4.057766367137355,
"config_test... |
from django.shortcuts import render
# Create your views here.
from django.shortcuts import render, get_object_or_404
from .models import Post
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.views.generic import ListView
class PostListView(ListView):
queryset = Post.published.a... | {
"repo_name": "z-yz/DjangoDyExample_learn",
"path": "chap_1_blog/blog/views.py",
"copies": "1",
"size": "1465",
"license": "mit",
"hash": 4846992833808555000,
"line_mean": 33.880952381,
"line_max": 72,
"alpha_frac": 0.5979522184,
"autogenerated": false,
"ratio": 4.138418079096045,
"config_test"... |
from django.shortcuts import render
# Create your views here.
from django.shortcuts import render, get_object_or_404
from .models import Vehiculos, Vehiculo_Clientes, Vehiculo_ClientesForm, VehiculosForm
from django.views.generic import ListView
from django.contrib.auth.decorators import login_required
from django.htt... | {
"repo_name": "macs03/autoservicio",
"path": "vehiculos/views.py",
"copies": "1",
"size": "3174",
"license": "mit",
"hash": -2887024632054775000,
"line_mean": 34.2777777778,
"line_max": 90,
"alpha_frac": 0.7649653434,
"autogenerated": false,
"ratio": 2.818827708703375,
"config_test": false,
"... |
from django.shortcuts import render
# Create your views here.
from django.shortcuts import render
# Create your views here.
import sys
from django.http import HttpResponse
from django.template import RequestContext, loader
from . import models as data_models
import profiles.models
from django.db import models
from dj... | {
"repo_name": "ziposoft/godiva",
"path": "src/zs/views.py",
"copies": "1",
"size": "4763",
"license": "mit",
"hash": -8062440843470164000,
"line_mean": 27.1834319527,
"line_max": 98,
"alpha_frac": 0.5536426622,
"autogenerated": false,
"ratio": 3.9461474730737365,
"config_test": false,
"has_no... |
from django.shortcuts import render
# Create your views here.
from django.views.decorators.csrf import csrf_exempt
from django.shortcuts import render,get_object_or_404
from django.http import HttpResponse
from .models import Employee,Hostname,StateChange
import json
def index(request):
all_employees = Employee.ob... | {
"repo_name": "GJRDiesel/ddwrt_timeclock",
"path": "time_manager/views.py",
"copies": "1",
"size": "1671",
"license": "mit",
"hash": -2319558105094370000,
"line_mean": 35.3260869565,
"line_max": 95,
"alpha_frac": 0.7259126272,
"autogenerated": false,
"ratio": 3.4382716049382718,
"config_test": ... |
from django.shortcuts import render
# Create your views here.
from django.views.generic.edit import FormView, CreateView
from django.views.generic import DetailView, UpdateView, DeleteView
from .forms import ApplicantCreateForm, ApplicantUpdateForm
from .forms import AttachmentUpdateForm, AttachmentCreateForm
from .f... | {
"repo_name": "ForumDev/djangocms-applicants",
"path": "applicants/views.py",
"copies": "1",
"size": "7760",
"license": "mit",
"hash": -1276478190201531100,
"line_mean": 36.3125,
"line_max": 99,
"alpha_frac": 0.6775773196,
"autogenerated": false,
"ratio": 3.7022900763358777,
"config_test": fals... |
from django.shortcuts import render
# Create your views here.
from django.views.generic import View
from facade.models import Profile
class OperaListView(View):
def get(self, request):
opere = Profile.objects.first().homepage_features.all()
profile = Profile.objects.first()
return rend... | {
"repo_name": "mhotwagner/backstage",
"path": "frontend/views.py",
"copies": "1",
"size": "1670",
"license": "mit",
"hash": -8634245473247924000,
"line_mean": 23.2173913043,
"line_max": 64,
"alpha_frac": 0.5203592814,
"autogenerated": false,
"ratio": 4.5257452574525745,
"config_test": false,
... |
from django.shortcuts import render
# Create your views here.
from event.models import Event, EventForm, Guest, Product
from rest_framework import viewsets
from serializers import EventSerializer, JSONResponse
def events(request):
return render(request, 'event/EventList.html', {})
def events_list(request):
... | {
"repo_name": "ayeletdn/SocialParty",
"path": "event/views.py",
"copies": "1",
"size": "1083",
"license": "mit",
"hash": -5049892141265353000,
"line_mean": 22.0638297872,
"line_max": 59,
"alpha_frac": 0.6592797784,
"autogenerated": false,
"ratio": 3.8404255319148937,
"config_test": false,
"ha... |
from django.shortcuts import render
# Create your views here.
from Ingredients.forms import IngredientForm
from .models import Ingredients as ingr
TypeOfImg = ['png', 'jpg', 'jpeg']
def create_Ingredient(request):
# if not request.user.is_authenticated():
# return render(request, 'Home/login.html')
# e... | {
"repo_name": "Piotr95/Yummy_Pies",
"path": "Ingredients/views.py",
"copies": "1",
"size": "1882",
"license": "mit",
"hash": 5392150002138707000,
"line_mean": 27.0895522388,
"line_max": 92,
"alpha_frac": 0.6147715197,
"autogenerated": false,
"ratio": 3.4094202898550723,
"config_test": false,
... |
from django.shortcuts import render
# Create your views here.
from instance.models import Skill, Service
from instance.serializers import SkillSerializer, ServiceSerializer
from django.http import Http404
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import s... | {
"repo_name": "kikofernandez/match-django",
"path": "ask/instance/views.py",
"copies": "1",
"size": "1337",
"license": "apache-2.0",
"hash": -2575964791215388700,
"line_mean": 31.6097560976,
"line_max": 78,
"alpha_frac": 0.7075542259,
"autogenerated": false,
"ratio": 3.955621301775148,
"config_... |
from django.shortcuts import render
# Create your views here.
from .models import Book, Author, BookInstance, Genre
def index(request):
"""
View function for home page of site.
"""
# Generate counts of some of the main objects
num_books=Book.objects.all().count()
num_instances=BookInstance.obj... | {
"repo_name": "topseer/django",
"path": "dJangoAdmin/catalog/old views.py",
"copies": "1",
"size": "8644",
"license": "mit",
"hash": -1578742591803242000,
"line_mean": 33.718875502,
"line_max": 145,
"alpha_frac": 0.6403285516,
"autogenerated": false,
"ratio": 3.7322970639032813,
"config_test": ... |
from django.shortcuts import render
# Create your views here.
from .models import Book, Author, BookInstance, Genre
def index(request):
"""
View function for home page of site.
"""
# Generate counts of some of the main objects
num_books=Book.objects.all().count()
num_instances=BookInstance.... | {
"repo_name": "manojchausali/django_local_library",
"path": "catalog/views.py",
"copies": "1",
"size": "4513",
"license": "mpl-2.0",
"hash": 4586609297597199000,
"line_mean": 30.7887323944,
"line_max": 169,
"alpha_frac": 0.7033015732,
"autogenerated": false,
"ratio": 3.824576271186441,
"config_... |
from django.shortcuts import render
# Create your views here.
from .models import Comment
from blog.models import Article
from .forms import CommentForm
from django.views.generic.edit import FormView
from django.http import HttpResponseRedirect
from django.contrib.auth import get_user_model
from django import forms
... | {
"repo_name": "liangliangyy/DjangoBlog",
"path": "comments/views.py",
"copies": "1",
"size": "2319",
"license": "mit",
"hash": -4613251141518981000,
"line_mean": 32.231884058,
"line_max": 69,
"alpha_frac": 0.6166593982,
"autogenerated": false,
"ratio": 4.072824156305506,
"config_test": false,
... |
from django.shortcuts import render
# Create your views here.
from .models import UserData, UserQuota, UserInfo, UserBillingDetail
from .serializers import UserDataSerializer, UserQuotaSerializer, UserInfoSerializer, UserBillingSerializer
from .permissions import IsCurrentUser
from django.http import Http404
from djan... | {
"repo_name": "DanielGabris/radius_restserver",
"path": "src/freeradius/views.py",
"copies": "1",
"size": "5767",
"license": "mit",
"hash": 1087776641522060500,
"line_mean": 35.5,
"line_max": 107,
"alpha_frac": 0.7246401942,
"autogenerated": false,
"ratio": 3.901894451962111,
"config_test": fal... |
from django.shortcuts import render
# Create your views here.
from .models import UserData, UserQuota, UserInfo, UserBillingDetail, RadPostAuth, RadReply, RadCheck, \
UserInfo
from .serializers import UserDataSerializer, UserQuotaSerializer, UserInfoSerializer, \
UserBillingSerializer, RadPostAuthSerializer, RadRe... | {
"repo_name": "realworldtech/radius_restserver",
"path": "src/freeradius/views.py",
"copies": "1",
"size": "7621",
"license": "mit",
"hash": 3109146814262089000,
"line_mean": 35.4641148325,
"line_max": 112,
"alpha_frac": 0.7119800551,
"autogenerated": false,
"ratio": 3.9062019477191186,
"config... |
from django.shortcuts import render
# Create your views here.
from .models import Vcenter, Vm
from django.views import generic
from pysphere import VIServer
from django.http import HttpResponse, HttpResponseRedirect
import vmvc
from .forms import ClonetForm
from django.views.generic.edit import FormView
class Vcente... | {
"repo_name": "borisensx/ansiblePower",
"path": "vmware/views.py",
"copies": "1",
"size": "2407",
"license": "mit",
"hash": -379906633271466100,
"line_mean": 30.6842105263,
"line_max": 103,
"alpha_frac": 0.681346074,
"autogenerated": false,
"ratio": 3.409348441926346,
"config_test": false,
"h... |
from django.shortcuts import render
# Create your views here.
from rest_framework.decorators import api_view
from AE_academico.models import Asistencia, Aula, AulaMatricula, CursoDocente, AulaCurso
from enrollment.models import Matricula
from register.models import Profile, Personal, PersonalColegio, Colegio, Apodera... | {
"repo_name": "furthz/colegio",
"path": "src/APIs/views.py",
"copies": "1",
"size": "20746",
"license": "mit",
"hash": 2071273077427179000,
"line_mean": 34.5797598628,
"line_max": 130,
"alpha_frac": 0.6821096273,
"autogenerated": false,
"ratio": 3.491499747517253,
"config_test": false,
"has_n... |
from django.shortcuts import render
# Create your views here.
from urllib.parse import urlparse
import datetime
from django.conf import settings
from django.http import HttpResponse, HttpResponseRedirect
from django.contrib.auth import get_user_model
from .models import OAuthUser
from django.contrib.auth import login
... | {
"repo_name": "liangliangyy/DjangoBlog",
"path": "oauth/views.py",
"copies": "1",
"size": "9004",
"license": "mit",
"hash": 3756929290193399300,
"line_mean": 33.5725806452,
"line_max": 109,
"alpha_frac": 0.5854910194,
"autogenerated": false,
"ratio": 3.5919564306661083,
"config_test": false,
... |
from django.shortcuts import render
# Create your views here.
import django_filters
from rest_framework import viewsets, filters
from rest_framework import status
from rest_framework.response import Response
from .models import Condition, Entry
from .serializer import ConditionSerializer, EntrySerializer
class Condi... | {
"repo_name": "futami/measone",
"path": "meas/views.py",
"copies": "1",
"size": "6808",
"license": "mit",
"hash": -3961944728968978400,
"line_mean": 38.0882352941,
"line_max": 121,
"alpha_frac": 0.7108669476,
"autogenerated": false,
"ratio": 3.7013927576601673,
"config_test": false,
"has_no_k... |
from django.shortcuts import render
# Create your views here.
import json
from urllib import quote_plus
from urllib2 import urlopen
from django.db import connection
import indicoio
import validators
from bs4 import BeautifulSoup
from clarifai.client import ClarifaiApi
from django.http import HttpResponse
from django.v... | {
"repo_name": "WallStreetMinifier/webapp",
"path": "wallstreetmin/data_miner/views.py",
"copies": "1",
"size": "6304",
"license": "apache-2.0",
"hash": -3621158027231475000,
"line_mean": 40.4736842105,
"line_max": 233,
"alpha_frac": 0.5743972081,
"autogenerated": false,
"ratio": 3.565610859728507... |
from django.shortcuts import render
# Create your views here.
import json
import datetime
import itertools
from itertools import groupby
from django.http import HttpResponse
from .models import OwnTrackLog
import logging
from django.shortcuts import render
from django.http import JsonResponse
from django.contrib.auth.... | {
"repo_name": "liangliangyy/DjangoBlog",
"path": "owntracks/views.py",
"copies": "1",
"size": "3746",
"license": "mit",
"hash": -7645870987032426000,
"line_mean": 29.2096774194,
"line_max": 78,
"alpha_frac": 0.6017084891,
"autogenerated": false,
"ratio": 3.731075697211155,
"config_test": false,... |
from django.shortcuts import render
# Create your views here.
import logging
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse
from django.shortcuts import render
from cenet.models import Neuron, SynapticConn, CENetwork
from lems_ui.models import Lems2FpgaJob
from lems_ui.... | {
"repo_name": "Si-elegans/Web-based_GUI_Tools",
"path": "results_viewer/views.py",
"copies": "1",
"size": "1035",
"license": "apache-2.0",
"hash": -2358741465124212000,
"line_mean": 27.75,
"line_max": 97,
"alpha_frac": 0.6956521739,
"autogenerated": false,
"ratio": 3.2445141065830723,
"config_t... |
from django.shortcuts import render
# Create your views here.
import logging
from django.contrib.auth.decorators import login_required
from django.shortcuts import render
from cenet.models import Neuron, SynapticConn, CENetwork
from cenet.views import ids_phar
from django.db.models import Q
from django.http import Htt... | {
"repo_name": "Si-elegans/Web-based_GUI_Tools",
"path": "worm_conf/views.py",
"copies": "1",
"size": "9430",
"license": "apache-2.0",
"hash": 3086137835466634000,
"line_mean": 41.2869955157,
"line_max": 159,
"alpha_frac": 0.6500530223,
"autogenerated": false,
"ratio": 3.3180858550316676,
"confi... |
from django.shortcuts import render
# Create your views here.
# coding:utf-8
import json
import os
import time
from django.conf import settings
from django.http import HttpResponse, HttpResponseBadRequest
from django.views.decorators.csrf import csrf_exempt
@csrf_exempt
def ueditor_index(request):
"""
uedi... | {
"repo_name": "blackholll/loonblog",
"path": "apps/ueditor/views.py",
"copies": "1",
"size": "3838",
"license": "mit",
"hash": -1147510354154405100,
"line_mean": 32.0877192982,
"line_max": 116,
"alpha_frac": 0.5702545069,
"autogenerated": false,
"ratio": 3.4669117647058822,
"config_test": false... |
from django.shortcuts import render
# Create your views here.
from django.contrib.auth.models import User, Group
from rest_framework import viewsets
from msg.serializers import UserSerializer, GroupSerializer
from msg.models import Msg
from rest_framework.generics import ListCreateAPIView, RetrieveUpdateDestroyAPIVie... | {
"repo_name": "orisi/fastcast",
"path": "msg/views.py",
"copies": "1",
"size": "1856",
"license": "mit",
"hash": 1522063977600125700,
"line_mean": 26.7014925373,
"line_max": 83,
"alpha_frac": 0.7537715517,
"autogenerated": false,
"ratio": 4.0435729847494555,
"config_test": false,
"has_no_keyw... |
from django.shortcuts import render
# Create your views here.
from django.core.urlresolvers import reverse
from django.views.generic import ListView, CreateView, UpdateView, DeleteView, DetailView
from contacts.models import Contact
from django import forms
from contacts.forms import ContactForm
#from django imp... | {
"repo_name": "mauerbac/addressbook",
"path": "contacts/views.py",
"copies": "1",
"size": "1537",
"license": "mit",
"hash": -5622243382197020000,
"line_mean": 23.4126984127,
"line_max": 89,
"alpha_frac": 0.7456083279,
"autogenerated": false,
"ratio": 3.4155555555555557,
"config_test": false,
... |
from django.shortcuts import render
# Create your views here.
from django.http import HttpResponse, HttpResponseNotAllowed
from django.views.generic import TemplateView
from .models import Event
from django.core import serializers
from dateutil.parser import *
import datetime
class ChronoView(TemplateView):
templat... | {
"repo_name": "krishraghuram/stud-webserver",
"path": "chrono/views.py",
"copies": "1",
"size": "1051",
"license": "apache-2.0",
"hash": 3970634307033455600,
"line_mean": 31.875,
"line_max": 102,
"alpha_frac": 0.6955280685,
"autogenerated": false,
"ratio": 3.223926380368098,
"config_test": fals... |
from django.shortcuts import render
# Create your views here.
from django.http import HttpResponse,HttpResponseRedirect
from django.template.loader import get_template
from django.template import Context
from django.shortcuts import render_to_response
from datetime import datetime
from models import *
from django.sho... | {
"repo_name": "JhonLP/Midori",
"path": "Feed/views.py",
"copies": "2",
"size": "3208",
"license": "mit",
"hash": -7687713860495569000,
"line_mean": 31.7448979592,
"line_max": 90,
"alpha_frac": 0.7895885287,
"autogenerated": false,
"ratio": 3.1145631067961164,
"config_test": false,
"has_no_key... |
from django.shortcuts import render
# Create your views here.
from django.http import HttpResponse
from catalogue.models import GlobularCluster, AllObservation, Reference
import django_tables2 as tables
from django.shortcuts import get_object_or_404, render
from django_tables2.utils import A # alias for Accessor
fro... | {
"repo_name": "balbinot/superharris",
"path": "catalogue/views.py",
"copies": "1",
"size": "9023",
"license": "mit",
"hash": -490468145219244700,
"line_mean": 34.9482071713,
"line_max": 273,
"alpha_frac": 0.592929181,
"autogenerated": false,
"ratio": 3.541208791208791,
"config_test": false,
"... |
from django.shortcuts import render
# Create your views here.
from django.http import HttpResponse
from django.template import RequestContext, loader
from .models import Author, Gender, Token, Desig, Lang, ScopeType, Scope, Utter, Pronounce, Survey, Freq, Idea, Meaning, Onto
def index(request):
return HttpRespo... | {
"repo_name": "philpot/tocayo",
"path": "tocayoproj/tocayoapp/views.py",
"copies": "1",
"size": "7983",
"license": "apache-2.0",
"hash": 7806220009893702000,
"line_mean": 37.0142857143,
"line_max": 125,
"alpha_frac": 0.6089189528,
"autogenerated": false,
"ratio": 3.7130232558139533,
"config_tes... |
from django.shortcuts import render
# Create your views here.
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from rest_framework.renderers import JSONRenderer
from rest_framework.parsers import JSONParser
from api.models import Product
from api.serializers import ProductSeri... | {
"repo_name": "handy-projects/ecommerce",
"path": "src/domain/src/ecommerce/api/views.py",
"copies": "1",
"size": "2000",
"license": "mit",
"hash": 254353713310062430,
"line_mean": 30.746031746,
"line_max": 61,
"alpha_frac": 0.6715,
"autogenerated": false,
"ratio": 4.405286343612334,
"config_te... |
from django.shortcuts import render
# Create your views here.
from django.http import HttpResponse
from lab01_authserver_app.auth import login_controller, users_controller, \
log_request, auth_controller, token_controller_issue, \
token_controller_verify, token_controller_refresh, token_controller_grant, \
... | {
"repo_name": "Boris-Barboris/rsoi",
"path": "lab01/authserver/lab01_authserver/lab01_authserver_app/views.py",
"copies": "1",
"size": "1595",
"license": "mit",
"hash": 8562311275817252000,
"line_mean": 31.5714285714,
"line_max": 80,
"alpha_frac": 0.7009404389,
"autogenerated": false,
"ratio": 4.... |
from django.shortcuts import render
# Create your views here.
from django.http import HttpResponse
import time
from django.utils.translation import ugettext
from django.views.decorators import csrf
from django.shortcuts import render_to_response
from django.template import RequestContext
def weekday():
t = time... | {
"repo_name": "CooloiStudio/django_I18Ntest",
"path": "i18napp/views.py",
"copies": "1",
"size": "1202",
"license": "mit",
"hash": 6864208477670660000,
"line_mean": 24.5744680851,
"line_max": 75,
"alpha_frac": 0.5890183028,
"autogenerated": false,
"ratio": 4.605363984674329,
"config_test": fals... |
from django.shortcuts import render
# Create your views here.
from django.http import HttpResponseRedirect, HttpResponse
from django.contrib.auth.models import User
from rest_framework import viewsets
from home.serializers import UserSerializer
from django.shortcuts import render_to_response
from django.template impo... | {
"repo_name": "FrauBluher/ShR2",
"path": "Web Stack/home/views.py",
"copies": "2",
"size": "3634",
"license": "mit",
"hash": 8588640116658772000,
"line_mean": 28.7868852459,
"line_max": 96,
"alpha_frac": 0.6389653275,
"autogenerated": false,
"ratio": 4.588383838383838,
"config_test": false,
"... |
from django.shortcuts import render
# Create your views here.
from django.http import HttpResponseRedirect
from django.contrib.auth.models import User
from rest_framework import viewsets
from home.serializers import UserSerializer
from django.shortcuts import render_to_response
from django.template import RequestCont... | {
"repo_name": "seadsystem/ShR2",
"path": "Web Stack/webapp/static/rest_framework_swagger/home/views.py",
"copies": "2",
"size": "2330",
"license": "mit",
"hash": 8849396328401229000,
"line_mean": 33.2647058824,
"line_max": 96,
"alpha_frac": 0.6699570815,
"autogenerated": false,
"ratio": 4.4296577... |
from django.shortcuts import render
# Create your views here.
from django.http import HttpResponseRedirect
from django.shortcuts import get_object_or_404, render
from models import *
from forms import *
from itertools import chain
from django.contrib.auth.models import User
from django.template.context_processors im... | {
"repo_name": "SISTEMAsw/TAMP",
"path": "gui/data_ingestion/views.py",
"copies": "1",
"size": "5688",
"license": "mit",
"hash": 6167632589959575000,
"line_mean": 40.5182481752,
"line_max": 155,
"alpha_frac": 0.5912447257,
"autogenerated": false,
"ratio": 4.005633802816901,
"config_test": false,... |
from django.shortcuts import render
# Create your views here.
from django import forms
from django.core.paginator import Paginator, InvalidPage, EmptyPage
from django.shortcuts import render_to_response, redirect, get_object_or_404
from django.template import RequestContext
from django.core.context_processors import ... | {
"repo_name": "lkshakya/mediasite",
"path": "mediasite/articles/views.py",
"copies": "1",
"size": "10202",
"license": "mit",
"hash": -2068664497229059000,
"line_mean": 35.9637681159,
"line_max": 154,
"alpha_frac": 0.6356596746,
"autogenerated": false,
"ratio": 3.9435639737147277,
"config_test":... |
from django.shortcuts import render
# Create your views here.
from django.shortcuts import get_object_or_404
from django.views.generic import ListView
from egallery.models import *
class GalleryMainList(ListView):
template_name = 'egallery/index.html'
model = Picture
def get_queryset(self):
ret... | {
"repo_name": "pandamasta/django-egallery",
"path": "egallery/views.py",
"copies": "1",
"size": "1398",
"license": "bsd-3-clause",
"hash": -6113967460039288000,
"line_mean": 33.95,
"line_max": 84,
"alpha_frac": 0.7031473534,
"autogenerated": false,
"ratio": 3.7580645161290325,
"config_test": fa... |
from django.shortcuts import render
# Create your views here.
from django.shortcuts import render
#Basic
from datetime import datetime
from django.http import HttpResponse
# Views
from django.views.generic import ListView , DetailView # View,TemplateView,
from django.shortcuts import render_to_response
#Response
f... | {
"repo_name": "sidja/Django_Shop_Lite",
"path": "cart/views.py",
"copies": "1",
"size": "6620",
"license": "mit",
"hash": 5740195280776751000,
"line_mean": 24.86328125,
"line_max": 121,
"alpha_frac": 0.7410876133,
"autogenerated": false,
"ratio": 3.382728666326009,
"config_test": false,
"has_... |
from django.shortcuts import render
# Create your views here.
from django.shortcuts import render
from django.shortcuts import get_object_or_404
from django.http import HttpResponseRedirect, HttpResponse
from django.core.urlresolvers import reverse
from datetime import datetime
from .forms import TaskForm
from djang... | {
"repo_name": "scotthuang1989/timesheet",
"path": "activity/views.py",
"copies": "1",
"size": "4632",
"license": "apache-2.0",
"hash": -3437907651101301000,
"line_mean": 54.8072289157,
"line_max": 158,
"alpha_frac": 0.6262953368,
"autogenerated": false,
"ratio": 3.753646677471637,
"config_test"... |
from django.shortcuts import render
# Create your views here.
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import reverse
from django.ht... | {
"repo_name": "arunsingh/real_time_notification",
"path": "sendnotif/views.py",
"copies": "1",
"size": "1241",
"license": "mit",
"hash": -831061198390545800,
"line_mean": 22.4339622642,
"line_max": 58,
"alpha_frac": 0.7050765512,
"autogenerated": false,
"ratio": 3.4664804469273744,
"config_test... |
from django.shortcuts import render
# Create your views here.
from django.shortcuts import render_to_response
from django.template import RequestContext
from history.models import Teamindex
#from history.models import Seasonindex
from history.models import Seasondata
def index(request):
# Obtain the context from t... | {
"repo_name": "georgeeldredge/gberatings",
"path": "gberatings/history/views.py",
"copies": "1",
"size": "1585",
"license": "mit",
"hash": -3535694955207359500,
"line_mean": 30.7,
"line_max": 105,
"alpha_frac": 0.7457413249,
"autogenerated": false,
"ratio": 3.202020202020202,
"config_test": fal... |
from django.shortcuts import render
# Create your views here.
from django.views.generic import ListView
from .models import Link, Vote
from django.views.generic.edit import CreateView
from .forms import LinkForm, VoteForm
from braces.views import LoginRequiredMixin
from django.views.generic import DetailView
from dja... | {
"repo_name": "project-musashi/GTR",
"path": "GTR/forum/views.py",
"copies": "1",
"size": "6013",
"license": "bsd-3-clause",
"hash": -331328630247959500,
"line_mean": 31.3279569892,
"line_max": 108,
"alpha_frac": 0.6238150674,
"autogenerated": false,
"ratio": 3.7301488833746896,
"config_test": ... |
from django.shortcuts import render
# Create your views here.
from marketing.forms import EmailForm
from marketing.models import MarketingMessage, Slider
from .models import Product, ProductImage
def search(request):
try:
q = request.GET.get('q')
except:
q = None
if q:
products =... | {
"repo_name": "loafbaker/django_ecommerce1",
"path": "products/views.py",
"copies": "1",
"size": "1466",
"license": "mit",
"hash": 1555170619808032300,
"line_mean": 25.1785714286,
"line_max": 61,
"alpha_frac": 0.6186903138,
"autogenerated": false,
"ratio": 4.0609418282548475,
"config_test": fal... |
from django.shortcuts import render
# Create your views here.
from MenMew.models import *
from MenMew.serializers import *
from rest_framework import generics
class UserList(generics.ListCreateAPIView):
queryset = User.objects.all()
serializer_class = UserSerializer
class UserDetail(generics.RetrieveUpdat... | {
"repo_name": "russelhampton05/MenMew",
"path": "webApp/Team3/MenMew/views.py",
"copies": "1",
"size": "3830",
"license": "mit",
"hash": 4855204085522991000,
"line_mean": 26.9562043796,
"line_max": 70,
"alpha_frac": 0.7950391645,
"autogenerated": false,
"ratio": 4.313063063063063,
"config_test"... |
from django.shortcuts import render
# Create your views here.
from .models import Book, Author, BookInstance, Genre
def index(request):
"""
View function for home page of site.
"""
# Generate counts of some of the main objects
num_books=Book.objects.all().count()
num_instances=BookInstance.ob... | {
"repo_name": "chrisdavidmills/django_local_library",
"path": "catalog/views.py",
"copies": "1",
"size": "3722",
"license": "mpl-2.0",
"hash": -8629743042453021000,
"line_mean": 31.649122807,
"line_max": 171,
"alpha_frac": 0.7025792585,
"autogenerated": false,
"ratio": 3.8135245901639343,
"conf... |
from django.shortcuts import render
# Create your views here.
from .models import Book, Author, BookInstance, Genre
# Function based views
def index(request):
"""
View function for the home page of the site.
"""
# Generate counts of some of the main objects
num_books=Book.objects.all().count()
num_instances=B... | {
"repo_name": "byronvhughey/django_local_library",
"path": "catalog/views.py",
"copies": "1",
"size": "5046",
"license": "mit",
"hash": -6096807914140484000,
"line_mean": 28.8579881657,
"line_max": 165,
"alpha_frac": 0.7526753864,
"autogenerated": false,
"ratio": 3.4140730717185384,
"config_tes... |
from django.shortcuts import render
# Create your views here.
from .models import Book, Author, BookInstance, Genre
def index(request):
"""
View function for home page of site.
"""
# Generate counts of some of the main objects
num_books = Book.objects.all().count()
num_instances = BookInstan... | {
"repo_name": "fofanaabou/Django_Bibliotheque_Numerique",
"path": "catalog/views.py",
"copies": "1",
"size": "5451",
"license": "bsd-2-clause",
"hash": -2361786217205375000,
"line_mean": 29.6292134831,
"line_max": 117,
"alpha_frac": 0.6960190791,
"autogenerated": false,
"ratio": 3.915948275862069... |
from django.shortcuts import render
# Create your views here.
from .models import Course, Student, StudentCourse
from .serializers import CourseSerializer, StudentSerialiser
from rest_framework import viewsets
from rest_framework.decorators import detail_route, list_route
from rest_framework.response import Response... | {
"repo_name": "Likegram/study_run",
"path": "server/app/views.py",
"copies": "1",
"size": "1803",
"license": "mit",
"hash": -8156315267199014000,
"line_mean": 34.3529411765,
"line_max": 113,
"alpha_frac": 0.6943982252,
"autogenerated": false,
"ratio": 4.116438356164384,
"config_test": false,
... |
from django.shortcuts import render
# Create your views here.
from .models import Sesion
from datetime import datetime
from django_ajax.decorators import ajax
from clase.models import Comentario
from django.template.loader import render_to_string
from django.contrib.auth.decorators import login_required
@ajax
def c... | {
"repo_name": "luisza/lectura_ciclica",
"path": "clase/views.py",
"copies": "1",
"size": "1176",
"license": "apache-2.0",
"hash": -2620596735470555000,
"line_mean": 30.7837837838,
"line_max": 73,
"alpha_frac": 0.5629251701,
"autogenerated": false,
"ratio": 4.041237113402062,
"config_test": fals... |
from django.shortcuts import render
# Create your views here.
from rest_framework import viewsets
from rest_framework.response import Response
from rest_framework import status
import tweepy
from tweets.models import Tweet
from tweets.serializers import TweetSerializer
class TwitterViewSet(viewsets.ModelViewSet):
... | {
"repo_name": "bewallyt/Classy",
"path": "tweets/views.py",
"copies": "1",
"size": "1346",
"license": "mit",
"hash": -496424021721551300,
"line_mean": 26.4693877551,
"line_max": 132,
"alpha_frac": 0.7139673105,
"autogenerated": false,
"ratio": 3.274939172749392,
"config_test": false,
"has_no_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.