Merge pull request #2858 from RasmusWL/python-support-django2

Approved by tausbn
This commit is contained in:
semmle-qlci
2020-03-23 09:35:46 +00:00
committed by GitHub
21 changed files with 423 additions and 102 deletions

View File

@@ -2,5 +2,6 @@
def url(regex, view, kwargs=None, name=None):
pass
def patterns(*urls):
pass

View File

@@ -0,0 +1,8 @@
# see https://docs.djangoproject.com/en/1.11/_modules/django/shortcuts/#redirect
# https://github.com/django/django/blob/86908785076b2bbc31b908781da6b6ad1779b18b/django/shortcuts.py
def render(request, template_name, context=None, content_type=None, status=None, using=None):
pass
def redirect(to, *args, **kwargs):
pass

View File

@@ -0,0 +1,7 @@
from functools import partial
def _path(route, view, kwargs=None, name=None, Pattern=None):
pass
path = partial(_path, Pattern='RoutePattern (but this is a mock)')
re_path = partial(_path, Pattern='RegexPattern (but this is a mock)')

View File

@@ -0,0 +1,3 @@
# For django 2.x and 3.x
class View:
pass

View File

@@ -1,2 +1,3 @@
# For django 1.x
class View:
pass