Files
codeql/python/ql/test/library-tests/frameworks/django-v2-v3
Rasmus Wriedt Larsen c87b3087be Python: Add test for Django FileField upload_to
The output from running the test script is:

```
'rootdir/bar'
[13/Apr/2022 09:20:36] "POST /app/file-test/ HTTP/1.1" 200 2
'rootdir/bar'
[13/Apr/2022 09:20:36] "POST /app/file-test/ HTTP/1.1" 200 2
'rootdir/foo%2fbar'
[13/Apr/2022 09:20:36] "POST /app/file-test/ HTTP/1.1" 200 2
'rootdir/%2e%2e%2fbar'
[13/Apr/2022 09:20:36] "POST /app/file-test/ HTTP/1.1" 200 2
'rootdir/foo%c0%afbar'
[13/Apr/2022 09:20:36] "POST /app/file-test/ HTTP/1.1" 200 2
```

I didn't add a `.py` extension, so it wasn't extracted, since we don't
actually care about what we model in that file.
2022-04-13 11:27:18 +02:00
..

Tests for Django in version 2.x and 3.x.

This folder contains a runable django application generated with django-admin startproject testproj and django-admin startapp testapp.

To run the development server, install django (in venv), and run python manage.py runserver

To understand how things work, see


Note that from Django 2.0 only Python 3 is supported (enforced by options file).

As I see it, from a QL modeling perspective, the important part of Django 3.0 was the added support for ASGI (Asynchronous Server Gateway Interface), and Django 3.1 added support for async views, async middleware.

We currently don't have any tests specific to Django 3.0, since it's very compatible with Django 2.0 in general, but we could split the tests in the future.