We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 11e927b commit fb01475Copy full SHA for fb01475
fileupload/models.py
@@ -1,10 +1,12 @@
1
from django.db import models
2
+from django.contrib.auth.models import User
3
4
class Picture(models.Model):
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.ImageField(upload_to="pictures")
8
slug = models.SlugField(max_length=50, blank=True)
9
+ creator = models.ForeignKey(User)
10
11
def __unicode__(self):
12
return self.file
0 commit comments