Skip to content

Commit 1474e2c

Browse files
committed
fixed model unicode bug & admin.py added for admin panel control.
1 parent 297bc51 commit 1474e2c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

fileupload/admin.py

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from fileupload.models import Picture
2+
from django.contrib import admin
3+
4+
admin.site.register(Picture)

fileupload/models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class Picture(models.Model):
1212
slug = models.SlugField(max_length=50, blank=True)
1313

1414
def __unicode__(self):
15-
return self.file
15+
return '%s' % (self.file)
1616

1717
@models.permalink
1818
def get_absolute_url(self):

0 commit comments

Comments
 (0)