File tree 3 files changed +23
-6
lines changed
3 files changed +23
-6
lines changed Original file line number Diff line number Diff line change @@ -19,12 +19,23 @@ Features
19
19
* No flash (or other browser plugins) needed
20
20
* … more at the [ upstream's features page] ( http://aquantum-demo.appspot.com/file-upload#features )
21
21
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
+
22
32
Installation
23
33
============
24
34
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
28
39
29
40
License
30
41
=======
Original file line number Diff line number Diff line change 2
2
3
3
class Picture (models .Model ):
4
4
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" )
8
12
slug = models .SlugField (max_length = 50 , blank = True )
9
13
10
14
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