diff -Naur bug/bug/settings.py bug_new/bug/settings.py
old
|
new
|
|
37 | 37 | 'django.contrib.sessions', |
38 | 38 | 'django.contrib.messages', |
39 | 39 | 'django.contrib.staticfiles', |
| 40 | 'bug' |
40 | 41 | ] |
41 | 42 | |
42 | 43 | MIDDLEWARE = [ |
diff -Naur bug/bug/templates/main.html bug_new/bug/templates/main.html
old
|
new
|
|
| 1 | {{ example_form }} |
diff -Naur bug/bug/urls.py bug_new/bug/urls.py
old
|
new
|
|
15 | 15 | """ |
16 | 16 | from django.contrib import admin |
17 | 17 | from django.urls import path |
| 18 | import bug.views |
18 | 19 | |
19 | 20 | urlpatterns = [ |
20 | 21 | path('admin/', admin.site.urls), |
| 22 | path("", bug.views.main), |
21 | 23 | ] |
diff -Naur bug/bug/views.py bug_new/bug/views.py
old
|
new
|
|
| 1 | import pickle |
| 2 | import django.forms as forms |
| 3 | from django.shortcuts import render |
| 4 | |
| 5 | |
| 6 | class ExampleForm(forms.Form): |
| 7 | boolean_field = forms.BooleanField() |
| 8 | |
| 9 | |
| 10 | def main(request): |
| 11 | pickle.dump(forms.Form(), open("/dev/null", "wb")) |
| 12 | return render(request, "main.html", {"example_form": ExampleForm()}) |
diff -Naur bug/manage.py bug_new/manage.py
old
|
new
|
|
1 | | #!/usr/bin/env python |
| 1 | #!/usr/bin/env python3 |
2 | 2 | import os |
3 | 3 | import sys |
4 | 4 | |