mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
fix django example to work with 1.3 .
This commit is contained in:
parent
179b87639c
commit
76aef105d5
@ -62,6 +62,11 @@ MIDDLEWARE_CLASSES = (
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
)
|
||||
|
||||
|
||||
FILE_UPLOAD_HANDLERS = (
|
||||
"django.core.files.uploadhandler.TemporaryFileUploadHandler",
|
||||
)
|
||||
|
||||
ROOT_URLCONF = 'djangotest.urls'
|
||||
|
||||
TEMPLATE_DIRS = ()
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<form method="post" enctype='multipart/form-data'>
|
||||
<form method="post" enctype='multipart/form-data'>
|
||||
{% csrf_token %}
|
||||
<table>
|
||||
{{ form.as_table }}
|
||||
</table>
|
||||
@ -14,4 +15,4 @@
|
||||
<p><strong>message:</strong><br>{{ message }}</p>
|
||||
<p><strong>size:</strong><br>{{ size }}</p>
|
||||
{% endif %}
|
||||
{% endblock content %}
|
||||
{% endblock content %}
|
||||
|
||||
@ -5,6 +5,7 @@ import os
|
||||
from django import forms
|
||||
from django.http import HttpResponse
|
||||
from django.shortcuts import render_to_response
|
||||
from django.template import RequestContext
|
||||
import tempfile
|
||||
|
||||
class MsgForm(forms.Form):
|
||||
@ -36,7 +37,7 @@ def home(request):
|
||||
'subject': subject,
|
||||
'message': message,
|
||||
'size': size
|
||||
})
|
||||
}, RequestContext(request))
|
||||
|
||||
|
||||
def acsv(request):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user