File tree Expand file tree Collapse file tree 3 files changed +23
-6
lines changed
Expand file tree Collapse file tree 3 files changed +23
-6
lines changed Original file line number Diff line number Diff line change @@ -19,12 +19,23 @@ Features
1919* No flash (or other browser plugins) needed
2020* … more at the [ upstream's features page] ( http://aquantum-demo.appspot.com/file-upload#features )
2121
22+ Requirements
23+ ============
24+
25+ * Django
26+ * Python Imaging Library
27+
28+ If you do not get PIL to work (_ pillow_ is a replacement package that works
29+ with virtulalenvs), use FileField instead of ImageField in
30+ fileupload/models.py as commented in the file.
31+
2232Installation
2333============
2434
25- * run ./manage.py syncdb
26- * go to localhost:8000/upload/new/
27- * upload some files
35+ * pip install -r requirements.txt (will install django and pillow)
36+ * python manage.py syncdb
37+ * python manage.py runserver
38+ * go to localhost:8000/upload/new/ and upload some files
2839
2940License
3041=======
Original file line number Diff line number Diff line change 22
33class Picture (models .Model ):
44
5- # This is a small demo using FileField instead of ImageField, not
6- # depending on PIL. You will probably want ImageField in your app.
7- file = models .FileField (upload_to = "pictures" )
5+ # This is a small demo using just two fields. The slug field is really not
6+ # necessary, but makes the code simpler. ImageField depends on PIL or
7+ # pillow (where Pillow is easily installable in a virtualenv. If you have
8+ # problems installing pillow, use a more generic FileField instead.
9+
10+ #file = models.FileField(upload_to="pictures")
11+ file = models .ImageField (upload_to = "pictures" )
812 slug = models .SlugField (max_length = 50 , blank = True )
913
1014 def __unicode__ (self ):
Original file line number Diff line number Diff line change 1+ django
2+ pillow
You can’t perform that action at this time.
0 commit comments